Skip to content

test: scale container daemon regression deadlines - #132406

Merged
steipete merged 2 commits into
mainfrom
codex/test-container-deadline-execution
Aug 29, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/test-container-deadline-execution

Conversation

@steipete

@steipete steipete commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Two container-supervisor regressions spend six and thirty seconds exercising daemon revalidation deadlines. The fake engine already controls response latency, so waiting at production scale adds wall time without strengthening the process-lifecycle coverage.

Why This Change Was Made

Scale both the fake daemon response and its matching runExec deadline by five. The spy calls the original executor and matches only this fixture's info --format {{.ID}} command. Process creation, Execa cancellation, signal handling, error diagnostics, journal persistence, and cleanup remain real.

The healthy response retains 4.8 seconds of startup headroom. The regression remains distinguishable: the old five-second deadline becomes one second and still loses to the scaled six-second response. Both cases also assert that production requested its unchanged thirty-second budget.

User Impact

The full twenty-case file fell from 43.06s to 14.36s locally. No production, sharding, worker-count, selection, or configuration changes. Test/support LOC +41/-5; production +0/-0.

Evidence

  • Before and after: all twenty container cases passed. The final sibling run passed all 82 tests across container, general supervisor, lifetime, recovery, and admission suites.
  • Command: node scripts/run-vitest.mjs src/node-host/node-worker-supervisor.container.test.ts src/node-host/node-worker-supervisor.test.ts src/node-host/node-worker-supervisor.lifetime.test.ts src/node-host/node-worker-supervisor.recovery.test.ts src/node-host/node-worker-supervisor.admission.test.ts.
  • Negative probe: restoring the old five-second production revalidation deadline made the healthy-daemon case fail its original running-state assertion (received failed). Original production bytes were restored before the final passing run.
  • The unresponsive-daemon case still exercises a real subprocess timeout and checks its six-second diagnostic and durable failed state.
  • Independent source review and fresh Codex autoreview passed. Execa's installed timeout/kill contract and the engine, lifecycle, supervisor, launch transport, and executor owners were inspected directly.
  • This is isolated real-process proof with a fake container executable, not a live Docker-daemon claim. Linux changed-file checks and exact-head hosted CI must pass before landing.

CI Integration Repair

The first CI run exposed two stale gateway-send assertions when this PR was merged with main's account-resolution change from #132226. The tested merge was 1e92368db1959543a7d8fafdbb86ed7ff1fcf23f, combining this PR's old head with c3ff7f98d58e. Those requests omit account selection; canonical local delivery now correctly receives the plugin's resolved default account.

After rebasing onto current main, the same two failures reproduced locally. The existing table now expects the resolved default at the delivery boundary while preserving omitted-account inputs and the explicit secondary case. No production behavior changes. All 185 tests then passed across container supervision, the complete gateway-send suite, account routing, and core send. Fresh Codex reviews passed for the container branch and assertion correction. The refreshed exact-head CI and changed-file gates must pass before landing.

Refreshed gates passed: exact-head CI, Linux changed-file checks (wrapper exit 0; Testbox stopped). No ClawSweeper review comment or rank-up moves were present at the final pre-landing read.

@steipete steipete self-assigned this Aug 29, 2026
@clawsweeper

clawsweeper Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 29, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 29, 2026
@clawsweeper

clawsweeper Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 29, 2026, 1:45 AM ET / 05:45 UTC.

ClawSweeper review

What this changes

The branch speeds two Docker container-supervisor regression cases by scaling the fake engine delay and only that identity-probe executor timeout while asserting the real requested timeout remains 30 seconds.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open for normal maintainer handling: the focused test-only change preserves the production 30-second revalidation budget and introduces no concrete correctness or security defect. Exact-head checks remain in progress, and the latest ClawSweeper review body could not be retrieved during this review.

Priority: P3
Reviewed head: e97ac789d098dcd59e4bc7e698ee75eba1dd27a2
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-aligned test optimization with no introduced correctness or security finding; merge readiness still depends on the pending exact-head gates and latest review instructions.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored, test-only PR is exempt from the external-contributor real-behavior gate; the supplied focused real-subprocess regression runs are supplemental validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored, test-only PR is exempt from the external-contributor real-behavior gate; the supplied focused real-subprocess regression runs are supplemental validation.
Evidence reviewed 5 items Introduced test helper: The introduced helper narrows interception to this fixture's Docker identity-probe command, records the unmodified requested budget, and delegates all other executor calls to the original implementation.
Production timeout owner: Current main selects the 30-second revalidation timeout only for a pinned engine and passes it to Docker's identity probe before container creation; the PR does not change this production path.
Launch-path caller: The launch transport invokes container creation after its WebSocket and browser-assignment boundary checks, so the changed tests exercise the actual container launch entrypoint rather than a test-only duplicate.
Findings None None.
Security None None.

How this fits together

The node-worker supervisor creates a containerized worker only after revalidating the pinned container daemon identity. This fixture supplies a fake Docker executable to exercise successful launch and timeout failure through the normal subprocess and lifecycle paths.

flowchart LR
  A[Worker launch request] --> B[Node-worker supervisor]
  B --> C[Container launch transport]
  C --> D[Daemon identity revalidation]
  D --> E[Fixture Docker executable]
  E --> F[Running or failed lifecycle receipt]
Loading

Decision needed

Question Recommendation
Once exact-head checks finish and the latest ClawSweeper review is visible, should this maintainer-owned test-runtime optimization land unchanged? Land after current gates: Merge the focused test-only optimization after exact-head checks pass and any latest review rank-up moves are addressed or explicitly skipped.

Why: The PR is marked maintainer and is attributed to a repository member, so automatic cleanup is not appropriate despite the absence of a code finding.

Before merge

  • Resolve merge risk (P1) - Exact-head hosted checks are still running, and the unavailable latest ClawSweeper review comment may contain rank-up moves that must be addressed or explicitly skipped before landing.
Agent review details

Security

None.

PR surface

Tests +36. Total +36 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 40 4 +36
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 40 4 +36

Review metrics

Metric Value Why it matters
Production versus test LOC production +0/-0; test support +40/-4 All introduced lines are in one colocated regression-test fixture; no runtime, configuration, or timeout default changes.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the fixture-local scaling and production-budget assertions, then land only after the exact-head checks pass and the latest ClawSweeper review instructions are accounted for.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the fixture-local scaling and production-budget assertions, then land only after the exact-head checks pass and the latest ClawSweeper review instructions are accounted for.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR is a test-runtime optimization, not a report of a user-facing defect; its supplied evidence describes focused passing and negative regression runs.

Is this the best way to solve the issue?

Yes: scaling both the fixture response and only the matched executor deadline preserves the meaningful timeout ordering while avoiding production-scale sleeps, and the new assertions protect the 30-second production budget.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 9b1c4bb3589d.

Labels

Label changes:

  • add P3: This PR improves internal regression-test duration without changing user-facing runtime behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored, test-only PR is exempt from the external-contributor real-behavior gate; the supplied focused real-subprocess regression runs are supplemental validation.

Label justifications:

  • P3: This PR improves internal regression-test duration without changing user-facing runtime behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored, test-only PR is exempt from the external-contributor real-behavior gate; the supplied focused real-subprocess regression runs are supplemental validation.

Evidence

What I checked:

  • Introduced test helper: The introduced helper narrows interception to this fixture's Docker identity-probe command, records the unmodified requested budget, and delegates all other executor calls to the original implementation. (src/node-host/node-worker-supervisor.container.test.ts:156, e97ac789d098)
  • Production timeout owner: Current main selects the 30-second revalidation timeout only for a pinned engine and passes it to Docker's identity probe before container creation; the PR does not change this production path. (src/node-host/node-worker-container-engine.ts:101, 9b1c4bb3589d)
  • Launch-path caller: The launch transport invokes container creation after its WebSocket and browser-assignment boundary checks, so the changed tests exercise the actual container launch entrypoint rather than a test-only duplicate. (src/node-host/node-worker-launch-transport.ts:104, 9396ea20296b)
  • Feature provenance: The container engine and its 30-second deadline date to the current-main feature introduction; blame attributes the defining timeout lines to this commit. (src/node-host/node-worker-container-engine.ts:31, 9396ea20296b)
  • Prior review context unavailable: The supplied timeline identifies a later ClawSweeper comment, but its body was filtered from the snapshot and the read-only GitHub API request failed with a connectivity error; its Rank-up moves should be checked before landing.

Likely related people:

  • steipete: Current history attributes the container-engine introduction and defining revalidation deadline to steipete, in addition to the current test-maintenance branch. (role: feature introducer and recent area contributor; confidence: high; commits: 9396ea20296b, e97ac789d098; files: src/node-host/node-worker-container-engine.ts, src/node-host/node-worker-supervisor.container.test.ts)

Rank-up moves

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

  • Confirm the pending exact-head checks pass and read the latest ClawSweeper comment's Rank-up moves before landing.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete force-pushed the codex/test-container-deadline-execution branch from e97ac78 to b1fd196 Compare August 29, 2026 05:55
@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Aug 29, 2026
@steipete
steipete merged commit c18ea58 into main Aug 29, 2026
178 of 180 checks passed
@steipete
steipete deleted the codex/test-container-deadline-execution branch August 29, 2026 06:12
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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.

1 participant