Repository navigation
fix: warn at startup for missing Node certificate patches - #193710
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: blocked before merge. What this changesThis 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.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete 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 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe 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]
Technical reviewBest 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
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +5, Tests +212, Docs 0, Other +71. Total +288 across 25 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 5, 2026, 3:18 PM ET / 20:18 UTC. |
|
Merged via squash.
|
…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]>
…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]>
…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]>
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.jsonalready 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
models list --jsonparses successfully with exactly one stderr warning; uses an already-installed patched Node without a security warning when available.pnpm build:runtime, core typecheck, focused lint, shell syntax, formatting, test-line ratchet, andgit diff --checkpassed. Runtime build emitted an advisory chat boot size overage (1264.8 KiB versus 1264.4 KiB); CI remains the broad gate.ba400bcb7cd, including unchanged runtime/respawn context: no actionable P0–P2 findings.0a31b14d128451a0bcff508b41351782aece06e0. Runner capacity delayed nine shards; the original run completed when capacity recovered.readUpdatePhysicalDatabaseGenerationsexport; 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.0007013715277777778versus 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 atc9c3c843ca6b3d6236005fbd857e3a0d94e8d8a4: 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.