Repository navigation
fix(dev): verify published stack endpoints - #1604
Closed
Cedric Vidal (cedricvidal) wants to merge 3 commits into
Closed
Cedric Vidal (cedricvidal) wants to merge 3 commits into
Cedric Vidal (cedricvidal) wants to merge 3 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
6 tasks done
Test Results (Node.js 22)test: Run #444
🎉 All tests passed! |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Test Results (Node.js 22)test: Run #448
🎉 All tests passed! |
…erify-stack-endpoints Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Test Results (Node.js 22)test: Run #454
🎉 All tests passed! |
Cedric Vidal (cedricvidal)
requested a review
from Wassim Chegham (manekinekko)
November 4, 2026 01:57
Collaborator
Author
|
Closing this layer because the host-port verification approach is no longer part of the onboarding stack. Colima host forwarding is out of scope, and the surviving fixes do not depend on this verifier. |
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
Depends on #1603 (
cedricvidal-decouple-pnpm-bootstrapat9406483ab1acc86d0a5386ab2d424348d6291bd9) and is the host-endpoint verification layer in the user-requested seven-PR native stack registered by #1608.Original problem: Docker Compose can report healthy containers and published port mappings even when the selected runtime VM does not expose those ports to the host. A Portal healthcheck succeeding inside its container therefore did not prove that
localhostwas usable. Portal reachability also did not prove that the Copilot worker had created its queue and connected to MongoDB, so the startup command could present a success-shaped stack that could not process runs.This layer:
/ready, and gateway/health/readythrough the actual published host ports before printing their URLs as usable;upCompose commands;Acceptance-discovered lifecycle regression: the first implementation started the bounded verifier at the same time as
docker compose up --build --watch. On a cold Podman build, the selected containers legitimately remainednot-createdwhile images compiled. Those polls consumed the readiness budget, after which the verifier failed and terminated Compose before containers could be created.Correction: the wrapper now resolves the selected application services and waits for Compose to create every selected container before starting the bounded endpoint/worker window. That pre-readiness gate is tied to the Compose lifecycle, not another arbitrary clean-build timer: long legitimate builds may continue, while a nonzero Compose build/start exit is propagated immediately and cannot wait forever. Once containers exist, the original bounded readiness and failure contracts apply unchanged.
Current PR head is
1c495ee3c9f8a483093013ca595f76d80c2e9253, a normal merge of the readiness fix head5d78953acb6313bc8294e5d5a1e5371c7619e54cwith the updated dependent base9406483ab1acc86d0a5386ab2d424348d6291bd9. The PR remains draft and targets the dependent branch, notmain.Demos
Before
N/A — developer startup tooling only. The reproduced failure was a healthy in-container Portal with no host listener, followed during cumulative acceptance by a cold Podman build being terminated while services were still
not-created.After
N/A — deterministic process/Docker/curl stubs cover the complete lifecycle and diagnostics without disrupting unrelated user containers. A bounded real Podman cold-build run also confirmed the verifier no longer starts during image compilation.
Testing
pnpm exec vitest run scripts/verify-dev-stack.test.ts scripts/docker-compose.test.ts --reporter=default— 14/14 tests passed. Coverage includes success, delayed readiness, non-success HTTP, connection refusal, healthy-container/host-unreachable distinction, unhealthy service, worker-not-ready, bounded attempts, secret-safe output, wrapper success/failure propagation, a longnot-createdbuild phase followed by creation/readiness, and immediate propagation of Compose build exit 17 without endpoint probes.pnpm exec vitest run scripts/verify-dev-stack.test.ts --reporter=default --typecheck.enabled— 13/13 tests passed; no type errors.bash -n scripts/dev-compose.sh scripts/verify-dev-stack.sh.GITHUB_TOKEN='' NPM_CONFIG_REGISTRY='https://registry.npmjs.org/' docker compose -f docker-compose.yml -f docker-compose.dev.yml --profile mongodb --profile auth --profile portal --profile copilot config --quiet.pnpm headers:check— all 967 in-scope files have the required header.git diff --check.GITHUB_TOKEN="$(gh auth token)" pnpm docker:dev:copilotran for approximately 55 minutes through cold image compilation. During that legitimate build, no selected application containers existed and captured output contained zero occurrences of bothVerifying published development endpointsandDevelopment stack readiness verification failed. The attempt was deliberately stopped before all cold images completed rather than spending unbounded time; it therefore did not reach live endpoint verification, but it directly confirms the acceptance regression—premature verifier timeout during builds—is removed.1c495ee3c9f8a483093013ca595f76d80c2e9253: CI run 41753422826 completed successfully, including License Headers, Third-party NOTICE, Unit Tests (Node.js 22), Lint Code, Build Applications, CLI Bundle Integration Tests, and CI Summary. Secret Scan run 41753422881, Pull Request Labeler run 41753422813, both gitleaks checks, and CLA also passed. Path-filtered queue/worker integration, gateway, Windows worker, and LLM-eval jobs were skipped as expected for this diff.Documentation and compatibility
Updated
CONTRIBUTING.mdanddocs/architecture/overview.mdwith the verified-ready contract, clean-build lifecycle gate, worker readiness boundary, and failure interpretation.No API, CLI, dependency, migration, persisted-data, Docker-context, or runtime-selection changes. Existing non-
upCompose commands, explicit infra-only starts, detached behavior, and published endpoint/worker contracts remain compatible. Because this is a dependent stack layer, upper branches may need the stack's server-side rebase/sync operation after this lower-layer head changes.Checklist
All checklist items are N/A for this developer startup-script and documentation change.
up()/down()and keep it CosmosDB-compatible.NOTICE/NOTICE-REVIEW.txtwithpnpm noticeas needed.