fix: plugin installs actually refresh content — add-then-always-update - #39
Merged
Merged
Conversation
- the three *_marketplace_ensure helpers ran `add && return 0; update`, but every agent CLI exits 0 on `marketplace add` of an already-registered marketplace without refreshing its snapshot — update was dead code, and reinstalls (incl. --force) silently installed stale content - claude/qoder: `add || true` + unconditional `marketplace update` - codex: gate `upgrade` on SOURCE_TYPE (it is git-only and errors on path-backed marketplaces, which read live) and propagate add's exit code on the path branch so a refused add (git->path switch) stays visible - --force is now a full reset (remove plugin + marketplace, re-add, reinstall); teardown is gated on source reachability (git ls-remote via net_run) so an offline --force preserves the existing install instead of destroying it - remove --replace-marketplace (never shipped): a colliding add re-points on most CLIs, and the one refused direction is covered by --force - opencode: plain install no longer skips; --force wipes the skill directory (guarded, in-namespace); file copies are atomic (tmp + mv) - drop -y from plugin uninstall (it only skips --prune's prompt, which a bare uninstall never triggers); reset/uninstall commands read stdin from /dev/null; removal output stays visible - marketplace warning names the failing op pair per CLI (add/update vs add/upgrade) - tests: refresh-on-existing cases per CLI, codex gate/refusal, force reset sequences, offline skip, opencode behaviors; chain-rotation mock made state-aware; warning-text assertions updated - docs: README/USAGE/CHANGELOG (BREAKING entries + removal), try.sh opencode cleanup hint, concurrency note (snapshot is per-user global) Signed-off-by: Zheng Weihao <zheng-weihao@outlook.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Fixes silent stale-plugin installs: every agent CLI exits 0 on
marketplace addof an already-registered marketplace without refreshing its snapshot, so the installer'sadd && return 0; updatefallback never ran — reinstalls (including--force) reported success while installing stale content.*_marketplace_ensureis now add-then-always-update. claude/qoder:add || true+ unconditionalmarketplace update. codex:upgradegated onSOURCE_TYPE(git-only; path-backed marketplaces read live), with add's exit code propagated on the path branch so a refused add stays visible.--forceis now a full reset (remove plugin + marketplace → re-add → reinstall), gated on source reachability (git ls-remotethrough the retry chain) so an offline--forcepreserves the existing install instead of destroying it.--replace-marketplaceremoved (never shipped): a colliding add re-points on most CLIs, and the one refused direction is covered by--force.--forcewipes the skill directory (guarded, in-namespace); file copies are atomic.plugin uninstall -ydropped (the flag only skips--prune's prompt, which a bare uninstall never triggers); reset/uninstall commands are non-interactive (</dev/null), and removal output stays visible.Checklist
shellcheck orbit.sh install.shpassesbats tests/passes (386/386)