Skip to content

refactor(cli): remove unsupported Node 24 cache workaround - #124271

Merged
steipete merged 1 commit into
mainfrom
test/remove-unsupported-node24-cache
Aug 15, 2026
Merged

steipete merged 1 commit into
mainfrom
test/remove-unsupported-node24-cache

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The compile-cache entry path still carried a Windows workaround and tests for Node 24.0–24.14 even though those runtimes are now rejected before compile-cache handling. This left an unreachable production branch, version parser, test-support parameters, and four obsolete tests.

Why This Change Was Made

The early-Node-24 deadlock workaround is removed from src/entry.compile-cache.ts. Compile cache is now enabled for packaged installs unless explicitly disabled, while no-cache respawn remains scoped to source checkouts. The supported-runtime guard and launcher continue rejecting Node 24 before 24.15.

This PR is AI-assisted as part of the maintainer-requested repository test-value audit.

User Impact

No behavior changes on supported runtimes. Unsupported Node 24.0–24.14 installations still fail at the existing runtime floor instead of reaching compile-cache startup logic.

Evidence

  • node scripts/run-vitest.mjs src/entry.compile-cache.test.ts src/infra/runtime-guard.test.ts — 33 passed
  • node scripts/run-vitest.mjs test/openclaw-launcher.e2e.test.ts — 37 passed, 1 skipped; includes real Node 24.14 rejection coverage
  • pnpm build — passed
  • node scripts/check-changed.mjs -- src/entry.compile-cache.ts src/entry.compile-cache.test-support.ts src/entry.compile-cache.test.ts — passed via the documented local fallback; core/test typechecks, lint, dead exports, boundaries, import cycles, and guards were green
  • git diff --check — passed
  • Structured autoreview — clean

Production delta: -34 net lines. Test/test-support delta: -104 net lines. No docs, changelog, schema, protocol, migration, or operator-state change is required.

@clawsweeper

clawsweeper Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review August 15, 2026 20:05
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 15, 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 15, 2026
@clawsweeper

clawsweeper Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 4:12 PM ET / 20:12 UTC.

ClawSweeper review

What this changes

Removes the obsolete Windows-specific compile-cache workaround, version parameters, and tests for Node 24.0–24.14 from the CLI entry cache path.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this maintainer-labeled PR open for normal exact-head CI and maintainer handling. The cleanup is correct: both supported entry paths reject Node 24.0–24.14 before any OpenClaw compile-cache decision, and no blocking patch or security finding was identified.

Priority: P3
Reviewed head: 791f478a6609f40ddb6c2deb9c0949a9d9239fb5

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, net-negative cleanup with preserved runtime-floor coverage and no identified correctness or security defect.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-labeled CLI cleanup is exempt from the external-contributor real-behavior-proof gate; retained launcher-boundary coverage is the relevant evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-labeled CLI cleanup is exempt from the external-contributor real-behavior-proof gate; retained launcher-boundary coverage is the relevant evidence.
Evidence reviewed 7 items Package launcher owns the public entry point: The package exposes the CLI through openclaw.mjs, so its version check is the first OpenClaw-controlled startup decision for installed users.
Unsupported Node is rejected before launcher cache work: The launcher requires Node 24.15+ for the Node 24 line and invokes that guard before its cache respawn and enablement section.
Direct compiled entry preserves the same ordering: The compiled entry calls assertSupportedRuntime before respawnWithoutOpenClawCompileCacheIfNeeded and enableOpenClawCompileCache.
Findings None None.
Security None None.

How this fits together

The package launcher validates a runtime before it imports the compiled CLI, while the compiled entry also validates before cache respawn or enablement. The cache path then either keeps source checkouts cache-free or enables a scoped cache for packaged installs.

flowchart LR
A[CLI command] --> B[Package launcher]
B --> C{Supported Node runtime?}
C -->|No| D[Clear version error]
C -->|Yes| E[Compile-cache setup]
G[Source checkout marker] --> E
E --> F[Compiled CLI runtime]
Loading

Before merge

  • Resolve merge risk (P1) - One exact-head compact CI check is still in progress, so source review alone is not a merge decision.
  • Complete next step (P2) - No repair job is needed; wait for the remaining exact-head CI result and normal maintainer handling.
Agent review details

Security

None.

PR surface

Source -37, Tests -100. Total -137 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 4 41 -37
Tests 1 1 101 -100
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 5 142 -137

Review metrics

Metric Value Why it matters
Production versus test delta production +4/-38 (net -34); tests and test support +1/-104 (net -103) The deletion removes a cache-only compatibility branch while retaining the launcher-level runtime-floor boundary test.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/entry.compile-cache.test.ts, persistent cache schema: src/entry.compile-cache.test.ts, persistent cache schema: src/entry.compile-cache.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep one runtime floor ahead of both launcher and compiled-entry cache setup, then land this deletion once exact-head CI completes green.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep one runtime floor ahead of both launcher and compiled-entry cache setup, then land this deletion once exact-head CI completes green.

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

Not applicable: this PR removes obsolete internal handling; the retained launcher fixture already covers the observable Node 24.14 rejection boundary.

Is this the best way to solve the issue?

Yes: the package launcher and compiled entry each enforce the same unsupported-runtime floor before their cache decisions, making the removed version-specific cache branch unreachable for supported execution.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 8f807ae912d4.

Labels

Label changes:

  • add P3: This is a small, behavior-preserving CLI cleanup for an already unsupported Node range.
  • 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-labeled CLI cleanup is exempt from the external-contributor real-behavior-proof gate; retained launcher-boundary coverage is the relevant evidence.

Label justifications:

  • P3: This is a small, behavior-preserving CLI cleanup for an already unsupported Node range.
  • 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-labeled CLI cleanup is exempt from the external-contributor real-behavior-proof gate; retained launcher-boundary coverage is the relevant evidence.

Evidence

What I checked:

  • Package launcher owns the public entry point: The package exposes the CLI through openclaw.mjs, so its version check is the first OpenClaw-controlled startup decision for installed users. (package.json:22, 8f807ae912d4)
  • Unsupported Node is rejected before launcher cache work: The launcher requires Node 24.15+ for the Node 24 line and invokes that guard before its cache respawn and enablement section. (openclaw.mjs:83, 8f807ae912d4)
  • Direct compiled entry preserves the same ordering: The compiled entry calls assertSupportedRuntime before respawnWithoutOpenClawCompileCacheIfNeeded and enableOpenClawCompileCache. (src/entry.ts:131, 8f807ae912d4)
  • Retained boundary proof: The launcher fixture exercises Node 24.14.1 as unsupported and asserts the runtime entry is not reached, retaining the behavior that made the removed cache-only cases obsolete. (test/openclaw-launcher.e2e.test.ts:150, 8f807ae912d4)
  • Node module contract checked: The changed owner imports node:module; the installed Node 24.19.0 contract exposes both enableCompileCache and getCompileCacheDir, matching the retained cache API use. (src/entry.compile-cache.ts:4, 791f478a6609)
  • Current-path provenance: Blame attributes the current launcher floor, compiled-entry ordering, runtime guard, and launcher boundary test to the same recent startup-area contributor; local history is shallow beyond that boundary. (openclaw.mjs:83, 8d5a54deaa15)

Likely related people:

  • steipete: Current-line blame attributes the public launcher guard, compiled entry ordering, runtime guard, and retained boundary test to Peter Steinberger; the submitted cleanup is also by steipete. (role: current launcher and runtime-guard contributor; confidence: high; commits: 8d5a54deaa15, 791f478a6609; files: openclaw.mjs, src/entry.ts, src/infra/runtime-guard.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

Copy link
Copy Markdown
Contributor Author

Land-ready proof for 791f478a6609f40ddb6c2deb9c0949a9d9239fb5:

Production delta: -34 net lines. Tests/test support: -104 net lines. Unsupported Node 24.0-24.14 remains rejected by both launcher/runtime boundaries before compile-cache handling. No docs, changelog, schema, protocol, migration, or operator-state change.

@steipete
steipete merged commit 715e324 into main Aug 15, 2026
250 of 251 checks passed
@steipete
steipete deleted the test/remove-unsupported-node24-cache branch August 15, 2026 20:15
@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

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: 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