Repository navigation
fix(runtime): preserve Node worker dependencies and cleanup diagnostics - #155292
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: needs changes before merge. Reviewed September 22, 2026, 7:12 PM ET / 23:12 UTC (Revision 17). ClawSweeper reviewWhat this changesThe PR preserves Node worker dependencies when packaging runs under Bun, improves runtime diagnostics, and synchronizes watcher tests with queued events. Merge readiness⛔ Needs changes before merge - 1 item remains The fixes remain useful on current main. The pinned patch has no actionable correctness findings, and the previously reported archive-restoration concern is absent from its current scope. Priority: P2 Review scores
Verification
How this fits togetherMac worker packaging selects the files and dependencies shipped with the app’s private Node runtime. Separate runtime diagnostics turn process launches and catalog-refresh failures into operator-visible logs. flowchart TD
A[Installed package] --> B[Worker dependency planner]
C[Installed Node built-ins] --> B
B --> D[Packaged Mac worker]
E[Process launches and catalog failures] --> F[Diagnostic classification and formatting]
F --> G[Redacted operator logs]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +1, Tests +55, Other +29. Total +85 across 8 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep dependency facts owned by the packaged Node runtime and reuse the existing diagnostic formatter without broadening this into repository-wide Bun acceptance. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main classifies packaged dependencies using the host runtime and discards nested AggregateError details through String(error). No runtime reproduction was executed during this read-only review. Is this the best way to solve the issue? Yes. Consulting the already-required target Node executable and using the existing redacting error formatter repair the responsible owners without introducing competing implementations. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against eeb450c9cf2d. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (16 earlier review cycles; latest 8 shown)
|
b83bf95 to
4bc317b
Compare
4bc317b to
4371594
Compare
4371594 to
dadbd4e
Compare
d0d5e62 to
673d3a3
Compare
673d3a3 to
990b204
Compare
990b204 to
452f4f1
Compare
Include status, signal, stdout, and stderr when the history benchmark subprocess fails. Keep both profiles, every assertion, and the existing 30-second child and 35-second test deadlines unchanged. This exposes the failing phase without claiming to fix the timeout.
Preserve the independently reviewed c134c8d7 tree while adopting the canonical embeddings cleanup and history benchmark repairs from main. Retain the existing PR ancestry for GitHub head synchronization.
Resolve the mainline diagnostics extraction by keeping spawn-diagnostics.ts as the sole owner and retaining the Bun family classification and existing regression assertions. The other compatibility changes are unchanged. Independent P0-P2 review and targeted formatting passed; refreshed hosted CI is required before landing.
Merge main including 3a4bbc6, which restores the SQLite reader context and spawn diagnostics to the extracted PR wrapper source inventory. The eight-file Bun compatibility patch retains identical stable patch ID 43645b39aa8a317656d1047afccfa79137314e66 and its existing reviews. Refresh hosted CI before landing.
|
Merged via squash.
|
* commit '7d7f977ccfc1ac177526232e4f4960febd010015': (91 commits) test: avoid unused target setup in package profile fixtures (#155972) fix(worktrees): batch snapshot metadata reads test(plugin-state): distinguish borrowed and foreign lifecycle owners refactor(agents): share external harness session and attempt machinery (#152181) chore(i18n): refresh native locales (#156006) chore(test): retain Doctor fixture settlement diagnostics (#155944) perf(codex): reuse unchanged inference request bytes (#155987) perf(test): prepare snapshot ownership subprocess imports (#155973) perf(test): consolidate channel registry coverage (#155014) fix(runtime): preserve Node worker dependencies and cleanup diagnostics (#155292) perf(test): prepare worktree GC child runtime (#155928) fix(ui): open browser cards after delayed panel renders (#153253) fix(update): retain the running updater by hard link instead of copying the package (#155977) feat(decisions): add explicit evaluation and Labs opt-in foundation (#155134) fix(state): preserve lifecycle custody across worker dispatch improve: reuse shared tooling fixtures and defer legacy updater proof (#155731) improve(ui): reduce real-Gateway test preparation (#155979) perf(state): move session RPC SQL off the Gateway main thread (#155740) docs(freebsd): explain native Codex runtime limits (#155980) fix(qa): count Code Mode nested tool activity as transcript tool evidence (#155976) ...
…cs (openclaw#155292) * fix(bun): preserve Node worker dependencies and spawn diagnostics * fix(models): preserve nested catalog cleanup diagnostics * test(gateway): own pending embeddings provider cleanup * test(bench): retain subprocess failure diagnostics Include status, signal, stdout, and stderr when the history benchmark subprocess fails. Keep both profiles, every assertion, and the existing 30-second child and 35-second test deadlines unchanged. This exposes the failing phase without claiming to fix the timeout. * chore: reconcile Bun compatibility with current main Preserve the independently reviewed c134c8d7 tree while adopting the canonical embeddings cleanup and history benchmark repairs from main. Retain the existing PR ancestry for GitHub head synchronization. * fix(runtime): preserve Bun diagnostics after owner extraction Resolve the mainline diagnostics extraction by keeping spawn-diagnostics.ts as the sole owner and retaining the Bun family classification and existing regression assertions. The other compatibility changes are unchanged. Independent P0-P2 review and targeted formatting passed; refreshed hosted CI is required before landing. * chore: adopt canonical PR wrapper inventory repair Merge main including 4ae90d3, which restores the SQLite reader context and spawn diagnostics to the extracted PR wrapper source inventory. The eight-file Bun compatibility patch retains identical stable patch ID 43645b39aa8a317656d1047afccfa79137314e66 and its existing reviews. Refresh hosted CI before landing. Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Bun-driven Mac worker packaging treated Bun's built-in
wsandundicias Node built-ins and could remove packages the installed Node worker needs. Spawn diagnostics also labeled Bun as an unknown command, a watcher fixture inspected state before its queued event ran, and catalog refresh warnings lost nested cleanup errors.User Impact
Mac Node workers retain their dependencies when packaging runs under Bun. Spawn diagnostics identify Bun, and catalog warnings preserve nested causes with the existing credential redaction. Node installation behavior and dependencies are unchanged; there is no alternate SQLite dependency or new configuration.
Why This Change Was Made
The packager obtains built-in module facts from the installed Node executable already used for pruning and applies them to both dependency traversals. Its tests cover external
ws, transitiveundici, and actual Node built-ins. Watcher fixtures await the queued raw event, while catalog refresh uses the existing aggregate-aware error formatter and retains the superseded-publication filter.Evidence
The candidate
911123feincludes main7ef42cc8. It preserves main's extraction of spawn diagnostics intospawn-diagnostics.tsand applies Bun classification at that owner; the retained tests use the canonical imports. Independent P0–P2 review found no actionable issue in that adaptation. The eight-file compatibility patch is unchanged after incorporating main's wrapper-inventory repair. Canonical main also owns the embeddings fixture cleanup and real request-admission proof (#155703), and moves history-benchmark preparation outside the child deadline (#155780). The overlapping changes from this PR were removed.The preceding candidate
bda36261passed CI and native hosted preparation. Its merge attempt stopped before dispatch because main had extracted the diagnostics owner. The adaptation passed focused independent review, formatting, and whitespace checks. The subsequent 8dd5b44a CI run exposed missing SQLite-context and spawn-diagnostics modules in the extracted PR tooling inventory. This candidate incorporates canonical main's inventory repair; existing failing assertions are unchanged.CI for
911123feinitially had one substantive failure: state-lifecycle coordinator contention during setup of a queued-compaction test, before its body ran. The other 1,235 tests in that job passed. The affected test and lifecycle owners are unchanged by this PR. The exact tested merge was then replayed on native Testbox with Node 24.19.0, CI mode, and two workers: the original file passed all 23 tests, and the original 62-file group passed 1,236 tests with four existing skips. The contention did not reproduce, so no root-cause fix is claimed. One evidence-qualified failed-job retry passed on CI attempt 2, including the previously failing shard. No assertion, timeout, or storage contract changed.Historical isolated Node/custom-Bun proof for the original runtime repairs passed 39 cases with three existing skips and no unhandled errors; actual test-worker executables were verified. Pinned
452f4f19also passed the custom-Bun build, readiness, and full check including test types, lint, formatting, and policy checks. Six paired SQLite cells passed 16 selected cases with coordinator and fork-worker executable verification. These results retain their tested-source attribution and do not establish full acceptance of this rebased head.A later native preparation accidentally ran the full suite locally. That incomplete run was stopped, its logs preserved, and the tooling route corrected to hosted preparation. Its nested-checkout dependency-resolution error, watcher/ONNX/tooling failures, and MCP keepalive failure remain unclassified; they are not direct-Bun acceptance results.
Repository-wide custom-Bun acceptance remains incomplete. The landed-main matrix, package/update, Gateway/UI E2E, and stress proof remain part of the continuing compatibility campaign. No stock-Bun compatibility or release claim is made.