Skip to content

Fail a library or profile skill entry whose local folder no longer holds the skill before installing - #47

Merged
archae0pteryx merged 2 commits into
mainfrom
fix/preflight-skill-gone
Oct 28, 2026
Merged

archae0pteryx merged 2 commits into
mainfrom
fix/preflight-skill-gone

Conversation

@archae0pteryx

@archae0pteryx archae0pteryx commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Bead skillz-ey0. SourceGone now also flags a Spec::Skill whose absolute local source folder exists but no longer holds a named skill, so that entry fails before its install command runs and the others still install. Adds Probe::holds_skill (default true, Disk answers with the harness skill_names_under, the rule npx skills --skill uses) and source_without_skill in stale.rs. A skill-gone folder gets its own advice, since sync only follows a missing folder. Not covered: subagent entries (needs a harness export), dry-run listing, Library stale markers, profile status. Review: independent reviewer PASS, hall-monitor clean after one fix round, gate green, line coverage 92.77%.

Summary by CodeRabbit

  • Bug Fixes
    • Skill installation and application now stop before running npx when the source folder exists but no longer contains the requested skill. The error explains that the skill should be restored or the entry updated to point to the correct folder.
  • Documentation
    • Clarified that a missing source folder requires running skillz sync, while a folder without the requested skill receives separate guidance.

@archae0pteryx archae0pteryx added the needs-review Ask CodeRabbit to review this PR (it reviews only labelled PRs, once per label) label Oct 28, 2026
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between f32631f and 3f295f4.

Files selected for processing: 3
  • README.md
  • src/app/apply/source_gone.rs
  • src/app/stale.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

Local skill entries now distinguish a missing source directory from a directory that no longer contains a named skill. Detection, cause-specific messages, and README failure conditions cover both cases.

Changes: Local source validation

Layer / File(s) Summary
Detect missing skills
src/app/stale.rs
Probe gains skill-presence checks. Disk checks for named skills, and source_without_skill identifies local skill sources missing a listed name. Tests cover detection results, including unreadable directories.
Classify and report missing sources
src/app/apply/source_gone.rs, README.md
SourceGone distinguishes a missing source folder from a folder that lacks the skill and displays a cause-specific message. Tests cover both causes and related entry types. The README describes both failure conditions.

Priority: Normal

Merge Risk: Minimal · up to 3f295

Local skill entries are checked before installation. No merge-blocking risk was identified.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@archae0pteryx
archae0pteryx merged commit 0be3028 into main Oct 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review Ask CodeRabbit to review this PR (it reviews only labelled PRs, once per label)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant