Skip to content

fix(skills): guard canonical stores from mirror aliases - #3714

Open
miguel-heygen wants to merge 1 commit into
mainfrom
magi/fix-skills-mirror-alias
Open

fix(skills): guard canonical stores from mirror aliases#3714
miguel-heygen wants to merge 1 commit into
mainfrom
magi/fix-skills-mirror-alias

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

Summary

Global skill mirroring now proves that each agent target is filesystem-distinct from the canonical Claude and universal stores before creating, deleting, copying, or linking anything. Symlink aliases and unresolvable loops are skipped and reported, so an update cannot delete the source skill through an alias and replace it with a self-pointing link.

The guard resolves missing tails through their nearest existing ancestor, compares canonical path overlap and device/inode identity, and rechecks immediately before each destructive per-skill operation. A final per-skill symlink remains safe and supported because removal unlinks that entry without traversing its target; this preserves normal Unix idempotency and Windows copy refreshes.

Validation

  • Skills mirror suite: 14/14 tests passed, including absolute, relative, intermediate-directory, and ELOOP aliases.
  • Skills command suite: 40/40 tests passed.
  • Targeted strict TypeScript check for the mirror and generated agent-directory table passed.
  • Changed-file format, lint, and diff checks passed.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Fallow audit report

Found 1 finding.

Details
Severity Rule Location Description
minor fallow/high-cognitive-complexity packages/cli/src/utils/skillsMirror.ts:244 'mirrorGlobalSkills' has cognitive complexity 17 (threshold: 15)

Generated by fallow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant