Repository navigation
fix(test): wait for gateway hook model activity - #122584
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 12, 2026, 7:00 AM ET / 11:00 UTC. ClawSweeper reviewWhat this changesThe PR replaces a one-time held-model activity assertion in the gateway hook concurrency E2E test with a 30-second Vitest wait. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open for normal maintainer merge handling. The current E2E test can observe a successful hook admission before the held model server increments its active count; this focused bounded wait removes that scheduling race without changing production behavior. Priority: P3 Review scores
Verification
How this fits togetherThe gateway accepts hook HTTP requests and reports success when the isolated agent run enters execution; that run later contacts the configured model server. This E2E test holds model responses to verify the shared admission budget and observes the server activity before releasing work. flowchart LR
A[Hook HTTP requests] --> B[Gateway admission]
B --> C[Isolated agent run starts]
C --> D[Held model server]
D --> E[Activity and budget assertions]
E --> F[Release and completion checks]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +3. Total +3 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the bounded activity wait at the E2E observation boundary so hook-admission coverage remains strict while no longer assuming a scheduler ordering the gateway does not promise. Do we have a high-confidence way to reproduce the issue? Yes, from source: HTTP success is settled at runner entry while the test server increments activity only after the later model request, making the prior one-time sample a real scheduling race. Is this the best way to solve the issue? Yes. Waiting at the assertion boundary preserves the intended model-activity invariant and matches the file's existing bounded asynchronous checks; changing production admission semantics would solve the wrong problem. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5235269b3c38. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where the gateway hook concurrency E2E could fail after all hook responses settled but before the held model server recorded its first active request.
Why This Change Was Made
The test now waits within the existing 30-second synchronization budget for model activity instead of sampling it once. The assertion still reports captured gateway logs on timeout, and no production behavior changes.
User Impact
No user-visible product change. Release validation no longer fails on this model-request scheduling race.
Evidence
tbx_01kztpyr6pdzjqea5h7by2qvtxtbx_01kztpyr6xjyhw7yg4ybqrbj6rtbx_01kztpyr69jpqyb7rhad09fm2etbx_01kztpyr81ca9s7nj97e4v5t16tbx_01kztqahqzn44mbdyqywdn2w2j).tbx_01kztqn4syyxgemk4kx7hqa2p5).git diff --checkpassed.