Skip to content

fix(test): keep worker launch-wire proof within its timeout - #175147

Merged
steipete merged 2 commits into
mainfrom
steipete/cs-169095-1017
Oct 17, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/cs-169095-1017

Conversation

@steipete

@steipete steipete commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

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) and f8ea55fcf7a. 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:

Phase Seconds
Provider, Gateway, and node startup 20.288
Baseline transfer/reconciliation, audit, and permissions 41.686
Legacy capability negotiation and reconnect 7.265
Load workspace creation and dispatch 18.118
Load wave 1 50.877
Load wave 2 33.414
Load wave 3 41.601
Final settlement, node shutdown, and Gateway restart 23.624
Post-restart audit before timeout 3.148

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 find bundles/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.

@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T06:09:05.038471Z b1a151d New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 17, 2026
@clawsweeper

clawsweeper Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: It runs 36 load turns and opens three fresh control connections.
  • After: It runs 12 load turns and opens one fresh control connection.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and owner-directed, but its runtime saving remains an estimate because the supplied run never reaches the changed phase.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only PR is outside the ordinary contributor proof gate; its supplied exact-head CI run stops at the unchanged permission check before exercising the changed workload.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Partial
User problem: Unrelated PRs encounter a launch-wire test timeout before its restart audit finishes.
Reason: The maintainer author explicitly chooses this bounded workload reduction; it addresses the timeout concern but does not repair the linked issue's stale-admission defect.

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
Reviewed head: 6198790fa57c38191cbced381f2465709ecaf00c

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No successful after-change run reaches the single load wave and completes the post-restart audit within 240 seconds.
Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Repeated worker finalization load changes intended behavior with a stated reason (2d3612d: The original readiness regression used 12 workers across three reused waves, latency thresholds, and a fresh authenticated connection during each wave.)

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 32af0c6 adds test/e2e/qa-lab/runtime/node-worker-launch-wire.e2e.test.ts:705 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 32af0c610d6a; files: test/e2e/qa-lab/runtime/node-worker-launch-wire.e2e.test.ts)

PR surface

Tests +2. Total +2 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 3 1 +2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 3 1 +2

Review metrics

Metric Value Why it matters
Finalization workload 36 to 12 turns; 3 to 1 fresh connections This is the deliberate coverage-versus-runtime tradeoff; concurrency remains 12.

Labels

Label changes:

  • add P2: The change addresses a confirmed CI test timeout with limited blast radius and no production behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: The change addresses a confirmed CI test timeout with limited blast radius and no production behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Obtain a completed run covering the reduced load phase and post-restart audit once the earlier worker-bundle failure is resolved.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 17, 2026, 1:43 AM ET / 05:43 UTC.

@steipete
steipete merged commit 6799aea into main Oct 17, 2026
71 checks passed
@steipete
steipete deleted the steipete/cs-169095-1017 branch October 17, 2026 06:19
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 18, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: node-worker-launch-wire e2e fails on main: transcript persistence rejected with SessionActorStaleVersionError

1 participant