Repository navigation
fix(skill-registry): contain asynchronous watcher errors - #1817
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe skill registry now handles asynchronous watcher errors by closing and removing the failed watcher and warning that manual refresh is available. Subprocess tests cover ChangesSkill registry watcher error handling
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to Watcher errors no longer terminate Pi. The affected root may stop updating automatically until a later session, but users are warned and can refresh manually; no actionable merge-blocking risk is established. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 2 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Linked issue
Closes #962
PR type
type:bug)Summary
/skill-registry:refreshmanual continuation. Other skill roots remain watched.The earlier attempt #963 was closed without merging. This change retains the minimal listener fix and adds reproducible runtime regression evidence. No dependencies, global exception handlers, retry state, or configuration flags are added.
Changes
extensions/skill-registry.tstests/skill-registry-watcher.test.tsTest plan
recursive_watchboundary.node --experimental-strip-types --test tests/skill-registry-watcher.test.ts tests/skill-registry.test.ts— 35 passed, no failures or skips, on Node 24.18.0 and 24.21.0.pnpm test— 4,953 passed, 44 skipped, no failures; provider contract and runtime harness passed.pnpm run typecheck— no diagnostic regressions.pnpm run check:runtime-modulesandnode scripts/verify-package-files.mjspassed.pnpm run test:packed-packagepassed.git diff --checkclean.Linux ENOENT is fault-injected at Node's actual
readdirSyncboundary after watcher startup. Node 24.21.0 now swallows that rescan error itself; after verifying the native rescan was reached, the test additionally emits the public ENOENT event only when Node ignored it. Against unchanged main both cases still fail on Node 24.21.0, so the listener regression remains enforced. On Darwin/Windows the test injects the public watcher error event; those platforms were not executed locally. Pending debounce callbacks after shutdown are pre-existing and outside this fix.Contributor checklist
Rollback
Revert this single commit (the listener and its dedicated regression file). No unrelated changes are included. Authored scope: 124 added lines, including a seven-line runtime fix.
Summary by CodeRabbit
CI follow-up evidence
The initial CI run used Node 24.21.0 and exposed the newer ENOENT suppression. The test was corrected without changing runtime logic. The full suite on Node 24.21.0 passed on repeat (4,953 passed, 44 skipped); its first local run hit an unrelated
orchestrator-consultation-sdkGit-probe timing assertion, which passed standalone and on the full repeat. Both candidate reviews and independent read-only checks passed.