Skip to content

test(skills): make removed-root watcher checks portable - #158693

Merged
steipete merged 1 commit into
mainfrom
deslop/l55-skills-windows-loss
Sep 26, 2026
Merged

steipete merged 1 commit into
mainfrom
deslop/l55-skills-windows-loss

Conversation

@steipete

@steipete steipete commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Windows CI can fail the missing-skill-root recovery fixture after recovery succeeds because a directory read during deletion reports EPERM instead of ENOENT.

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

  • Original Windows failure: verifyWatcherErrors expected ENOENT, received EPERM; 164 tests passed and 19 skipped in the shard. Captured lstat/scandir errors both named the deliberately removed sibling root; both content observers closed, followed by watch-available and discovery of recreated-proof.
  • The failing fixture blob is identical in the affected PR, its base, and current main. A separate affected PR reports the same failure; no existing repair owns this assertion.
  • Independent Codex review of the staged candidate: no actionable P0–P2 findings.
  • Linux negative control passed: the unchanged candidate fails its existing first-proof discovery 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.
  • Single-worker cost: pnpm test src/skills/runtime/refresh.missing-root.integration.test.ts --maxWorkers=1 passed on the baseline in 29.28s and final source in 27.13s, including the wrapper. Cache states differ; no performance improvement is claimed.
  • Final-head CI passed, including all five Windows jobs and 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.
  • All 20 consecutive complete Linux fixture runs passed (220 test executions, 23.97–27.28s per run). The seven related watcher suites passed all 114 tests in 24.62s.
  • node scripts/check-changed.mjs -- src/skills/runtime/refresh.missing-root.integration.test.ts passed 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.

@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 26, 2026 06:14
@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 26, 2026, 2:52 AM ET / 06:52 UTC (Revision 3).

ClawSweeper review

What this changes

The 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
Reviewed head: ad792114d21188b5a8c4d9611c90a2ab54fc61d2

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused test repair retains meaningful watcher recovery checks and has real cross-platform validation, with one repository flake-proof gate still open.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): The changed integration test exercises the real Skills watcher through filesystem removal and recovery: the captured PR body reports nine passing Windows cases in exact-head CI and 20 complete Linux fixture runs after the change, while GitHub confirms the Windows shard passed. This establishes after-fix boundary behavior, though the separate three-run original-shard flake gate remains incomplete; no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The changed integration test exercises the real Skills watcher through filesystem removal and recovery: the captured PR body reports nine passing Windows cases in exact-head CI and 20 complete Linux fixture runs after the change, while GitHub confirms the Windows shard passed. This establishes after-fix boundary behavior, though the separate three-run original-shard flake gate remains incomplete; no stored-data contract changes.
Evidence reviewed 10 items Introduced test change: The pinned PR delta replaces the ENOENT requirement with a completed-loss generation check. Exact lost-root path and closed-watcher checks remain; the verified test merge carries the same patch.
Current main still has the failure condition: Fetched main retains the ENOENT assertion and has no generation-end check; its fixture is unchanged from the PR merge base.
Production boundary: The unchanged Skills refresh owner receives content-watcher errors, records unavailable coverage, and coordinates recovery. The PR does not change this production path.
Findings None None.
Security None None.

How this fits together

OpenClaw 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]
Loading

Before merge

  • Resolve merge risk (P1) - Only one clean run of the original Windows node-test-5 shard is recorded for this intermittent fixture; repository flake policy requires three before merge.
  • Complete next step (P2) - Record two additional clean original Windows node-test-5 shard runs on the unchanged test tree to meet the repository’s three-run flake bar.
Agent review details

Security

None.

PR surface

Tests +5. Total +5 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 7 2 +5
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 7 2 +5

Review metrics

Metric Value Why it matters
Flake proof gate 20 Linux standalone runs; 1 of 3 original Windows shard runs recorded The remaining original-shard runs are the documented validation gap for this intermittent CI failure.

Merge-risk options

Maintainer options:

  1. Complete original-shard validation (recommended)
    Record two more clean runs of the original Windows node-test-5 shard on the unchanged test tree to meet the repository’s three-run flake bar.

Technical review

Best 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.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The changed integration test exercises the real Skills watcher through filesystem removal and recovery: the captured PR body reports nine passing Windows cases in exact-head CI and 20 complete Linux fixture runs after the change, while GitHub confirms the Windows shard passed. This establishes after-fix boundary behavior, though the separate three-run original-shard flake gate remains incomplete; no stored-data contract changes.

Label justifications:

  • P2: This is a bounded CI fixture repair with no production behavior change.
  • merge-risk: 🚨 automation: The PR changes a CI regression assertion for an intermittent Windows failure whose required original-shard repeat proof is incomplete.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The changed integration test exercises the real Skills watcher through filesystem removal and recovery: the captured PR body reports nine passing Windows cases in exact-head CI and 20 complete Linux fixture runs after the change, while GitHub confirms the Windows shard passed. This establishes after-fix boundary behavior, though the separate three-run original-shard flake gate remains incomplete; no stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed integration test exercises the real Skills watcher through filesystem removal and recovery: the captured PR body reports nine passing Windows cases in exact-head CI and 20 complete Linux fixture runs after the change, while GitHub confirms the Windows shard passed. This establishes after-fix boundary behavior, though the separate three-run original-shard flake gate remains incomplete; no stored-data contract changes.

Evidence

What I checked:

  • Introduced test change: The pinned PR delta replaces the ENOENT requirement with a completed-loss generation check. Exact lost-root path and closed-watcher checks remain; the verified test merge carries the same patch. (src/skills/runtime/refresh.missing-root.integration.test.ts:473, ad792114d211)
  • Current main still has the failure condition: Fetched main retains the ENOENT assertion and has no generation-end check; its fixture is unchanged from the PR merge base. (src/skills/runtime/refresh.missing-root.integration.test.ts:471, 8f22acdd746e)
  • Production boundary: The unchanged Skills refresh owner receives content-watcher errors, records unavailable coverage, and coordinates recovery. The PR does not change this production path. (src/skills/runtime/refresh.ts:381, ad792114d211)
  • Recovery coverage retained: After deliberate root removal, the fixture still requires the lost skill to disappear, the recreated skill to be discovered, and the independent sibling subscription to work. (src/skills/runtime/refresh.missing-root.integration.test.ts:801, ad792114d211)
  • Reported failure and after-fix proof: The captured PR body links the original Windows EPERM failure and reports that the exact-head CI passed all nine Windows fixture cases, 20 consecutive Linux fixture runs, and seven sibling watcher suites. GitHub job metadata independently confirms the exact-head Windows node-test-5 job and CI gate succeeded; job log retrieval was blocked by the review environment. (ad792114d211)
  • Flake validation policy: The repository requires 20 clean standalone file runs, three clean runs of the original shard, and sibling tests. The updated PR body records the standalone and sibling results, but only one original Windows shard run is identified. Public docs: docs/help/testing/writing-tests.md. (docs/help/testing/writing-tests.md:107, ad792114d211)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record two more clean runs of the original Windows node-test-5 shard on the unchanged test tree.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-26T06:20:56.125Z sha ad79211 :: blocked before merge. :: none
  • reviewed 2026-09-26T06:27:55.404Z sha ad79211 :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 26, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 26, 2026
@steipete
steipete enabled auto-merge (squash) September 26, 2026 07:32
@steipete
steipete merged commit f63fea5 into main Sep 26, 2026
202 of 203 checks passed
@steipete
steipete deleted the deslop/l55-skills-windows-loss branch September 26, 2026 07:33
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant