Skip to content

test: make full-suite fixtures portable across runtimes - #148247

Merged
steipete merged 4 commits into
mainfrom
codex/runtime-test-portability
Sep 14, 2026
Merged

steipete merged 4 commits into
mainfrom
codex/runtime-test-portability

Conversation

@steipete

@steipete steipete commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

A direct local full-suite run under Bun exposed test-harness assumptions that do not represent product failures:

  • the 647-file unit-src project stayed in one worker process for more than 20 minutes and intermittently surfaced a late Vitest mock-transform source-position error that did not reproduce in focused runs;
  • one prototype-safety test required exactly two proxy trap calls even though Bun produced the same sanitized output with one call;
  • Bash 3.2 printed JSON's \u001b escape literally, so two ANSI retry fixtures failed on macOS under both Node and Bun;
  • the publication-worker fixture expected the test runner executable and a platform-invariant environment, while the workflow explicitly starts Node and macOS injects __CF_USER_TEXT_ENCODING into the child;
  • Node-inspector, FreeBSD Node-install, and supervised process-runner fixtures substituted Bun for their explicitly Node-owned child boundary;
  • the pnpm resolver test used the current runtime's empty-PATH spawn behavior as a reference even though the contract already defines the expected POSIX selection.

Why This Change Was Made

Local full-suite planning now splits the complete unit-src inventory into five balanced processes of 129–130 files, matching the bounded-process strategy already used for unit-fast and tooling tests. This keeps worker lifetime bounded without dropping coverage or changing explicit targeted runs.

The focused fixtures now assert their observable contracts: the prototype trap is observed without pinning an engine-specific count, ANSI bytes use a Bash 3.2-compatible escape, the publication worker resolves the actual Node executable while allowing only the known Darwin-injected environment key, and Node-owned tooling fixtures use the shared Node-tool resolver. The pnpm test directly verifies the expected command result through the production spawn specification.

User Impact

No production behavior changes. Contributors can run the complete local suite under Node or Bun on macOS without false failures from runtime internals, shell version, child-runtime substitution, or platform environment injection.

Evidence

  • The full unit-src inventory remains complete at 647 files, split into five processes sized 130, 130, 129, 129, and 129.
  • Rebuilt Bun unit-src process containing the formerly failing OpenAI mock suite: 130 files passed; 2,047 tests passed; 5 expected skips.
  • Publication observation worker family under Bun: 32 passed; 99 excluded by the focused group filter.
  • Prototype-safety test: 50/50 repeated Bun runs and 50/50 repeated Node runs passed after the assertion repair.
  • Node-owned tooling fixture repairs: 48/48 focused tests passed under Bun and 48/48 passed under Node.
  • The formerly failing unrelated-main PR-merge scenario passes under Bun and Node.
  • The complete PR-merge outcome suite passes 256/256 under Bun after the Node-owned runner fix.
  • ANSI retry fixtures and full retry-helper file pass under Node and Bun.
  • Focused full-suite planning test passes under Node and Bun.
  • pnpm build: passed.
  • node scripts/check-changed.mjs: passed for the initial runtime-portability stack; the expanded changed-file check will run before landing.
  • Fresh P0–P2 autoreview: scoped clean.
  • git diff --check: clean.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S maintainer Maintainer-authored PR labels Sep 14, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete force-pushed the codex/runtime-test-portability branch from 36cc979 to ddd1775 Compare September 14, 2026 13:57
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@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 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

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

ClawSweeper review

What this changes

The PR splits large local test runs into bounded processes and updates fixtures to respect Node-specific child processes, macOS shell behavior, and runtime-independent assertions.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused portability repair absent from fetched main. No blocking correctness finding was identified, and the maintainer-authored, protected PR should remain open.

Priority: P2
Reviewed head: ddd1775f4ba976fbdbcc9fa96a07d91a126050a8

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair using established tooling owners, with preserved behavioral assertions and substantial reported validation.
Proof confidence 🌊 off-meta tidepool Not applicable: The external-contributor proof gate does not apply to this maintainer-authored PR, and no material authority change triggers an exception; reported local Node/Bun runs support the changed planner and fixtures.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor proof gate does not apply to this maintainer-authored PR, and no material authority change triggers an exception; reported local Node/Bun runs support the changed planner and fixtures.
Evidence reviewed 6 items Introduced change and clean checkout: The complete host-pinned merge-base-to-head patch contains fixture repairs and full-suite planning changes. Read-only git diff --check passed, and git status showed a clean checkout.
Full-suite selection remains bounded: The new inventory uses the existing unit predicate, removes unit-fast files and the unit-src configuration’s ACP/security exclusions, and uses the existing balanced splitter. Chunking applies only to expanded, untargeted runs; the execution entrypoint routes explicit targets separately.
Current main still lacks the planner repair: Fetched main has unit-fast and tooling chunking but no unit-src chunking branch. Comparisons also retain the old proxy-call assertion and test-runner executable substitutions; the central change is not already implemented there.
Findings None None.
Security None None.

How this fits together

OpenClaw’s test runner converts test selections into Vitest processes. These changes affect how contributors run the full suite and how fixtures exercise tooling, without changing shipped application behavior.

flowchart TD
  A[Contributor test command] --> B{Explicit test targets?}
  B -->|Yes| C[Existing targeted runner]
  B -->|No| D[Full suite planner]
  D --> E[Bounded unit source chunks]
  E --> F[Vitest processes]
  C --> F
  F --> G[Portable tooling fixtures]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +45. Total +45 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 9 67 22 +45
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 67 22 +45

Review metrics

None.

Technical review

Best possible solution:

Keep test selection with the existing planner and use explicit Node boundaries where fixtures exercise Node-owned behavior.

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

No complete high-confidence reproduction was established here: source supports the runtime-substitution and assertion mismatches, but the intermittent long-running Bun failure was not reproduced in this read-only review.

Is this the best way to solve the issue?

Yes: the patch reuses the existing chunking and Node-resolution owners while retaining meaningful output and failure assertions.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This addresses concrete contributor test-suite failures with a limited tooling-only impact.
  • 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 external-contributor proof gate does not apply to this maintainer-authored PR, and no material authority change triggers an exception; reported local Node/Bun runs support the changed planner and fixtures.

Label justifications:

  • P2: This addresses concrete contributor test-suite failures with a limited tooling-only impact.
  • 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 external-contributor proof gate does not apply to this maintainer-authored PR, and no material authority change triggers an exception; reported local Node/Bun runs support the changed planner and fixtures.

Evidence

What I checked:

  • Introduced change and clean checkout: The complete host-pinned merge-base-to-head patch contains fixture repairs and full-suite planning changes. Read-only git diff --check passed, and git status showed a clean checkout. (ddd1775f4ba9)
  • Full-suite selection remains bounded: The new inventory uses the existing unit predicate, removes unit-fast files and the unit-src configuration’s ACP/security exclusions, and uses the existing balanced splitter. Chunking applies only to expanded, untargeted runs; the execution entrypoint routes explicit targets separately. (scripts/test-projects.test-support.mts:1064, ddd1775f4ba9)
  • Current main still lacks the planner repair: Fetched main has unit-fast and tooling chunking but no unit-src chunking branch. Comparisons also retain the old proxy-call assertion and test-runner executable substitutions; the central change is not already implemented there. (scripts/test-projects.test-support.mts, 10d67c803047)
  • Existing Node-tool owner and routing history: Current-main history and GitHub commit metadata identify an earlier addition of the shared Node-tool resolver by steipete. The patch reuses that established helper. Deeper local blame traversal encountered unavailable objects, so no additional introduction claims are made. (test/helpers/node-toolchain.ts:6, e024b63672f8)
  • Assertions preserve observable contracts: The trajectory test retains sanitized-output and original-prototype checks. The pnpm fixture still executes the production spawn specification and checks exit status, argument output, and stderr. Publication assertions retain exact environment-key checking with one Darwin-specific addition; the workflow launches its admission owner with Node. (test/scripts/full-release-publication-admission.test.ts:1184, ddd1775f4ba9)
  • Captured validation and discussion: The supplied body reports 647 files distributed across five processes, a passing 130-file Bun chunk, repeated Node/Bun prototype checks, 48 focused tooling tests on each runtime, and 256 passing Bun merge-outcome tests. These are contributor-reported results, not reviewer executions. The two human comments request re-review and introduce no contrary disposition. (ddd1775f4ba9)

Likely related people:

  • Peter Steinberger: Raw commit e024b63 adds test/helpers/node-toolchain.ts:6 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e024b63672f8; files: test/helpers/node-toolchain.ts)

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 09c6453 into main Sep 14, 2026
106 checks passed
@steipete
steipete deleted the codex/runtime-test-portability branch September 14, 2026 16:41
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 14, 2026
* commit '3c08384584f57787a26da9998488233fc15ccf7e': (122 commits)
  fix(agents): keep tool result summaries when middleware details exceed shape limits (#147805)
  test: make full-suite fixtures portable across runtimes (#148247)
  refactor(qa): share unknown confidence results (#148200)
  chore(android): remove unused test dependencies and duplicate Wear settings (#148231)
  test: reuse compiled preflight in startup fixtures (#148330)
  test(wizard): route recovery integration through database forks (#148337)
  refactor(plugins): simplify provider auth patch recursion (#147933)
  fix(cli): drain failed web capability output (#148234)
  refactor(android): remove unused production helpers (#148233)
  fix(plugins): scope feed integrity to hosted ClawHub (#148220)
  test(qa): compare Telegram entities semantically (#148219)
  test(qa): recognize native Slack exec progress rows (#148217)
  test(cron): distinguish repeated delivery incidents (#148151)
  test(qa): preserve restart command ownership (#148218)
  test(qa): isolate bundled skill CLI gateway state (#148150)
  test(qa): align process lifecycle contracts (#148149)
  improve(media): reduce metadata fetched during orphan cleanup (#148244)
  fix(matrix): retain sync state runtime for deferred persistence (#148152)
  test: deduplicate gateway watch exit fixtures (#148237)
  refactor(cli): derive daemon status contract from gatherer (#148108)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 15, 2026
)

* test: make runtime portability fixtures deterministic

* test: bound cross-runtime suite workers

* docs(test): explain unit-src process bound

* test: keep Node-owned tooling fixtures on Node
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. scripts Repository scripts size: S 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