Files
skillshare/internal/sourcefs
Willie 49b43b228c fix(plugin): keep symlinked config.yaml and normalize plugin sources
Plugin saves wrote a temp file next to config.yaml and renamed it over
the path. When config.yaml is a symlink into a dotfiles folder, the
rename replaced the link with a regular file, so the shared config
never received the change and the machine silently forked. The plugin
writer also skipped preserve_tilde_on_save, saving sources as absolute
home paths. The one-time legacy target migrations for global and
project configs used the same temp+rename and replaced links as well.

Plugin sources were compared as raw strings. The snapshot owner marker
records the absolute path from add, so a config that spells the same
folder as ~/... failed every update with "snapshot ownership conflict".
For Agents whose snapshot location hashes the source, the new spelling
silently created a second snapshot instead.

Resolve the symlink before writing, normalize sources once where the
plugin section is decoded so owner checks and snapshot paths agree,
and fold sources back to ~ on save when preserve_tilde_on_save is set.

Refs #460
Refs #461
2026-10-07 09:56:48 +08:00
..