Skip to content

fix: warn at startup for missing Node certificate patches - #193710

Merged
steipete merged 2 commits into
mainfrom
fix/node-certificate-warning
Nov 5, 2026
Merged

steipete merged 2 commits into
mainfrom
fix/node-certificate-warning

Conversation

@steipete

@steipete steipete commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Compatible Node builds below the recommended certificate security patches start without a clear warning, while installer fallback policy can still require an unnecessary runtime upgrade.

Related: #179992 and #186589. This implements Peter's decision on November 5, 2026; @joshavant for awareness of the follow-through on the original eMudhra protection.

User Impact

OpenClaw starts when the only problem is Node's missing certificate patch, with one stderr security warning explaining that TLS may trust certificates signed with keys compromised in the October 2026 eMudhra incident. The warning gives the exact upgrade guidance: Node 24.22.1+ on 24.x or Node 26.12.1+. Machine-readable stdout, including --json, remains intact.

Missing node:sqlite, NUL truncation (nodejs/node#61954), failed data round-trips, and unsafe SQLite WAL-reset versions remain hard refusals. Bun retains its independent runtime/TLS policy.

Why This Change Was Made

For a certificate-only gap, automatic recovery searches for an already-installed patched Node and uses it if available. It never downloads a runtime solely for this recommendation; otherwise startup warns and continues. Native browser and exact-process relay entrypoints preserve their existing process ownership. Final-process warning ownership avoids duplicates across startup respawns and update preparation.

package.json already declares the actual compatibility floors (>=24.16.0 <25 || >=26.1.0) and stays unchanged. Installer fallback engines now match; freshly provisioned defaults remain patched. Explicitly selected historical packages retain their own stricter engines because those releases can enforce them at startup. Installer, Doctor guidance, README, and security documentation now describe the same advisory policy.

The existing warning formatter owns risk text and emission deduplication. The production change adds 75 net lines; 214 net regression-test lines cover distinct recovery, output, installer, and runtime boundaries, with a scoped test-line allocation. Two existing installer tests exposed a Bash 3.2 PATH-quoting defect, fixed at the quote producer without changing the tests.

Evidence

  • Real official Node 24.21.0 (SQLite 3.53.4): starts with exactly one warning when other runtimes are inaccessible; models list --json parses successfully with exactly one stderr warning; uses an already-installed patched Node without a security warning when available.
  • Real official Node 24.15.0 (SQLite 3.51.3): exits 1 before Gateway startup for NUL truncation, with empty stdout. Official download checksums verified.
  • 707 focused tests passed across six shards (194 seconds); four existing skips. Includes launcher/native transport/Bun distinction, installed recovery/no-download behavior, all SQLite refusal types, installer platforms, Doctor, and update preparation. The new update deduplication regression first failed with two warnings, then passed with one.
  • pnpm build:runtime, core typecheck, focused lint, shell syntax, formatting, test-line ratchet, and git diff --check passed. Runtime build emitted an advisory chat boot size overage (1264.8 KiB versus 1264.4 KiB); CI remains the broad gate.
  • Independent Codex autoreview of the complete local change against ba400bcb7cd, including unchanged runtime/respawn context: no actionable P0–P2 findings.
  • Earlier-head PR CI passed: 50 successful jobs, 26 scope skips, no failures, at 0a31b14d128451a0bcff508b41351782aece06e0. Runner capacity delayed nine shards; the original run completed when capacity recovered.
  • A documented capacity fallback was canceled after the authoritative PR run passed. Its broader checks exposed three unrelated existing findings: an unused readUpdatePhysicalDatabaseGenerations export; the legacy Doctor fixture intercepting an inherited compile-cache respawn before runtime recovery (reproduced with the Node test runner); and a mocked Systems workspace layout-shift assertion (0.0007013715277777778 versus zero). Their owning source/tests are unchanged by this PR. The seven legacy-entry cases pass with the default Bun runner, which disables that cache. These failures are recorded, not reported as passing. The legacy fixture failure is now fixed: it disables Node compile caching before its instrumented spawn, while the separate cache cases still opt in explicitly. The exact Node-runner/cache reproduction failed before this two-line fixture correction and all seven cases passed afterward. The follow-up also passed independent P0–P2 autoreview, focused lint, formatting, and the test-line ratchet. Final exact-head PR CI passed at c9c3c843ca6b3d6236005fbd857e3a0d94e8d8a4: 49 successful jobs, 26 scope skips, no failures. Eight shards had waited unassigned for more than 25 minutes; after all other work passed, the documented hybrid recovery canceled that stalled attempt and reran only unfinished jobs on hosted runners. The production code is unchanged.

Release-note context: warn instead of refusing or downloading solely for Node's certificate patch level; retain all SQLite safety checks. No changelog edit because this repository generates release notes at release time.

@clawsweeper

clawsweeper Bot commented Nov 5, 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 November 5, 2026 20:01
@steipete
steipete requested a review from a team as a code owner November 5, 2026 20:01
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes scripts Repository scripts size: M labels Nov 5, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T20:03:50.587070Z 0a31b14 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 5, 2026
@clawsweeper

clawsweeper Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR adds deduplicated startup warnings for missing Node certificate patches and prefers an installed patched runtime without downloading one solely for that recommendation.

Example: Run models list --json on Node 24.21.0 with safe SQLite and no installed patched Node.

  • Before: Startup proceeds without a certificate security warning.
  • After: Startup prints one warning to stderr while preserving JSON stdout.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and has no identified correctness defect, but publicly inspectable behavior evidence is limited to reported results and test code.
Proof confidence 🦐 gold shrimp (3/6) The host identifies this as maintainer-authored, outside the ordinary contributor proof gate; the body reports real Node startup and recovery scenarios, while inspected tests support warning deduplication and transport isolation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Users receive no clear startup warning about missing certificate security patches, and unavailable package metadata can cause an unnecessary Node upgrade.
Reason: The maintainer-authored direction aligns startup and installers with the established advisory policy without adding configuration or relaxing SQLite safety.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep this PR open: it completes the existing advisory runtime policy, and I found no introduced correctness defect; the SECURITY.md change still requires independent SecOps review.

Priority: P2
Reviewed head: 0a31b14d128451a0bcff508b41351782aece06e0

Before merge

  • Await maintainer action - Obtain independent @openclaw/openclaw-secops approval for the SECURITY.md change at the reviewed head, as required by CODEOWNERS.

Findings

None.

Tests

  • Missing end-to-end proof: The reported real CLI scenarios have no linked output artifact, and a latest-stable upgrade replay is not shown.
Agent review details

How this fits together

The launcher and runtime guard admit Node before CLI or Gateway startup, while installer policy selects compatible runtimes and the shared version module supplies security guidance.

flowchart TD
  A[CLI invocation] --> B[Launcher admission]
  B --> C[SQLite safety checks]
  C --> D[Installed runtime recovery]
  D --> E[Final runtime guard]
  E --> F[CLI or Gateway]
  E --> G[Security warning on stderr]
Loading

Technical review

Best possible solution:

Keep warning emission in the shared version owner and runtime selection in the existing recovery owner, preserving SQLite refusals and patched provisioning defaults.

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

Current-main source admits compatible older Node without the new startup warning and retains stricter installer fallback engines; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The implementation uses existing warning and recovery owners, bounds certificate-only recovery to installed runtimes, and preserves machine-readable stdout and SQLite safety checks.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Certificate security recommendations keeps the original intent (4a5ec82: Separate compatibility from security recommendations so updates and explicitly pinned Gateway runtimes remain usable.)
  • Startup runtime recovery changes intended behavior with a stated reason (05963f8: Retry startup through an installed compatible Node while preserving invocation, environment, process exclusions, and stream contracts.)
  • Installer metadata fallback changes intended behavior with a stated reason (5598c3d: Use conservative fallback engines because published target releases could enforce stricter Node requirements.)
  • Shell PATH remedy quoting keeps the original intent (89ede21: Print a literal-safe current-shell remedy instead of claiming profile text proves PATH readiness.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned introduction reviewed: The introduced diff adds warning ownership, certificate-only installed-runtime recovery, installer warnings, and aligned documentation without changing package engines. (node-runtime-recovery.mjs:784, 0a31b14d1284)
  • Current main lacks startup warning emission: Current main separates compatibility floors from recommended security patches, but its version module lacks the new shared warning emitter. (node-version.mjs:43, d999f7b1b675)
  • Existing advisory-policy decision: fix: keep updates working below recommended Node security patches #186589 established compatibility below certificate-patch recommendations to preserve updates and pinned Gateway runtimes; this PR extends that policy to startup. (node-version.mjs:11, 4a5ec828b19c)
  • Preserved SQLite admission: Runtime admission still rejects missing SQLite, failed NUL/data round-trips, unsafe WAL-reset versions, and unsupported Node lines before normal startup. (node-sqlite.mjs:41, 0a31b14d1284)
  • Required security owner: CODEOWNERS explicitly requires independent SecOps review for every author and assigns SECURITY.md solely to @openclaw/openclaw-secops; the PR reviews endpoint returned no submitted reviews. (.github/CODEOWNERS:8, 0a31b14d1284)
  • Supplied behavior evidence: The full PR body reports real Node 24.21.0 startup, parseable models JSON, installed patched-runtime recovery, and Node 24.15.0 refusal; it provides descriptions rather than linked raw output or media. (0a31b14d1284)

Likely related people:

  • Josh Avant: Raw commit 6c00e67 adds node-version.mjs:8 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6c00e67f5703; files: node-version.mjs)

PR surface

Source +5, Tests +212, Docs 0, Other +71. Total +288 across 25 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 6 1 +5
Tests 7 221 9 +212
Docs 7 7 7 0
Config 0 0 0 0
Generated 0 0 0 0
Other 9 91 20 +71
Total 25 325 37 +288

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: The change improves security guidance and avoids unnecessary runtime provisioning for otherwise compatible installations.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.

Label justifications:

  • P2: The change improves security guidance and avoids unnecessary runtime provisioning for otherwise compatible installations.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 5, 2026, 3:18 PM ET / 20:18 UTC.

@steipete
steipete merged commit 5954594 into main Nov 5, 2026
231 of 243 checks passed
@steipete
steipete deleted the fix/node-certificate-warning branch November 5, 2026 21:42
@steipete

steipete commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 6, 2026
…93710)

* fix: warn at startup for missing Node certificate patches

* test: isolate legacy runtime recovery from compile cache

Co-authored-by: Peter Steinberger <[email protected]>
wangmiao0668000666 pushed a commit to wangmiao0668000666/openclaw that referenced this pull request Nov 6, 2026
…93710)

* fix: warn at startup for missing Node certificate patches

* test: isolate legacy runtime recovery from compile cache

Co-authored-by: Peter Steinberger <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 14, 2026
…rts (#190242)

Finish and return native iterators once, keep later terminal calls in the
observer, and remove unused iterator capability probing and transport.
Prove WAL checkpoint progress and successor-cursor preservation.

Release adaptation: retain runtime admission in node-sqlite.ts instead of
introducing the newer sqlite-native-runtime.ts split. Preserve release
native lifecycle, safety-floor and worker contracts; adapt admission and
schema fixtures. Allocate exactly 29 net regression-test lines.

Companions: 1c437d1 (#190303) runtime assertion privacy is already
present. 40101a9 (#190276) has no remaining applicable SQLite change.
5954594 (#193710) certificate warnings are unrelated; e333f7e
(#197657) retires main-only test grants and is not needed for this fix.

Proof: 91 targeted tests passed across native observer, node SQLite and
schema metadata; formatting and diff checks passed.

(cherry picked from commit 2c0ab86)

Co-authored-by: ava-perry <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: M status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant