Skip to content

fix(test): select Node for built runtime recovery fixtures - #152162

Merged
steipete merged 1 commit into
mainfrom
codex/built-runtime-node-owner
Sep 18, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/built-runtime-node-owner

Conversation

@steipete

@steipete steipete commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Built CLI Node-recovery tests launch Bun under a Bun-hosted runner, so spoofing a Node version cannot exercise the intended Node admission and recovery paths.

User Impact

No production behavior changes. The recovery fixture now selects verified Node, while the shared instance helper keeps its existing bare node default for every caller that does not request an executable.

Why This Change Was Made

Add a narrow optional executable to the existing managed CLI test operation and use the existing Node resolver at both recovery-fixture process boundaries. Keep the legacy preload, reexec arguments, environment, deadlines, and cleanup unchanged.

Evidence

  • Before: Node passes all seven cases; the six safely exercised Bun cases pass two and fail four. A separate marker probe confirms Bun ignores the legacy environment preload; the uninstrumented Doctor before-case was not run against shared build artifacts.
  • After: all seven cases pass under Node and v14 Bun, including the legacy Doctor preload and exact reexec arguments, against a fresh owned private-QA build.
  • Shared-helper lifecycle controls pass 2/2 and the resolver control passes 1/1 under Node. The initial commands intended for those extra Bun controls selected a Node worker; they are excluded from Bun evidence. The seven-case Bun recovery run above used a verified Bun worker. Build artifacts and lockfile remain unchanged after proof.
  • Full changed-file checks and fresh independent P0–P2 review pass. No production code, dependency, assertion, timeout, or platform gate changed.

@clawsweeper

clawsweeper Bot commented Sep 18, 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.

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Sep 18, 2026
@steipete
steipete marked this pull request as ready for review September 18, 2026 20:55
@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 Sep 18, 2026
@clawsweeper

clawsweeper Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 18, 2026, 5:29 PM ET / 21:29 UTC (Revision 2).

ClawSweeper review

What this changes

The recovery tests explicitly select Node under Bun, using an optional executable override that preserves the shared test helper’s existing default.

Merge readiness

✅ Ready for maintainer review

The fix remains useful: current main and the latest release still use the affected launch paths. No actionable correctness or security findings were identified, and this maintainer-authored PR is protected from automatic closure.

Priority: P3
Reviewed head: c334dec8028ab08266c273bec0136da5f746ef07

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair that reuses the existing resolver, preserves lifecycle behavior, and has relevant reported validation with no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored test repair is exempt from external-contributor proof requirements. Its body reports the changed fixture launches passing all seven cases under Node and verified Bun; production recovery side effects remain instrumented, and no independent execution is claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored test repair is exempt from external-contributor proof requirements. Its body reports the changed fixture launches passing all seven cases under Node and verified Bun; production recovery side effects remain instrumented, and no independent execution is claimed.
Evidence reviewed 7 items Narrow introduced change: The verified merge-base-to-head diff adds an optional executable to the managed CLI operation and uses the existing Node resolver at both recovery-fixture launch sites. Assertions, deadlines, environment construction, and cleanup remain unchanged.
Existing executable-selection owner: resolveTestNodeExecPath delegates to the existing runtime resolver, which preserves process.execPath under Node and probes candidates to reject Bun shims under Bun. The shared CLI operation continues through runManagedCommand with shell disabled and its existing lifecycle handling.
Current-main necessity: Fetched main still launches the six table-driven cases with process.execPath and calls the legacy Doctor fixture without an executable override. The shared helper still selects bare node.
Findings None None.
Security None None.

How this fits together

OpenClaw’s built-CLI recovery tests launch isolated processes to check runtime admission and recovery. Executable selection determines whether their Node-specific preload instrumentation runs and produces meaningful assertions.

flowchart TD
  A[Node or Bun test runner] --> B[Existing Node resolver]
  B --> C[Verified Node executable]
  C --> D[Managed CLI fixture]
  C --> E[Direct CLI subprocess]
  D --> F[Recovery preload and assertions]
  E --> F
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +4. Total +4 across 2 files.

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

Review metrics

None.

Technical review

Best possible solution:

Use the existing Node resolver for these Node-specific fixtures while retaining the shared helper’s default and managed process lifecycle.

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

Yes, from source: under a Bun-hosted runner, current main’s process.execPath selects Bun for fixtures that require Node instrumentation. The body reports matching failures and successful after-fix runs; this review did not execute them.

Is this the best way to solve the issue?

Yes. Reusing the existing resolver at both launch boundaries fixes the fixture mismatch without duplicating discovery logic or changing other callers’ defaults.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against e73121691a63.

Labels

Label justifications:

  • P3: This repairs internal test execution under Bun without changing production 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: The maintainer-authored test repair is exempt from external-contributor proof requirements. Its body reports the changed fixture launches passing all seven cases under Node and verified Bun; production recovery side effects remain instrumented, and no independent execution is claimed.

Evidence

What I checked:

  • Narrow introduced change: The verified merge-base-to-head diff adds an optional executable to the managed CLI operation and uses the existing Node resolver at both recovery-fixture launch sites. Assertions, deadlines, environment construction, and cleanup remain unchanged. (test/helpers/openclaw-test-instance.ts:951, c334dec8028a)
  • Existing executable-selection owner: resolveTestNodeExecPath delegates to the existing runtime resolver, which preserves process.execPath under Node and probes candidates to reject Bun shims under Bun. The shared CLI operation continues through runManagedCommand with shell disabled and its existing lifecycle handling. (src/test-utils/node-process.ts:20, c334dec8028a)
  • Current-main necessity: Fetched main still launches the six table-driven cases with process.execPath and calls the legacy Doctor fixture without an executable override. The shared helper still selects bare node. (test/scripts/node-runtime-recovery.built-cli.e2e.test.ts:129, e73121691a63)
  • Latest-release comparison: The supplied latest release, v2026.9.4, retains the same unqualified managed CLI call and process.execPath launch. This fixture repair is not already present there. (test/scripts/node-runtime-recovery.built-cli.e2e.test.ts:129, 3a9d69db306c)
  • Captured validation and review continuity: The supplied body reports seven passing cases under both Node and a verified Bun worker against a fresh private build, plus Node lifecycle and resolver controls. It explicitly excludes mistakenly Node-hosted controls from Bun evidence. These are contributor-reported results, not reviewer executions. The previous review covered the same head and recorded no findings or published rank-up moves. (c334dec8028a)
  • Area history and routing: Current-main history records repeated shared-fixture maintenance by Peter Steinberger, including port ownership and cleanup work. Resolver history also records prior Node-under-Bun work. Exact historical patch/blame inspection encountered an unavailable object, so no line-introduction attribution is asserted. (test/helpers/openclaw-test-instance.ts, 4ecfae14417e)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-18T21:07:51.734Z sha c334dec :: needs maintainer review before merge. :: none

@steipete
steipete merged commit b617408 into main Sep 18, 2026
198 checks passed
@steipete
steipete deleted the codex/built-runtime-node-owner branch September 18, 2026 21:37
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 18, 2026
…n-20260918-v4

* origin/main: (81 commits)
  fix: retire failed setup plugins without replaying facade initialization (#152026)
  fix(test): select Node for built runtime recovery fixtures (#152162)
  refactor(auth): reuse privately assembled choice groups (#152166)
  fix: preserve chat media delivery and session boundaries (#152079)
  fix: keep stale Stop messages from canceling replacement sessions (#152116)
  improve(plugins): reduce mutable argument handling overhead (#152154)
  fix(scripts): prevent host tooling drift from blocking PR workflows (#152078)
  improve: reduce model capability preparation work (#152128)
  fix: stop marking delivered scheduled reports as failed (#152165)
  fix: start background context maintenance after durable turns (#151936)
  fix(models): avoid ambient state reads during prepared selection (#152119)
  feat: recover abandoned Crabbox source staging (#152006)
  chore(ui): refresh control ui locales (#152098)
  fix(ui): keep cloud startup prompts and progress in chat (#152024)
  fix: report completed subprocess cleanup after cancellation (#152107)
  perf(reply): reuse normalized inbound text (#152110)
  fix(cron): paused future one-shots disappear after Run now (#152126)
  perf(sessions): reuse rows and skip discarded terminal labels (#152109)
  fix(ui): keep keyboard-focused automation controls clear of sticky actions (#152135)
  fix(ui): load remote images in compact activity previews (#152045)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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