Repository navigation
fix(test): keep worker launch-wire proof within its timeout - #175147
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6198790fa5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const FINALIZATION_LOAD_WAVES = 3; | ||
| // One full-capacity wave covers readiness sampling and a fresh connection during | ||
| // finalization; repeated waves add no distinct assertion before the restart audit. | ||
| const FINALIZATION_LOAD_WAVES = 1; |
There was a problem hiding this comment.
Restore repeated finalization-load coverage
Reducing this loop to one wave removes coverage for degradation that appears only after sequential full-capacity batches—such as leaked worker slots or accumulating finalization backpressure—and also reduces the fresh control-connection observations from three to one. The failing run completed all three waves, so making the timeout pass by trimming the workload hides that class of regression rather than preserving the original stress contract; keep repeated-wave proof within budget or split it into an independently budgeted test. The scoped test rules explicitly prohibit substituting trimmed expectations for async E2E failures.
AGENTS.md reference: test/AGENTS.md:L4-L4
Useful? React with 👍 / 👎.
|
Codex review: needs maintainer review before merge. What this changesThis PR reduces the worker launch-wire test from three waves of 12 concurrent turns to one while retaining its timeout and remaining checks. Example: The launch-wire test exercises finalization with 12 worker sessions.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Partial Merge readiness✅ Ready for maintainer review Keep this maintainer-authored PR open: the bounded workload reduction is deliberate, and inspection found no concrete introduced bug. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe QA test drives a packaged Gateway and paired node through workspace transfer, worker execution, readiness probes, settlement, and a post-restart audit. flowchart LR
A[QA test] --> B[Gateway]
B --> C[Paired node]
C --> D[Worker turns]
D --> E[Workspace settlement]
A --> F[Readiness and connection probes]
F --> B
E --> G[Restart audit]
Technical reviewBest possible solution: Retain a bounded launch-wire regression that completes its readiness, settlement, and restart-audit checks within the existing deadline. Do we have a high-confidence way to reproduce the issue? A GitHub annotation confirms the historical 240-second timeout, but this read-only review did not reproduce it on current main. Is this the best way to solve the issue? Reducing repetitions is a small, owner-directed test-budget adjustment that preserves concurrent finalization checks while accepting less repeated-load coverage. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 82d97d2fada9. Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +2. Total +2 across 1 file. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 October 17, 2026, 1:43 AM ET / 05:43 UTC. |
node-worker-launch-wire ran three 12-turn finalization load waves and reached its post-restart audit at ~237 s, timing out at the 240 s test budget and reddening unrelated PRs' changed-test shards. One wave keeps peak concurrency, all readiness samples and assertions; the file now finishes in ~117 s in CI. The original SessionActorStaleVersionError was fixed by openclaw#169107. Fixes openclaw#169095
Fixes #169095
What Problem This Solves
Fixes unrelated PRs failing the node-worker launch-wire test when repeated finalization load consumes the time needed for its post-restart audit.
User Impact
No product behavior changes. PRs retain gateway-push transfer/reconciliation, permission, capability negotiation, readiness-under-load, and audit-persistence coverage within the existing test timeout.
Why This Change Was Made
Reduce the finalization load from three waves to one wave of the same 12 concurrent turns. One wave is the minimum nonempty workload that exercises the existing load assertions: at least 12 readiness samples, successful responses, p95/max latency bounds, a fresh connection during finalization, and final completion plus workspace settlement for every run. Keep all assertions and the 240-second timeout; the later waves only repeat the same contract. The baseline transfer, large workspace inventory, permission checks, legacy-capability reconnect, and restart audit remain unchanged.
The stale actor-admission bug was already repaired by #169107 (
ef6747c362b) andf8ea55fcf7a. The cited later failure completed all 36 load turns and timed out in the final audit, so changing product admission would not address it. This bounded workload reduction avoids introducing a second fixture or moving core wire coverage out of PR CI. The real Gateway/node wire composition proves bundle launch, transfer, reconnect, and post-restart audit behavior that unit-owner tests cannot replace. Production delta: zero; test delta: three added lines, one removed line.Evidence
Before: checks-node-changed-10, job 117245372584, PR #174768. Test deadline reached at 240.021 s; Vitest file wall time 365.06 s including startup and cleanup.
Phase timings inferred from the emitted markers:
The first wave alone retained 20.488 s of finalization sampling (first upload at 117.746 s through completion at 138.234 s); the minimum of 12 samples remains enforced. The removed waves consumed 75.015 s in that run. Subtracting those repeated phases projects about 165 s at the same timeout point; this is a budget estimate, not a measured after result.
After: checks-node-changed-2, job 117318756358, head
6198790fa57c38191cbced381f2465709ecaf00c, selected and executed this test. It failed during the unchanged permission turn at 37.475 s, before the load phase, because remote exec could not findbundles/config/sessions/session-transcript.worker.mjs. The expected approval-required response was therefore absent. Vitest reported 82.91 s file wall time; this is an early-failure measurement, not evidence of the workload saving. A successful after-runtime comparison remains blocked by that independent worker-bundle failure. The permission assertion is unchanged; no rerun or unrelated packaging fix is included. The other changed-test shards and the changed-boundary shard passed.Local: formatting,
git diff --check, and type-aware lint (node scripts/run-oxlint.mjs --tsconfig test/tsconfig/tsconfig.test.root.json test/e2e/qa-lab/runtime/node-worker-launch-wire.e2e.test.ts) pass. Independent review: no actionable findings through P2. Local E2E execution is intentionally deferred to PR CI on the overloaded host, as authorized by the work order.