Skip to content

fix(install): report reinstalls from the same repo as skipped - #887

Merged
runkids merged 2 commits into
mainfrom
runkids/install-skip-reporting
Nov 13, 2026
Merged

runkids merged 2 commits into
mainfrom
runkids/install-skip-reporting

Conversation

@runkids

@runkids runkids commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Type

  • Bug fix
  • Small improvement (docs, typo, minor refactor)
  • Feature proposal (proposals/ only — see CONTRIBUTING.md)
  • Approved feature or large change (the linked issue has the approved label)

Linked Issue

Follow-up to #884 and #886, which listed these problems under "Not covered".

What changed

  • Reinstalling a skill from the same repo is skipped, as documented. checkExistingConflict read only the legacy .skillshare-meta.json sidecar, which installs no longer write, so a reinstall was reported as "already exists" and landed in failed. 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 foo over an existing foo from that repo stays a conflict. Otherwise it would report a skill as installed when it never was.
  • The dashboard reports kept items as skipped.
    • Batch installs logged an existing agent as installed. Kept agents and same-repo skills are now results with action: "skipped", logged as skipped_skills.
    • The install dialog shows its "already installed" warning for them instead of closing as if they were installed.
    • A tracked reinstall of the same repo returns 409 (was 500) and is logged as skipped, not failed.
    • Batch installs now pass --into to the installer, as the CLI does. Without it, a reinstall into a group folder looked up the top-level skill's record.
  • A skipped single skill no longer stops -a agents. Reinstalling a one-skill repo with -s alpha -a helper now still installs helper, as the multi-skill path does.
  • ss search installs log skipped names, in both batch and single installs.
  • Herdr: the panel's install result reports skipped names the way it reports failed ones, and RECIPE.md says so.
  • Docs: install.md and 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's skipped array describe these outcomes. The code reported them as failures, or as installs that never happened.

Behavior change

Reinstalling skills from the same repo without --force now exits 0, and the names appear in skipped instead of failed.

Verification

  • make check in the devcontainer passed: Go unit and integration tests, and the Herdr node tests (138 passed).
  • UI: npm run test passed (109 files, 890 tests); tsc -b and eslint on the changed files were clean.
  • python3 scripts/ai-context.py check passed. The website production build passed for all five locales, with no broken links or anchors reported.
  • New tests, each seen failing before its fix:
    • TestCheckExistingConflict_SameRepoInStore, TestCheckExistingConflict_SameRepoOtherSkill
    • TestHandleInstallBatch_KeptItemsAreSkipped (skill, skill into a group folder, agent)
    • TestHandleInstall_TrackSameRepoIsSkipped
    • TestInstallFromSearchResult_LogsSkippedSkill, TestLogSkillInstallOp_LogsSkippedSkill
    • InstallDialog: "reports a kept skill as already installed"
    • Herdr installResult with skipped
    • TestInstall_SkippedSingleSkillStillInstallsRequestedAgent (repo root and subdir source)
  • Updated expectations:
    • TestInstall_JSON_OverwriteConsent/git-skill now expects skipped.
    • TestInstall_JSON_ReportsKeptAgentsOfSkillRepo now expects [alpha beta helper].

Not run: Windows, E2E runbooks.

Not covered

  • /api/install without track (single, non-tracked install): the dashboard only calls it with track: true. A direct API call that reinstalls from the same repo still gets 500 and is logged as failed. On that path Into is not passed either, so the record lookup misses for --into installs.

  • A source given with a fuzzy subdir (owner/repo/foo that resolves to skills/foo) is compared before it resolves. Reinstalling it that way stays a conflict, as it already is on main for installs recorded in .metadata.json.

Checklist

  • I've read CONTRIBUTING.md, including its AI-assisted contributions section — left for the maintainer to confirm
  • I've reviewed every line of the diff and can explain it — left for the maintainer to confirm
  • Tests included and passing (make check) — for code changes
  • No unrelated changes in the diff
  • Scope is focused — one concern per PR

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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T15:15:20.756406Z 9df13be Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +524 to 525
if err := checkExistingConflict(destPath, store.GetExact(key), discovery.Source.CloneURL, fullSubdir, hint); err != nil {
return nil, err

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@runkids

runkids commented Nov 13, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 9df13be02c

ℹ️ 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".

@runkids
runkids merged commit cfe235a into main Nov 13, 2026
9 checks passed
@runkids
runkids deleted the runkids/install-skip-reporting branch November 13, 2026 16:03
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