Repository navigation
fix(tests): make catalog fixtures independent of runner speed - #205137
Conversation
Forward-port 70a36ea and 9007418. Freeze only the clock driving each unrelated deadline; retain the cache TTL check, real Gateway I/O, and every request-count assertion. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: jalehman <[email protected]>
Worked on by: - @jalehman - @RomneyDa Co-authored-by: jalehman <[email protected]> Co-authored-by: RomneyDa <[email protected]> OpenClaw-Publication: 26291ae5-8a2f-417c-9e31-c4d3c6ba30de
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR freezes the unrelated clock in each catalog fixture so runner stalls do not invalidate its assertions. Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR makes catalog fixtures deterministic without changing production behavior or weakening assertions; no introduced defect was found. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe fixtures exercise ClawRouter catalog mapping and Gateway catalog-worker recovery, checking model rows, retained failure status, request counts, and explicit recovery. flowchart LR
A[Catalog fixtures] --> B[ClawRouter mapping]
A --> C[Gateway model requests]
B --> D[Mock catalog response]
C --> E[Catalog worker and retry owner]
E --> F[Local HTTP fixture]
D --> G[Existing assertions]
F --> G
Technical reviewBest possible solution: Retain the narrow fixture clock controls and existing cleanup and assertions, then land after required CI succeeds. Do we have a high-confidence way to reproduce the issue? Source confirms both elapsed-clock dependencies behind the reported runner-sensitive failures; no tests were executed during this read-only review. Is this the best way to solve the issue? This is the smallest complete fixture repair: control the unrelated clocks while preserving cache-expiry coverage, real worker termination, Gateway I/O, explicit refresh, and request-count assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 04f1b890be7f. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +6. Total +6 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
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 November 25, 2026, 1:34 AM ET / 06:34 UTC. |
* test: isolate catalog fixtures from elapsed clocks Forward-port 70a36ea and 9007418. Freeze only the clock driving each unrelated deadline; retain the cache TTL check, real Gateway I/O, and every request-count assertion. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: jalehman <[email protected]> * fix(tests): make catalog fixtures independent of runner speed Worked on by: - @jalehman - @RomneyDa Co-authored-by: jalehman <[email protected]> Co-authored-by: RomneyDa <[email protected]> OpenClaw-Publication: 26291ae5-8a2f-417c-9e31-c4d3c6ba30de --------- Co-authored-by: RomneyDa <[email protected]> Co-authored-by: jalehman <[email protected]> (cherry picked from commit ced9f75)
…aw#205137) * test: isolate catalog fixtures from elapsed clocks Forward-port 70a36ea and 9007418. Freeze only the clock driving each unrelated deadline; retain the cache TTL check, real Gateway I/O, and every request-count assertion. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: jalehman <[email protected]> * fix(tests): make catalog fixtures independent of runner speed Worked on by: - @jalehman - @RomneyDa Co-authored-by: jalehman <[email protected]> Co-authored-by: RomneyDa <[email protected]> OpenClaw-Publication: 26291ae5-8a2f-417c-9e31-c4d3c6ba30de --------- Co-authored-by: RomneyDa <[email protected]> Co-authored-by: jalehman <[email protected]>
When neither the selected endpoint nor the model row declares input, ClawRouter's fallback classified gpt-6.2-sol and gpt-6.2-astra as text-only. Add both upstream IDs and cover them in the fallback test. (cherry picked from commit 3bc20e2) Release adaptation: Cite the original PR’s November 18, 2026 live ClawRouter image proof in the legacy fallback; exact upstream IDs, explicit modality precedence, and text-only behavior for unrecognized models are unchanged. Follow-up audit: #205137’s catalog clock fixture is already equivalent (70a36ea), and #203898 is already integrated (fec6728). #207768 classifies catalog misses and #192450 adds Bedrock routing; neither is required by the exact-ID fallback. #201434 and #201415 mention the donor SHA as an unrelated verification baseline. Original #200878 has no additional follow-up reference at the pinned scan end. Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
A slow worker can exhaust ClawRouter's discovery budget before a mocked response, or let a legitimate background catalog retry add a request during the Gateway's failed-renewal retention assertions. Neither failure means the behavior under test is broken.
User Impact
More reliable catalog checks without loosening what they verify. No runtime behavior, retry interval, discovery timeout, or migration changes.
Why This Change Was Made
70a36ea510ab75ba40ef0234281fd8a1a9cf3f7dfrom 2026.11.10 unchanged: stub onlyperformance.now()for the ClawRouter mapping suite. The cache TTL test still controlsDate.now()independently, and the existing cleanup restores the spy.90074187f1022f0be29f776615f82273ea429d8d: freeze onlyDatefrom just before worker termination through the assertion window, and restore it infinally. Gateway I/O, RPC timeouts, the worker, and the retry timer remain real. Main already importsvifrom the worker observer refactor. All existing assertions remain intact.Evidence
git diff --checkpassed. Author self-review confirmed six inserted test lines, no production changes, and no assertion changes.Worked on by