fix: prevent forced skill installs from deleting source files #418
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #418"
general
weight: 0.35
steipete
What Problem This Solves
Fixes #419
On a case-insensitive filesystem, a destination such as
SKILLScan point to the checkout’sskillsdirectory. A forced install can mistake those paths for separate directories and delete the source skill it is trying to install.User Impact
The installer skips a destination that points to the source skill and refuses any destination inside or containing the source tree. Dry runs report the same decisions.
Why This Change Was Made
The installer compares filesystem identities for the destination and its parent directories. This detects overlapping paths even when they are spelled with different capitalization.
Evidence
On macOS, three regression cases failed before the fix and passed afterward in both dry-run and real installs. They cover installing directly onto the source, installing inside it, and installing into a directory that contains it.
All 16 installer tests passed with Python 3.13 and 3.14.
scripts/validate-skillsvalidated all nine skills, andgit diff --checkpassed.End-to-end installer proof
Ran
scripts/install-skillson a confirmed case-insensitive macOS 27.2.1 arm64 filesystem with Python 3.14.10. Each alias case used a disposable archive of the exact base (20eb80f43244) or PR head (9f74bb7ca6bd).| Destination | Base, real run | PR head, dry run and real run |
| --- | --- | --- |
|
SKILLSaliases the source directory | Replaced the source skill with a self-referential symlink | Skipped the source, exit 0 ||
SKILLS/autoreview/nestedis inside the source | Created an installation inside the source | Refused the overlap, exit 1 || Destination entry
autoreviewaliases the containingAutoReviewcheckout | Deleted the disposable checkout and left a dangling symlink | Refused the overlap, exit 1 |Dry runs preserved the file snapshots on both revisions. On the PR head, all real alias runs preserved the checkout. Fresh installs on the PR head and forced upgrades from the latest stable release,
v0.7.0(a056640843cb), succeeded in copy and symlink modes. Hash and symlink checks confirmed the upgraded skill matched the PR head. Unselected data, synthetic external settings and data, and both source checkouts were preserved.<details>
<summary>Redacted terminal output and filesystem assertions</summary>
</details>