Skip to content

feat: isolate default and stateful execution profiles - #51

Draft
danny-avila wants to merge 1 commit into
mainfrom
danny-avila/execution-profiles
Draft

feat: isolate default and stateful execution profiles#51
danny-avila wants to merge 1 commit into
mainfrom
danny-avila/execution-profiles

Conversation

@danny-avila

@danny-avila danny-avila commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a stable CODEAPI_EXECUTION_PROFILE=default|stateful deployment identity
  • preserve the existing default BullMQ queues while isolating stateful jobs onto dedicated queues
  • add X-CodeAPI-Expected-Profile fail-closed routing assertions and advertise the actual profile on every response
  • reject contradictory profile/backend/session-mode configurations at startup
  • expose low-cardinality profile metrics and document the contract in OpenAPI, Helm, and operator docs

Why

This establishes the Code API boundary needed for #38 and AI-1650: LibreChat/Agents can route each executing agent to either the AWS-free stateless deployment or the stateful Lambda MicroVM deployment without letting the two worker pools consume each other jobs.

There is deliberately no silent fallback and no workspace/file migration between profiles.

Downstream

Compatibility

  • HTTP/stateless remains the default and keeps python-queue / other-queue.
  • Existing affinity/strict deployments infer stateful when the new env var is omitted during rollout.
  • API-only pods validate profile/session semantics without requiring worker-only AWS configuration.
  • Older clients may omit the expected-profile header; trusted new callers always send it.

Validation

  • 542 pass, 0 fail across the complete service test suite
  • bun run build
  • OpenAPI YAML parse
  • helm lint helm/codeapi -f helm/codeapi/values-local.yaml
  • exact-head CI: 5/5 green
  • git diff --check

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant