Skip to content

test(tooling): preserve Node and terminal fixture ownership under Bun - #152187

Merged
steipete merged 1 commit into
mainfrom
codex/tooling-node-path-fixtures
Sep 18, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/tooling-node-path-fixtures

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Bun-hosted release-admission and remote-runner fixtures inherit Bun's node shim where the simulated workflow expects Node. Required preloads then do not execute, breaking cancellation receipts and receiver checks. Three terminal cases also call the native PTY package directly instead of OpenClaw's existing terminal owner.

Why This Change Was Made

Put the existing verified Node directory after each fixture's fake command directory in four PATH values. Keep the outer Bun process on Bun. Route the pnpm terminal cases through the existing spawnTerminalPty owner, retaining real terminal input, process IDs, cancellation signals, exit results, and cleanup.

No production, workflow, dependency, authorization, deadline, or assertion changes. No release is performed by these simulated workflow tests.

Evidence

  • Both complete files pass under Node and verified custom Bun v14: 473 passed and three existing platform skips per runtime.
  • Terminal-owner suites pass 23 cases with five existing platform skips under each runtime. All three affected pnpm PTY cases also pass in a focused Bun run.
  • Process observations distinguish the Bun Vitest host from the intended Node workflow and PTY workers.
  • Changed-file checks and fresh independent P0–P2 review pass. Failed fixture remnants were cleaned only after confirming no live writers and retaining their diagnostic evidence.

Keep simulated workflow and preload workers on verified Node while the test runner remains on its selected runtime. Reuse the existing PTY owner for real pnpm signal and cleanup coverage.
@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 22:01
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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, 6:04 PM ET / 22:04 UTC.

ClawSweeper review

What this changes

The PR makes simulated workflow workers select verified Node and routes terminal cancellation tests through OpenClaw’s shared terminal helper when tests run under Bun.

Merge readiness

✅ Ready for maintainer review

The fixture repair remains useful on current main. No introduced correctness or security defect was found, and the maintainer-owned PR should proceed through normal review.

Priority: P2
Reviewed head: 03555dbb07dcd0a90719c97ba37b2809de7be80d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair reuses established runtime owners and preserves meaningful assertions, with reported cross-runtime validation.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored test repair is exempt from the external-contributor proof gate; the body reports Node/Bun fixture and terminal runs, which were not independently rerun.
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 the external-contributor proof gate; the body reports Node/Bun fixture and terminal runs, which were not independently rerun.
Evidence reviewed 8 items Introduced scope: The verified merge-base-to-head delta changes only runtime selection and terminal construction in two existing test files; assertions, deadlines, production code, workflows, and dependencies are unchanged. Diff whitespace validation passed.
Current main still needs the fixture repair: Pinned current-main source still inherits ambient Node resolution and directly calls node-pty in the cancellation fixture. The unavailable local blob was successfully inspected through GitHub’s contents endpoint.
Release-admission runtime selection: Current main retains the ambient PATH in the workflow fixture. The branch inserts the directory of the existing verified Node executable after fake commands, preserving fixture interception.
Findings None None.
Security None None.

How this fits together

These tooling tests exercise remote-runner cleanup and release-admission checks using isolated fixtures. Their runtime selection determines whether preloads, terminal signals, and cleanup receipts behave as intended.

flowchart TD
  A[Node or Bun test runner] --> B[Isolated tooling fixtures]
  B --> C[Fake commands first on PATH]
  C --> D[Verified Node workflow workers]
  B --> E[Shared terminal helper]
  E --> F[Node-owned terminal under Bun]
  D --> G[Admission and cleanup assertions]
  F --> G
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +15. Total +15 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 24 9 +15
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 24 9 +15

Review metrics

None.

Technical review

Best possible solution:

Keep fixture commands ahead of verified Node on PATH and use the existing terminal owner while preserving cancellation and cleanup assertions.

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

Yes, source establishes the affected path: Bun-hosted fixtures inherit shim-sensitive PATH values and bypass the existing Bun-aware terminal owner. Tests were not executed during this read-only review.

Is this the best way to solve the issue?

Yes. Reusing the verified Node resolver and shared terminal owner fixes fixture runtime selection without adding another implementation or relaxing assertions.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This repairs bounded tooling-test failures under Bun without changing shipped product 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: The maintainer-authored test repair is exempt from the external-contributor proof gate; the body reports Node/Bun fixture and terminal runs, which were not independently rerun.

Label justifications:

  • P2: This repairs bounded tooling-test failures under Bun without changing shipped product 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 the external-contributor proof gate; the body reports Node/Bun fixture and terminal runs, which were not independently rerun.

Evidence

What I checked:

  • Introduced scope: The verified merge-base-to-head delta changes only runtime selection and terminal construction in two existing test files; assertions, deadlines, production code, workflows, and dependencies are unchanged. Diff whitespace validation passed. (03555dbb07dc)
  • Current main still needs the fixture repair: Pinned current-main source still inherits ambient Node resolution and directly calls node-pty in the cancellation fixture. The unavailable local blob was successfully inspected through GitHub’s contents endpoint. (test/scripts/crabbox-wrapper.test.ts:739, dc2b976b5b70)
  • Release-admission runtime selection: Current main retains the ambient PATH in the workflow fixture. The branch inserts the directory of the existing verified Node executable after fake commands, preserving fixture interception. (test/scripts/full-release-publication-admission.test.ts:269, dc2b976b5b70)
  • Existing runtime owners: The Node resolver explicitly probes past Bun shims. The terminal helper already delegates Bun PTYs to a Node worker and preserves input, output, PID, exit, and teardown operations; its blob matches current main. (src/process/terminal-pty.ts:107, 03555dbb07dc)
  • Cancellation assertions remain meaningful: The three pnpm terminal cases retain actual Ctrl-C input, wrapper exit receipts, descendant disappearance, retained diagnostic artifacts, and cleanup checks. The shared helper replaces terminal construction without weakening these assertions. (test/scripts/crabbox-wrapper.test.ts:826, 03555dbb07dc)
  • Area history: Current-main history identifies Peter Steinberger’s prior terminal and Node-fixture work. GitHub commit metadata maps the terminal change to steipete; its patch adds the Bun delegation branch, and the raw recorded parent lacks that branch. (src/process/terminal-pty.ts:107, b42045004ffc)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; 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.

@steipete
steipete merged commit 19a209e into main Sep 18, 2026
123 checks passed
@steipete
steipete deleted the codex/tooling-node-path-fixtures branch September 18, 2026 22:34
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 18, 2026
…pr-149099-main-20260918

* commit '795e460278d4f8f41545dc8b4a66da1d12defd90': (1902 commits)
  refactor(slack): share Markdown preparation (#149129)
  fix(tooling): release completed PR operations with exited loaders (#152209)
  fix(release): allow stable npm bootstrap under an operator soak waiver (#152206)
  fix(daemon): avoid false restart timeouts during slow startup (#151387)
  feat: read agent documents from a host-owned workspace (#150584)
  improve(startup): skip redundant single-agent directory checks (#152192)
  test(ui): await board widget readiness before size reports (#152198)
  perf(browser): move dashboard event discovery to SQLite worker (#151952)
  improve(auth): reduce pauses during concurrent credential reads (#152140)
  improve(ui): load older chat history in smaller pages (#152093)
  fix(release): reject incomplete legacy npm install trees (#152186)
  refactor: share current-conversation binding row serialization (#152134)
  test(tooling): preserve Node and terminal fixture ownership under Bun (#152187)
  fix(sqlite): service worker admission through retained path aliases (#152190)
  improve: reduce CPU work for long CLI reasoning streams (#152191)
  chore(ui): refresh control ui locales (#152196)
  test(subagents): align lifecycle retries with durable completion owners (#152184)
  perf(gateway): defer participant maps for owned sessions (#152097)
  refactor(stream): share auxiliary queue overflow handling (#149282)
  fix(test): execute CLI fixture preloads on Node and Bun (#152076)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 19, 2026
…openclaw#152187)

Keep simulated workflow and preload workers on verified Node while the test runner remains on its selected runtime. Reuse the existing PTY owner for real pnpm signal and cleanup coverage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. 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