Repository navigation
fix(runtime): close Bun watcher and harness gaps - #150655
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: blocked before merge. Reviewed September 17, 2026, 5:22 AM ET / 09:22 UTC (Revision 8). ClawSweeper reviewWhat this changesThe PR repairs Bun skill watching and callback retention, and makes shell proof helpers and runtime tests behave consistently across Bun and Node. Merge readiness⛔ Blocked before merge - 1 item remains This remains useful work absent from the pinned main branch. No actionable introduced defect was found, and the previous generic migration blocker is unsupported by the actual diff. Priority: P2 Review scores
Verification
How this fits togetherSkill watchers invalidate cached skill descriptions when files change, while plugin loaders resolve code for active plugin generations. The runtime adapters and validation scripts support those flows under Bun and Node. flowchart TD
A[Skill files] --> B[Runtime and polling preference]
B --> C[Shared skill watchers]
C --> D[Skill cache invalidation]
E[Plugin imports and filesystem paths] --> F[Runtime adapters]
F --> G[Resolved paths and plugin modules]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +18, Tests +8, Other +22. Total +48 across 15 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep runtime compatibility repairs within the existing watcher and loader owners, preserving explicit polling preferences and filesystem identity semantics. Do we have a high-confidence way to reproduce the issue? No independently executed reproduction was established in this read-only review; source identifies the affected paths, and the captured body reports focused Bun failures and successful after-fix validation. Is this the best way to solve the issue? Yes. The patch reuses existing polling and resolution contracts, isolates temporary artifacts, and removes generation capture without adding competing runtime owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9ab47386778b. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
4009763 to
aa2c5e7
Compare
debd36e to
1284b2c
Compare
59bf297 to
c41160c
Compare
c41160c to
7a45c79
Compare
|
Merged via squash.
|
…118830) Preserve signed generated-media references when completion and retry prompts pass through legacy reply parsing. Delimit vulnerable punctuation and literal quotes in the shared formatter, and keep explicitly delimited values intact in parse-output.ts through validation and fallback handling. Retain ordinary unquoted cleanup, file-URL conversion ownership, attachment validation, current prompt modes, and missing-only recovery. Add producer-to-parser regressions and document quoted legacy references. P0-P2 review is clean. The refresh onto 62507cc preserves the complete reviewed patch and all five file hashes. Retained Blacksmith Testbox run 35193105282 at the previous verified head proves 17 intended original-code failures, 557 passing candidate tests, and the complete selected changed gate. Fresh exact-head CI run 35215130600 passes with 140 successful jobs and a green rollup, including 39 current media-path tests and 18 current local-root tests. Those results satisfy ClawSweeper's refreshed-coverage requests; no introduced code or security defect was found. The previous unrelated Doctor fixture CI failure is fixed in the refreshed main by #150655. Final refreshed fingerprints and diff checks pass.
* fix(runtime): close Bun watcher and harness gaps * test(slack): normalize ArrayBuffer acknowledgement bytes * test(parallels): stabilize cross-runtime drain fixture * fix(runtime): detach process-stable Bun callbacks * fix(runtime): avoid Bun TODO lint suppression * test(doctor): cover systemd fallback probe * test(ci): include labeler concurrency owner * fix(ci): keep changed-plan clone lint-clean
…penclaw#118830) Preserve signed generated-media references when completion and retry prompts pass through legacy reply parsing. Delimit vulnerable punctuation and literal quotes in the shared formatter, and keep explicitly delimited values intact in parse-output.ts through validation and fallback handling. Retain ordinary unquoted cleanup, file-URL conversion ownership, attachment validation, current prompt modes, and missing-only recovery. Add producer-to-parser regressions and document quoted legacy references. P0-P2 review is clean. The refresh onto df1202d preserves the complete reviewed patch and all five file hashes. Retained Blacksmith Testbox run 35193105282 at the previous verified head proves 17 intended original-code failures, 557 passing candidate tests, and the complete selected changed gate. Fresh exact-head CI run 35215130600 passes with 140 successful jobs and a green rollup, including 39 current media-path tests and 18 current local-root tests. Those results satisfy ClawSweeper's refreshed-coverage requests; no introduced code or security defect was found. The previous unrelated Doctor fixture CI failure is fixed in the refreshed main by openclaw#150655. Final refreshed fingerprints and diff checks pass.
Direct Bun runs exposed Node-shaped assumptions outside the plugin loader: native skill watcher registration could miss readiness/change assertions, shell proof helpers relied on Node's stdin-module entrypoint and eval argv layout, a cancellation fixture depended on native watcher delivery, and subprocess tests treated the current Bun executable as Node.
This makes Bun use Chokidar polling by default while preserving explicit
CHOKIDAR_USEPOLLINGoverrides, runs shell heredoc modules from owned temporary.mjsfiles, gives each ClawHub proof an isolated temporary directory with exit cleanup, and polls explicit fixture files instead of coupling cancellation and process-drain coverage tofs.watch. The affected tests use real filesystem ancestry and resolve an actual Node executable for Node-specific rows.Two process-lifetime leaks needed ownership fixes. The Bun-only N-API realpath fallback in
@openclaw/fs-safelazily creates a process-lived callback on first missing-path resolution, so boundary resolution now enters a stable async context until oven-sh/bun#42374 lets that fallback be removed. Bun also retains the firstBun.pluginsetup closure process-wide, so the one-time resolver and loader hooks now install from module-level functions that cannot capture a retiring plugin generation.The branch also keeps Slack acknowledgement bytes stable across the
BufferandArrayBufferWebSocket shapes accepted byws.After current main added a system-level systemd availability probe, the Doctor transport fixture now models the complete fallback: the expected machine-scoped
busctlfailure is followed bysystemctl --system is-system-running, while the original user-bus-unavailable outcome remains enforced.A second current-main composition repair keeps the labeler workflow's exact changed-test routing assertion aligned with its existing ancillary concurrency owner.
The current boundary-shard planner also keeps its canonical shard clone immutable while using the repository's lint-clean
Object.assignform.Validation:
pnpm buildnode scripts/check-changed.mjsundici.pingexport and ping/pong diagnostics channelsbash -n scripts/e2e/lib/skills/clawhub-install-proof.sh