Repository navigation
test(skills): make removed-root watcher checks portable - #158693
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 26, 2026, 2:52 AM ET / 06:52 UTC (Revision 3). ClawSweeper reviewWhat this changesThe branch updates a Skills watcher integration test to associate errors with the removed root and a watcher present at the loss boundary while continuing to check skill rediscovery. Merge readiness⛔ Blocked before merge - 2 items remain Current main still has the Windows-sensitive assertion, so this focused repair remains useful. Source review found no introduced defect, but the repository’s required repeat runs of the original Windows shard are not yet recorded. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw watches workspace skill folders so filesystem changes refresh skill discovery. This integration test removes watched roots and checks error ownership, recovery, and continued sibling coverage. flowchart LR
A[Workspace skill roots] --> B[Skills watchers]
C[Root removal or move] --> B
B --> D[Errors and watcher closure]
D --> E[Recovery assertions]
E --> F[Rediscovered skills and sibling coverage]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +5. Total +5 across 1 file. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the portable lost-root error check together with the existing rediscovery, closed-watcher, and independent-sibling assertions. Do we have a high-confidence way to reproduce the issue? No deterministic current-main replay is recorded. The unchanged fixture failed in a Windows PR shard when root removal produced EPERM, and current main still requires ENOENT. Is this the best way to solve the issue? Yes. Binding the error to the removed root and a retired watcher generation tests recovery more directly than requiring one platform-specific error code; original-shard repeat validation remains outstanding. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8f22acdd746e. LabelsLabel 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
History |
What Problem This Solves
Windows CI can fail the missing-skill-root recovery fixture after recovery succeeds because a directory read during deletion reports
EPERMinstead ofENOENT.Related: #158378, #156940.
User Impact
This test-only repair preserves strict watcher ownership and recovery checks across platform-specific filesystem errors. Production behavior does not change.
Why This Change Was Made
The captured failure closed the affected watchers and rediscovered the recreated skill before the errno assertion failed. The fixture now records the watcher-generation boundary after each deliberate removal or move completes. An accepted error must belong to a generation present before that boundary, name the exact lost root, and have a closed watcher.
Fresh-generation readiness, subsequent edits, sibling subscriptions, native/pooled error identity, and cleanup assertions remain unchanged. There are no added retries, sleeps, timeouts, skips, worker settings, or production seams.
Evidence
verifyWatcherErrorsexpectedENOENT, receivedEPERM; 164 tests passed and 19 skipped in the shard. Capturedlstat/scandirerrors both named the deliberately removed sibling root; both content observers closed, followed bywatch-availableand discovery ofrecreated-proof.first-proofdiscovery assertion when real discovery publication is suppressed; restoring the publication owner passes. The compiled mutant execution marker and failure snapshot confirmed the empty stale read. This proves retained discovery coverage, not Windows errno behavior.pnpm test src/skills/runtime/refresh.missing-root.integration.test.ts --maxWorkers=1passed on the baseline in 29.28s and final source in 27.13s, including the wrapper. Cache states differ; no performance improvement is claimed.openclaw/ci-gate. The fixture passed all nine Windows cases; its two pre-existing symlink cases remain platform-gated. Reported Windows case durations sum to 32.14s, including imports inside the first case; the previously failing intermediate-ancestor case took 3.997s.node scripts/check-changed.mjs -- src/skills/runtime/refresh.missing-root.integration.test.tspassed in 249.23s, followed by a clean-source postflight. All 36 remote proof phases passed.Linux proof uses Blacksmith Testbox
tbx_01m3e5gxebtax6w336te3brp8x(run); the lease was confirmed stopped after validation. No local tests or heavy checks ran.