Skip to content

plugin update fails with 'snapshot ownership conflict' when the config spells the plugin source with ~ #461

Closed

Description

@salmonumbrella

The situation

skillshare plugin update -g fails with snapshot ownership conflict when the plugin's source in config.yaml is written as ~/... but the snapshot was created from the absolute path.

The snapshot's .skillshare-owner stores the source exactly as it was at plugin add, for example /Users/<me>/repos/my-plugin. The owner check compares that file to b.Source + "\n" + b.Plugin as raw strings (internal/plugin/apply.go, L21 and L100 on main at 3ad4b68). So once the config says source: ~/repos/my-plugin, which is the same folder, every update of that plugin is refused.

My real global config ended up with the ~ form for a plugin after a later global command, with preserve_tilde_on_save: true. From then on plugin update failed until I wrote the two source: lines back as absolute paths by hand. doctor only reported not synced (update), so the reason wasn't obvious.

Repro (throwaway HOME), fails on both v0.24.6 and v0.25.0:

export HOME="$(mktemp -d)"
unset XDG_CONFIG_HOME XDG_STATE_HOME XDG_DATA_HOME XDG_CACHE_HOME
mkdir -p "$HOME/plug/.claude-plugin" "$HOME/plug/commands"
printf '{"name":"tildeprobe","version":"0.1.0","description":"probe"}\n' > "$HOME/plug/.claude-plugin/plugin.json"
printf -- '---\ndescription: probe\n---\nsay hi\n' > "$HOME/plug/commands/hi.md"
skillshare init -g --no-tui --targets claude >/dev/null

skillshare plugin add "$HOME/plug" --target claude --no-tui -g
# ✓ tildeprobe  claude · installed

sed -i '' "s#source: $HOME/plug#source: ~/plug#" "$HOME/.config/skillshare/config.yaml"
printf -- '---\ndescription: probe\n---\nsay hello\n' > "$HOME/plug/commands/hi.md"

skillshare plugin update tildeprobe --target claude --no-tui -g
# ✗ tildeprobe  claude · failed
#   snapshot ownership conflict

What works today, and why it is not enough

Rewriting the plugin's source: lines in config.yaml back to the absolute path makes the update go through. But any save that folds $HOME back to ~ brings the failure back, and nothing in the error or doctor points at the path spelling.

This also collides with #460: its ask is to apply preserve_tilde_on_save to plugin source paths. Once that lands, every plugin added with an absolute path would hit this on its next update.

Ask

  • Compare owner markers on normalized paths: expand ~, then filepath.Clean (and ideally resolve symlinks) on both b.Source and the recorded owner before comparing, at both checks in apply.go.
  • Or record the owner in one canonical form (expanded, cleaned, absolute) and normalize b.Source the same way before comparing, so the marker is independent of how the config spells the path.
  • If they still differ, make the error say which two sources didn't match.

Refs #460

Activity

  1. self-assigned this
    on Oct 7, 2026
  2. added
    bug
    on Oct 7, 2026
  3. runkids commented on Oct 7, 2026

    @runkids
    Owner

    Thanks! Fixed in v0.25.1 together with #460: plugin sources are normalized when the config is loaded, so ~/plug and /Users/<you>/plug are the same source for the owner check, and plugin update no longer fails with snapshot ownership conflict for that.

    Let me know if you still see it after upgrading.

  4. added
    awaiting-reply
    on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

awaiting-replybug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions