Repository navigation
test: advance startup fixtures to their scheduled retry - #190193
Conversation
The client now backs off repeated startup refusals up to eight seconds. Advance the frozen clock to its next timer after readiness so the existing Gateway and TUI write assertions observe the scheduled retry. Co-authored-by: steipete <[email protected]>
|
🦞👀 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 maintainer review before merge. What this changesThe Gateway and TUI startup fixtures advance fake time to the next scheduled timer after readiness. Example: The TUI send fixture becomes ready after 240,000 ms of simulated startup.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — verified: source commit Merge readiness✅ Ready for maintainer review Keep open: this PR repairs confirmed startup-test timeouts without weakening assertions or changing production behavior; no actionable defects found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway and TUI startup tests send requests through the shared protocol client, simulate startup refusals, and verify eventual delivery, cancellation, deadlines, and unchanged request bytes. flowchart LR
A[Startup fixtures] --> B[Gateway or TUI entry]
B --> C[Protocol client]
C --> D[Pending request owner]
D --> E[Scheduled retry]
E --> F[Fixture transport]
F --> G[Delivery assertions]
Technical reviewBest possible solution: Keep the existing retry owner and advance these two fixtures to its scheduled retry while preserving every behavioral assertion. Do we have a high-confidence way to reproduce the issue? Yes: current-main backoff and both fixtures explain the frozen retry, and GitHub annotations confirm all four timeouts; this read-only review did not execute tests. Is this the best way to solve the issue? Yes: these are the smallest complete fixture repairs, with backoff timing independently tested by its existing owner suite. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9172615f1db9. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests 0. Total 0 across 2 files. Added test files: 0. View PR surface stats
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 1, 2026, 4:35 AM ET / 09:35 UTC. |
) ## What Problem This Solves Fixes two jobs in [run 41288828221](https://github.com/openclaw/openclaw/actions/runs/41288828221): - [checks-node-compact-large-14](https://github.com/openclaw/openclaw/actions/runs/41288828221/job/124795798742): `gateway-chat.startup.test.ts:246`, both “send waits through startup and writes once” and “new waits through startup and writes once” time out at 120000ms. - [checks-node-compact-large-19](https://github.com/openclaw/openclaw/actions/runs/41288828221/job/124795798949): `server-methods.startup-deadline.test.ts:195`, `startup agent: ready` and `startup sessions.create: ready` time out at 120000ms. ## User Impact Test-only CI repair; production startup backoff remains unchanged. ## Why This Change Was Made Introduced by fbb3769 (openclaw#190159): repeated startup refusals back off to eight seconds. Advancing only one second after readiness leaves the awaited retry frozen. Advance to the already scheduled next timer in both fixtures. Existing deadline, cancellation, serialized-request-byte, and exactly-one-write assertions remain unchanged. Production delta 0; tests +2/-2, with no new machinery. ## Evidence - Ownership rechecked against fresh main and recent/targeted open PR file inventories; no competing fix found. - Lane l201 reproduced all four ready-case failures through the Gateway/TUI boundaries. Complete Gateway startup, TUI startup, and pending-request/backoff owner suites passed 33/33 on pinned Bun and 33/33 on Node. Scoped typecheck, type-aware lint, format, and whitespace passed. - Independent Codex autoreview with both complete fixtures and the request/backoff owner on base `0082e6368c96`: P0–P2 scoped-clean, no findings. The rebased patch is identical; affected fixtures and backoff owner are unchanged on main. - After rebasing onto `1f4d22031c73bcd1c42b48d5c84c9a9192b37099`, reran both complete touched test files through `OPENCLAW_VITEST_RUNTIME=bun node scripts/run-vitest.mjs ... --maxWorkers=1`: 22/22 passed (10 Gateway and 12 TUI cases, no skipped cases). - No retries, skipped tests, timeout increases, weakened assertions, baseline growth, or workflow reruns. Co-authored-by: steipete <[email protected]>
What Problem This Solves
Fixes two jobs in run 41288828221:
gateway-chat.startup.test.ts:246, both “send waits through startup and writes once” and “new waits through startup and writes once” time out at 120000ms.server-methods.startup-deadline.test.ts:195,startup agent: readyandstartup sessions.create: readytime out at 120000ms.User Impact
Test-only CI repair; production startup backoff remains unchanged.
Why This Change Was Made
Introduced by ebc9d7e (#190159): repeated startup refusals back off to eight seconds. Advancing only one second after readiness leaves the awaited retry frozen. Advance to the already scheduled next timer in both fixtures. Existing deadline, cancellation, serialized-request-byte, and exactly-one-write assertions remain unchanged. Production delta 0; tests +2/-2, with no new machinery.
Evidence
42d5039f0aa8: P0–P2 scoped-clean, no findings. The rebased patch is identical; affected fixtures and backoff owner are unchanged on main.2423623c3461610130360fa978cd364653fee1b2, reran both complete touched test files throughOPENCLAW_VITEST_RUNTIME=bun node scripts/run-vitest.mjs ... --maxWorkers=1: 22/22 passed (10 Gateway and 12 TUI cases, no skipped cases).Co-authored-by: steipete [email protected]