Repository navigation
fix(install): report reinstalls from the same repo as skipped - #887
Conversation
checkExistingConflict read only the legacy .skillshare-meta.json sidecar, which installs no longer write, so reinstalling a skill from the same repo was reported as "already exists" and counted as failed, contrary to the documented skip. It now reads the skill's record in .metadata.json, falling back to the sidecar, and skips only the same skill of that repo: another skill installed under the same name stays a conflict instead of being reported as installed. The dashboard logged an existing agent as installed and a same-repo skill as failed. Batch installs now return those as skipped and log them as skipped_skills, passing --into so a reinstall into a group folder finds its record; the install dialog warns that they are already installed. A same-repo tracked reinstall returns 409 and is logged as skipped instead of a 500 logged as failed. ss search installs, batch and single, log the names they skip, and the Herdr panel reports skipped names like failed ones. The install docs and their translations say that only the same skill is skipped.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f037fbf72f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if err := checkExistingConflict(destPath, store.GetExact(key), discovery.Source.CloneURL, fullSubdir, hint); err != nil { | ||
| return nil, err |
There was a problem hiding this comment.
Continue installing requested agents after skipping the only skill
For a Git repository containing exactly one skill and agents/helper.md, first installing with -s alpha and then reinstalling with -s alpha -a helper now exits successfully without installing helper. The metadata-aware lookup returns ErrSkipSameRepo, which triggers early returns in both single-skill branches of handleGitInstall (cmd/skillshare/install_handlers.go:230–233 and 315–318), bypassing installDiscoveredAgents. Previously this returned a conflict rather than silently reporting success. Record the skill as skipped but continue the independent agent-install phase, as the multi-skill path already does.
AGENTS.md reference: AGENTS.md:L36-L36
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 9df13be. Both single-skill branches of handleGitInstall now record the skip and continue to installDiscoveredAgents, as the multi-skill path does. TestInstall_SkippedSingleSkillStillInstallsRequestedAgent covers the repo-root and subdir sources; it failed on both before the fix. The tracked and direct-install skip paths discover no agents, so they are unaffected.
Reinstalling a single-skill repo with `-s alpha -a helper` returned as soon as the skill was skipped as already installed, so the requested agent was never installed while the command reported success. Both single-skill branches now continue to the agent phase, as the multi-skill path already does.
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Type
proposals/only — see CONTRIBUTING.md)approvedlabel)Linked Issue
Follow-up to #884 and #886, which listed these problems under "Not covered".
What changed
checkExistingConflictread only the legacy.skillshare-meta.jsonsidecar, which installs no longer write, so a reinstall was reported as "already exists" and landed infailed. It now reads the skill's record in.metadata.json, falling back to the sidecar. The skip also requires the same skill, not just the same repo:install <repo>/skills/bar --name fooover an existingfoofrom that repo stays a conflict. Otherwise it would report a skill as installed when it never was.action: "skipped", logged asskipped_skills.--intoto the installer, as the CLI does. Without it, a reinstall into a group folder looked up the top-level skill's record.-aagents. Reinstalling a one-skill repo with-s alpha -a helpernow still installshelper, as the multi-skill path does.ss searchinstalls log skipped names, in both batch and single installs.RECIPE.mdsays so.install.mdand its four translations say that only the same skill of a repo is skipped. The translated "Conflict with different repo" headings get the English anchor, so the new link works in every locale.Why
The docs (
install.md, "same repo → skip with a warning") and--json'sskippedarray describe these outcomes. The code reported them as failures, or as installs that never happened.Behavior change
Reinstalling skills from the same repo without
--forcenow exits 0, and the names appear inskippedinstead offailed.Verification
make checkin the devcontainer passed: Go unit and integration tests, and the Herdr node tests (138 passed).npm run testpassed (109 files, 890 tests);tsc -band eslint on the changed files were clean.python3 scripts/ai-context.py checkpassed. The website production build passed for all five locales, with no broken links or anchors reported.TestCheckExistingConflict_SameRepoInStore,TestCheckExistingConflict_SameRepoOtherSkillTestHandleInstallBatch_KeptItemsAreSkipped(skill, skill into a group folder, agent)TestHandleInstall_TrackSameRepoIsSkippedTestInstallFromSearchResult_LogsSkippedSkill,TestLogSkillInstallOp_LogsSkippedSkillinstallResultwithskippedTestInstall_SkippedSingleSkillStillInstallsRequestedAgent(repo root and subdir source)TestInstall_JSON_OverwriteConsent/git-skillnow expectsskipped.TestInstall_JSON_ReportsKeptAgentsOfSkillReponow expects[alpha beta helper].Not run: Windows, E2E runbooks.
Not covered
/api/installwithouttrack(single, non-tracked install): the dashboard only calls it withtrack: true. A direct API call that reinstalls from the same repo still gets 500 and is logged as failed. On that pathIntois not passed either, so the record lookup misses for--intoinstalls.A source given with a fuzzy subdir (
owner/repo/foothat resolves toskills/foo) is compared before it resolves. Reinstalling it that way stays a conflict, as it already is onmainfor installs recorded in.metadata.json.Checklist
make check) — for code changes