fix(qa): prevent qa smoke ci timeouts under gateway concurrency#99368
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 3, 2026, 6:28 PM ET / 22:28 UTC. Summary PR surface: Source +23, Tests +55. Total +78 across 6 files. Reproducibility: yes. with medium confidence rather than a deterministic local repro. The earlier CI artifact and PR body show intermittent QA smoke timeouts under concurrent gateway startup, and the current source shows the startup warmup timers that the PR disables for QA child gateways. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Keep the QA-only warmup suppression with focused regression tests and fresh full smoke proof, while leaving production startup prewarms enabled by default. Do we have a high-confidence way to reproduce the issue? Yes, with medium confidence rather than a deterministic local repro. The earlier CI artifact and PR body show intermittent QA smoke timeouts under concurrent gateway startup, and the current source shows the startup warmup timers that the PR disables for QA child gateways. Is this the best way to solve the issue? Yes. The PR is a narrow QA-only mitigation that preserves production defaults and failure-triggered provider-auth rewarm; broader scheduler/stagger fixes were already attempted in related QA smoke work. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1cab479f7814. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +23, Tests +55. Total +78 across 6 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
What Problem This Solves
Fixes an issue where the QA smoke profile could intermittently time out waiting for gateway readiness or native command responses when multiple isolated gateways ran concurrently on a low-CPU runner.
The observed failures included
runtime-inventory-drift-checktiming out on channel readiness andnative-command-session-targettiming out on/stop, while provider-auth prewarm telemetry showed multi-second event-loop stalls.Why This Change Was Made
Each QA child gateway scheduled optional startup model discovery and a provider-auth worker shortly after readiness. With eight gateways on a two-vCPU runner, those background warmups overlapped and starved foreground gateway work.
QA child gateways now skip the optional initial startup warmups. Production behavior is unchanged, and provider-auth failure invalidation plus failure-triggered rewarming remain enabled so QA retains production runtime semantics after startup.
User Impact
No product behavior changes. QA smoke runs should be more reliable under high concurrency and should be neutral-to-faster because they no longer spend CPU on background cache warming that the deterministic mock scenarios do not require.
Evidence
pnpm exec vitest run src/gateway/server-startup.test.ts src/gateway/server-startup-post-attach.test.ts extensions/qa-lab/src/gateway-child.test.ts— 122 tests passed.pnpm check— passed.runtime-inventory-drift-checkandnative-command-session-targetat concurrency 2 — all eight gateway scenarios passed.