Skip to content

fix(qa): restore Bun evidence fixture execution - #149164

Merged
steipete merged 1 commit into
mainfrom
codex/qa-bun-version-fixtures
Sep 15, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa-bun-version-fixtures

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes QA runtime evidence tests failing during temporary workspace allocation when they simulate Bun.

User Impact

This is a test-only change with no user-visible behavior change. The existing evidence and explicit-anchor checks can complete under the simulated runtime.

Why This Change Was Made

Spreading process into a replacement object drops inherited EventEmitter methods, including the once method used by temporary-file cleanup. A scoped test helper overrides only process.versions.bun and restores the original property descriptor or absence when the test scope exits.

Evidence

  • Reproduced the original process.once is not a function failure through the existing suite-evidence test before changing it.
  • All 19 tests across the three affected fixture files pass, preserving real temporary workspace allocation, runtime identity, receipts, and explicit anchors.
  • Node 26.8.2 and Bun 1.4.2 probes verify native process/method identity and exact restoration after success and thrown errors.
  • Independent review found no actionable P0–P2 findings.
  • Selected formatting, Doctor contract and boundary checks, dead-code scans, and final lint pass. Extension-test typechecking remains blocked by six pre-existing Crabline manifest errors: the local checkout pins 0.1.24 but resolves an installed 0.1.21. No dependency or production files are changed here.

@clawsweeper

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

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

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 10:35 AM ET / 14:35 UTC.

ClawSweeper review

What this changes

The PR changes QA tests to simulate Bun by temporarily overriding its version property while preserving native process methods and restoring the original property afterward.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused repair: current main still replaces the native process object in these fixtures. No actionable patch defects were found, and the related Doctor PR explicitly depends on this prerequisite.

Priority: P2
Reviewed head: d7b731f0255d864b03edaffd67d4aa3621af4eb1

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow, maintainable fixture repair with preserved assertions, reported focused validation, and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied repository state identifies a member-authored test-only repair, so the external-contributor proof gate does not apply; the body reports fixture execution and native runtime restoration probes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied repository state identifies a member-authored test-only repair, so the external-contributor proof gate does not apply; the body reports fixture execution and native runtime restoration probes.
Evidence reviewed 6 items Introduced repair and restoration: The complete introduced patch changes only three existing test fixtures and their shared test helper. The helper preserves process identity and restores either the original Bun property descriptor or its absence through scoped disposal; existing assertions remain intact. The introduced diff passes git diff --check.
Repair still needed on inspected main: All three affected fixtures on fetched main still use vi.stubGlobal with a spread copy of process. The release contents lookup for suite-evidence.test.ts at v2026.9.4 returned 404, so it provides no evidence of a shipped equivalent repair.
Actual implementation and dependency boundary: Runtime capture reads process.versions.bun directly. The suite fixture allocates through the local temporary-directory harness, which reaches @openclaw/fs-safe/temp through the public SDK. This is an affirmative fs-safe dependency signal; the injected matrix cell does not require the Codex harness or protocol.
Findings None None.
Security None None.

How this fits together

QA Lab records the runtime and source identity associated with test results and evidence receipts. These fixtures simulate Node and Bun while allocating temporary workspaces and checking that recorded identities remain accurate.

flowchart LR
  A[Node or Bun fixture] --> B[Scoped version override]
  B --> C[Native process preserved]
  C --> D[Temporary workspace allocation]
  B --> E[Runtime identity capture]
  D --> F[Evidence and receipt assertions]
  E --> F
  F --> G[Restore original version property]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +14. Total +14 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 4 21 7 +14
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 21 7 +14

Review metrics

None.

Technical review

Best possible solution:

Keep runtime simulation confined to the version property so evidence tests exercise real workspace allocation without replacing process infrastructure.

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

Yes, source establishes the path: the suite fixture replaces process before temporary-workspace allocation reaches the dependency's process.once call. The contributor reports a failing pre-fix run; this review did not execute tests.

Is this the best way to solve the issue?

Yes. Overriding only the runtime discriminator repairs the fixture at its producer, preserves native methods, and restores state without weakening evidence assertions or changing production code.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This fixes a concrete QA fixture failure that obstructs validation of active work, with no production behavior change.
  • 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 supplied repository state identifies a member-authored test-only repair, so the external-contributor proof gate does not apply; the body reports fixture execution and native runtime restoration probes.

Evidence

What I checked:

  • Introduced repair and restoration: The complete introduced patch changes only three existing test fixtures and their shared test helper. The helper preserves process identity and restores either the original Bun property descriptor or its absence through scoped disposal; existing assertions remain intact. The introduced diff passes git diff --check. (extensions/qa-lab/src/runtime-version.test-support.ts:1, d7b731f0255d)
  • Repair still needed on inspected main: All three affected fixtures on fetched main still use vi.stubGlobal with a spread copy of process. The release contents lookup for suite-evidence.test.ts at v2026.9.4 returned 404, so it provides no evidence of a shipped equivalent repair. (extensions/qa-lab/src/suite-evidence.test.ts:55, 4c0c41f800f6)
  • Actual implementation and dependency boundary: Runtime capture reads process.versions.bun directly. The suite fixture allocates through the local temporary-directory harness, which reaches @openclaw/fs-safe/temp through the public SDK. This is an affirmative fs-safe dependency signal; the injected matrix cell does not require the Codex harness or protocol. (extensions/qa-lab/src/evidence-environment.ts:87, d7b731f0255d)
  • Pinned dependency confirms cleanup trigger: Verified repository ownership through the GitHub repository endpoint. At v0.11.0, matching OpenClaw's pinned dependency, temporary-path exit registration calls process.once. Preserving the native process object therefore directly addresses the reported allocation failure. (src/temp-cleanup.ts:73, 5209566a355f)
  • Feature-history routing: Current-main history connects the evidence fixtures and runtime capture to commit 9ccba21. GitHub identifies its author as vincentkoc, and its file patch adds the runtime-capture function. Some local parent-tree and blame reads failed because objects were unavailable; GitHub supplied the relevant commit patch. (extensions/qa-lab/src/evidence-environment.ts:88, 9ccba21473fc)
  • Validation and related work: The captured PR body reports reproducing process.once failure before the repair, 19 passing affected tests afterward, and Node/Bun restoration probes. These runs were not independently executed in this read-only review. fix(state): keep legacy catalog repair in Doctor #148834 explicitly identifies this repair as its test prerequisite and says it should land first; it is not a replacement candidate. (d7b731f0255d)

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 067c75b into main Sep 15, 2026
174 checks passed
@steipete
steipete deleted the codex/qa-bun-version-fixtures branch September 15, 2026 15:18
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Sep 15, 2026
Repair red main #35 by using the existing evidence-only API in the native
child producer fixture and including the stored runner failure diagnostic.
Preserve the real subprocess, 30-second command budget, and receipt checks.

Refs #149157. Adopt only the child-bundle fixture change from the original
contributor revision; the process-identity repair already landed in #149164.

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 16, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 16, 2026
…#149243)

Repair red main openclaw#35 by using the existing evidence-only API in the native
child producer fixture and including the stored runner failure diagnostic.
Preserve the real subprocess, 30-second command budget, and receipt checks.

Refs openclaw#149157. Adopt only the child-bundle fixture change from the original
contributor revision; the process-identity repair already landed in openclaw#149164.

Co-authored-by: Vincent Koc <[email protected]>
Finn763 added a commit to Finn763/openclaw that referenced this pull request Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab 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