Repository navigation
fix(gateway): publish readiness after startup span - #188873
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Co-authored-by: RomneyDa <[email protected]>
0bc272d to
47a922a
Compare
|
Codex review: needs maintainer review before merge. What this changesThis PR delays non-deferred Gateway readiness publication until the post-attach startup span finishes. Example: An update-canary Gateway finishes loading its startup plugins.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR makes a focused readiness-ordering repair, and no introduced production defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherGateway startup attaches transports and starts sidecars; its kernel publishes the readiness state consumed by health probes and startup diagnostics. flowchart TD
A[Gateway startup] --> B[Post-attach span]
B --> C[Sidecar completion callback]
C --> D[Startup completion owner]
B --> D
D --> E[Kernel readiness state]
E --> F[Health probes and ready logs]
Technical reviewBest possible solution: Keep readiness publication in the existing startup owner and protect its ordering with a non-minimal regression. Do we have a high-confidence way to reproduce the issue? Source establishes that current-main canary startup publishes sidecar readiness before the enclosing post-attach measurement returns; no target code was executed during this read-only review. Is this the best way to solve the issue? The production fix uses the existing lifecycle owner, preserves deferred startup and readiness checks, and adds no persistent state or public contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a32d79a2c763. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +10, Tests +13. Total +23 across 2 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 30, 2026, 8:41 PM ET / October 31, 2026, 00:41 UTC. |
Adapt the landed main fix to the release startup structure so normal readiness is published only after post-attach startup work settles. Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: RomneyDa <[email protected]>
Summary
runtime.post-attachstartup span has closedgateway.readyfollows the post-attach span endThis repairs the startup diagnostic race reproduced by the 2026.10.10 release qualification lane, where health could report ready while the required startup span was still open.
Validation
node scripts/run-vitest.mjs src/gateway/server-startup-minimal-boot.test.ts(1 file, 4 tests passed)node scripts/run-vitest.mjs src/gateway/server-startup-update-canary.test.ts(1 file, 1 test passed)pnpm exec oxfmt --check src/gateway/server-startup-finish.ts src/gateway/server-startup-minimal-boot.test.tsgit diff --check