Repository navigation
test(gateway): isolate embedding cleanup fixture state - #155703
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. |
|
Codex review: needs changes before merge. Reviewed September 22, 2026, 10:30 AM ET / 14:30 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR clears leftover embedding-provider mocks after cleanup and makes existing HTTP tests observe actual provider admission before checking that cleanup blocks replacement. Merge readiness⛔ Needs changes before merge - 1 item remains The narrowed patch remains useful and has no actionable correctness findings. Current main lacks these fixture corrections; the previously requested Linux qualification remains incomplete. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway embeddings endpoint converts authenticated HTTP requests into calls to configured embedding providers. These tests exercise provider admission and cleanup through a shared Gateway, using synthetic providers. flowchart TD
A[Authenticated test requests] --> B[Gateway embeddings endpoint]
B --> C[Provider admission queue]
C --> D[Synthetic embedding provider]
D --> E[Held cleanup gate]
E --> C
C --> F[Admission and response assertions]
F --> G[Drain providers and reset fixtures]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +15. Total +15 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the shared fixture and production lifetime owner, with deterministic admission observation and mock reset only after cleanup settles. Do we have a high-confidence way to reproduce the issue? Yes, source identifies the missing mock resets and local descriptor, and the body records targeted failing controls on frozen main. This read-only review did not execute tests. Is this the best way to solve the issue? Yes. The patch extends existing fixture cleanup and observes the real admission owner without adding production seams, duplicate helpers, or test cases. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 092cc29d5e0a. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
@clawsweeper re-review Please review current head |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Please review current head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Current head: |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* fix(test): retire held embeddings cleanup after failures * test(gateway): strengthen embedding cleanup fixture coverage --------- Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Main now owns embeddings fixture gate release, request joining, provider draining and HTTP server cleanup. Two gaps remain: an early rejected request can leave a one-shot provider mock for the following case, and the created-local row lacks its local descriptor. Its microtask-only check also does not establish that the second request reached admission.
User Impact
Test-only change. The same 43 cases and production behavior remain intact.
Why This Change Was Made
Reset the create, embed and close mocks after provider draining. Register the created-local descriptor and wait for a forwarded real lease-acquisition signal before asserting that replacement is blocked. Reuse all canonical main helpers; remove the earlier PR-only support abstraction.
This narrows the original contribution after main commit
7580300825dc9539139a13d12bb6cccf05adc142supplied the broader lifecycle repair. Peter Steinberger’s contributor ancestry is preserved. The local-descriptor and real-admission observations incorporate the relevant work from #155658 atd5e9bbaa68e84cc90a073a1274f953d8e8c9e943; main already includes its authenticated disconnect coverage.Evidence
05804bcfdad6daa29fba9cf21b100637824fb489: actual HTTP 401 leaves zero factory calls; after real teardown, the next valid HTTP 200 receives stalelocal/local-embedinstead of the requested OpenAI provider. The three post-drain resets make both cases pass.05804main file passed all 43 cases in 47.667 seconds on the same box, after which exact candidate bytes were restored. These observations measure cost; one baseline run does not establish a speedup. The existing full-file suite crosses real HTTP authentication/admission/disconnect and provider cleanup boundaries; helper-only tests cannot establish those orderings. This change adds no cases or server boots.The prior head
a92a6442a166f80f27c119c39754c6577c643380passed CI run 35735842910. Its separate proof completed three original groups and seven full-file runs before being stopped for the overlapping main repair; run eight was censored. Those results do not qualify this rewritten source. The original CI cleanup callback delay remains unexplained; the controls establish these specific remaining fixture defects.Additional independent Linux Testbox verification of the same
3bbe5450d56d57422fcd6b91259791724d5704ebsource passed all 43 embeddings cases and 17 registry/runtime sibling cases on Node 24.20.0, with no failures or skips. Command wall times were 80.56 seconds and 27.13 seconds respectively; the lease was stopped after artifact export. A separate independent P2 source review completed after the merge with no actionable findings; it is post-merge verification, not a pre-landing gate.