Skip to content

fix(worker): remove empty directories from managed skill installs - #1436

Merged
nixuuu merged 1 commit into
devfrom
fix/canopy-skill-conflicts
Nov 28, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/canopy-skill-conflicts

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 28, 2026

Copy link
Copy Markdown
Member

A worker could remove every installed file yet leave the skill's nested directories on disk. Once it dropped the ownership entry, the next assignment reported a local conflict. This also happened when an update stopped using a directory and a later uninstall left it behind.

The worker now prunes directories that only held its own files. It keeps user files, empty user directories and their parents, including directories an intervening version of the skill used. A clean uninstall moves the old tree to its transaction backup before releasing ownership. Recovery can restore the tree if the worker stops before committing.

An older uninstall may have already discarded its ownership record. In web or desktop, Resolve local conflict → Use the Canopy version archives that directory and installs the assigned version.

Verification

  • Reproduced the regression on the previous implementation. After the fix, a nested skill updates, uninstalls and installs again in both CLI and Canopy session homes after a worker restart.
  • 54 tests passed across the skill inventory, filesystem, gateway integration, plugin migration and Windows mode suites. The temporary directory check passed.
  • Worker typecheck, lint on edited files and diff checks passed. CI runs the full repository gate.

Copy audit

A file colliding with a local directory previously surfaced a filesystem error. The worker now identifies the directory conflict and tells the user to move the directory and sync again. Reviewed against section 8 of the copy guide.

Fixes: #63

@nixuuu
nixuuu enabled auto-merge (squash) November 28, 2026 14:32
@nixuuu
nixuuu merged commit 5209705 into dev Nov 28, 2026
24 checks passed
@nixuuu
nixuuu deleted the fix/canopy-skill-conflicts branch November 28, 2026 14:38
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