Repository navigation
fix(compose): remove the gateway development CPU quota - #1601
Merged
Cedric Vidal (cedricvidal) merged 4 commits intoNov 5, 2026
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Test Results (Node.js 22)test: Run #441
🎉 All tests passed! |
6 tasks done
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
6 tasks done
Test Results (Node.js 22)test: Run #451
🎉 All tests passed! |
Cedric Vidal (cedricvidal)
requested a review
from Wassim Chegham (manekinekko)
November 4, 2026 01:57
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Test Results (Node.js 22)test: Run #476
🎉 All tests passed! |
Cedric Vidal (cedricvidal)
marked this pull request as ready for review
November 5, 2026 00:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reproduced problem
On a fresh Docker or Podman development start, the gateway performs a cold Rust/Cargo compilation inside the development container. The development overlay inherited the production gateway limit of
cpus: "0.5", sorustcwas heavily throttled during the cold build. The gateway did not become healthy in time,coder-acp-copilotremained blocked oncondition: service_healthy, and submitted runs remained pending because the worker never reached queue processing.Root cause and fix
The production CPU quota was appropriate for the already-built runtime image, but not for the development image that compiles the gateway under
cargo watch. This change explicitly removes only that inherited development CPU quota with:The effective development configuration still:
10m0s) first-start health grace;/build/targetin thegateway_targetnamed volume so later starts reuse Cargo output; andgatewaydependency withcondition: service_healthy.This lets the cold compilation use the CPUs assigned to Docker or the Podman VM while keeping memory bounded and retaining a generous readiness window. Once the gateway becomes healthy, the worker starts normally and can process queued runs.
Focused Compose regression coverage asserts the fully merged base + development configuration rather than only the override source. Contributor and gateway architecture documentation now describe the cold-start behavior and readiness expectations.
Scope and stack context
The behavior change is limited to the Docker development gateway overlay. Production Compose/Kubernetes gateway CPU and memory limits, gateway routing, health semantics, the Copilot worker dependency, Portal behavior, CLI behavior, APIs, data models, and dependencies are unchanged.
This PR is the gateway-behavior layer in the native stack. Merge commit
e5b43c0aae8eea21e40bd782cf7cbf74886ec6eelater incorporated prerequisite PR #1609 (a73e0ec5715a74aa4f53c4cab6c3227dbf60ac57) only to unblock stack-wide license-header CI. Those website CSS header changes do not participate in or alter the gateway fix.Demos
N/A — Docker development configuration only; no Portal or CLI UI change.
Before
N/A — the failure is a development-stack cold-build/readiness condition rather than a user-visible UI flow.
After
N/A — the effective Compose configuration and worker readiness contract are covered by the focused regression test below.
Testing
pnpm exec vitest run scripts/docker-compose.test.ts --reporter=default: 1 test file passed, 1/1 test passed. The test renders the merged Compose model and verifies no gatewaycpusvalue, 2 GiB memory,10m0shealth start period, the unchanged healthcheck command, thegateway_targetmount, andcoder-acp-copilot→ gatewayservice_healthydependency.GITHUB_TOKEN="${GITHUB_TOKEN:-}" docker compose -f docker-compose.yml -f docker-compose.dev.yml --profile copilot config --format json: merged configuration reportedcpusabsent,mem_limit: "2147483648",start_period: "10m0s", the existingwget -qO- http://127.0.0.1:18000/health || exit 1healthcheck,gateway_targetat/build/target, and worker dependency conditionservice_healthy.pnpm headers:check: all 965 in-scope files have the required license header after the prerequisite fix(website): add missing license headers #1609 hygiene merge.git diff --check 05d9435005711a96c63be162044854870e77c242..HEAD: no whitespace errors.e5b43c0aae8eea21e40bd782cf7cbf74886ec6ee: License Headers, Third-party NOTICE, Unit Tests (22), Lint Code, Build Applications, CLI Bundle Integration Tests, and CI Summary all succeeded. Secret Scan, PR labeling, Pages build, gitleaks, and CLA also succeeded; path-filtered integration, gateway, Windows-worker, and LLM-eval jobs were skipped as expected.Documentation and compatibility
Updated
CONTRIBUTING.mdanddocs/architecture/ai-gateway.mdwith the development gateway cold-build resource and readiness behavior.This is a non-breaking Docker development configuration change. Production gateway limits and deployment behavior are unchanged. There are no API, CLI, Portal, database, migration, dependency, or data compatibility impacts. The development overlay requires a Docker Compose version that supports the
!resetmerge tag; the repository's existing Compose Watch workflow already requires a modern Compose release.Checklist
up()/down()and keep it CosmosDB-compatible.NOTICE/NOTICE-REVIEW.txtwithpnpm noticeas needed.