Repository navigation
fix(skills): isolate files blocking tool skill directories - #1310
Conversation
- Stop the shared skill-directory guard at a regular file and preserve its contents, reporting the exact path and recovery command. - Skip blocked skill roots in both pull cleanup readers so Hermes cannot abort delivery to the scope's other tools with ENOTDIR. - Record blocked team-skill deliveries as incomplete so a plain pull retries after the file is moved, even when the team revision is unchanged. - Document recovery in English and Chinese; verify 359 focused regression tests, build, typecheck and lint, plus a real-CLI pull that preserves the blocker, delivers to Claude and restores Hermes on retry. Related to Tencent#1221.
|
I can’t reliably review the exact requested scope: the checkout is shallow, and The PR description does document sufficient testing: a post-build real-CLI run covers preserving the blocker, delivery to Claude, and retrying Hermes without Please provide the requested three-dot diff or a checkout containing its merge-base history. I ran no PR code, builds, or installs. |
- Limit the non-directory guard to parent directories; a file occupying the skill itself still reaches the existing ownership checks and Kept diagnostic. - Preserve the established member-file recovery flow while continuing to isolate a blocked Hermes skills root and retain its retry marker. - Reproduce the failing CI ownership case locally, then verify all 15 real-CLI ownership and blocked-directory cases, 131 skill regression tests, build, typecheck and lint.
|
I can’t complete the scoped review: the exact three-dot diff still fails with
Please provide the exact three-dot diff or a checkout containing its merge-base history. No PR code, builds, tests, or installs were run. |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
@nateEc Thanks, approving. This closes the #1221 item "A file where Hermes's skills directory should be stops the user scope with ENOTDIR".
We ran the same fixture with the built CLI on this head and on main 2401d047. The fixture puts a file at ~/.hermes/skills, then runs pull --force:
- main:
pullexits 0 with anENOTDIRwarning, and Claude's copy is never written.doctorthen fails on the rawENOTDIR. - this PR:
pullnames the blocked path, delivers to Claude, and leaves the file byte-identical. After the file is moved aside, a plainpullrestores Hermes.
The new e2e fails on main and passes here. tsc, lint, the unit file and the ownership e2e suite pass.
Not blocking, worth doing here if you agree:
[P2 non-blocking]In the blocked state,doctorprints theSkipped … is not a directorywarning but exits 0 with "All checks passed!". It drops "Skills delivered to hermes" and still shows "✔ hermes skills are where the last pull wrote them". It reads the samedeliveryTargets, which skip the blocked tool. Counting the block as a problem would keepdoctorhonest for scripts that read its exit code.[P2 non-blocking]teamai uninstall --forcestill stops withENOTDIRon the same file.listDirs(skillsDir)atsrc/uninstall.ts:651reads it as a directory. This happens on main too, and the body scopes the PR to pull.
) * fix(skills): isolate files blocking tool skill directories - Stop the shared skill-directory guard at a regular file and preserve its contents, reporting the exact path and recovery command. - Skip blocked skill roots in both pull cleanup readers so Hermes cannot abort delivery to the scope's other tools with ENOTDIR. - Record blocked team-skill deliveries as incomplete so a plain pull retries after the file is moved, even when the team revision is unchanged. - Document recovery in English and Chinese; verify 359 focused regression tests, build, typecheck and lint, plus a real-CLI pull that preserves the blocker, delivers to Claude and restores Hermes on retry. Related to Tencent#1221. * fix(skills): preserve ownership handling at leaf skill paths - Limit the non-directory guard to parent directories; a file occupying the skill itself still reaches the existing ownership checks and Kept diagnostic. - Preserve the established member-file recovery flow while continuing to isolate a blocked Hermes skills root and retain its retry marker. - Reproduce the failing CI ownership case locally, then verify all 15 real-CLI ownership and blocked-directory cases, 131 skill regression tests, build, typecheck and lint.
Summary
A regular file at Hermes's skills path aborts a user-scope pull with ENOTDIR and can stop delivery to other tools. Have the shared directory guard preserve and report the blocker, and let both pull cleanup readers skip it. Mark the blocked team-skill delivery incomplete so moving the file aside followed by a plain pull restores the missing copy even at the same team revision. Add bilingual recovery guidance.
Type of Change
Test Plan
npm run build,npx tsc --noEmit,npm run lint, andgit diff --checkpassed.8b8adad:Related Issues
Related to #1221, one specific item in "Other findings". This PR does not close the umbrella issue or include its descriptor/resolver redesign.
Notes for Reviewers
Uses the existing skill guard and delivery failure ledger; no deletion or automatic replacement of the member's file. Shared-state readers/writers audited: team and built-in skill writers, source guard callers, both cleanup readers, and the revision/target record that gates subsequent pulls. Representative git-provider CLI run on macOS; live agents and additional forge providers left to CI.
Integration verification: all five independent fixes cherry-picked cleanly onto origin/main in a local-only checkout; combined build, typecheck and lint passed, with 174 unit tests and 7 real-CLI cases across 6 E2E files. The Windows test-list guard and moved POSIX command regression also pass together (25 tests).
CI follow-up
0bc1f13: the directory guard now blocks only non-directory parents, leaving a member file at the leaf skill path to the existing ownership/Kept flow. The CI case was reproduced locally before this correction. Afterward all 14 cases in ownership-rules-agents-993 plus the blocked-directory E2E pass (15 real-CLI cases), as do 131 skill-handler/pull tests, build, typecheck and lint. The original member file remains intact and plain-pull recovery works for both leaf and parent blockers.