Skip to content

fix(project): keep config.yaml true after reinstall, uninstall and fresh-clone installs - #860

Merged
runkids merged 1 commit into
mainfrom
runkids/project-reinstall-source-858
Nov 11, 2026
Merged

runkids merged 1 commit into
mainfrom
runkids/project-reinstall-source-858

Conversation

@runkids

@runkids runkids commented Nov 11, 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

Closes #858

What and why

In project mode the committed .skillshare/config.yaml is what teammates install from. Three gaps let it disagree with what a machine really has:

Problem Before Now
Uninstall leaves the entry CLI uninstall -p and the dashboard's single-skill and tracked-repo removal kept the skill in config.yaml; the next install -p brought it back They drop the entry and the lock pin through one shared config.ForgetProjectSkills
Reinstall from a new source (#858) Only the gitignored .metadata.json got the new source. config.yaml kept the old one, and skills.lock.json ended with the old source and the new commit The config entry and the pin follow the skill the command reinstalled
Fresh clone loses declared skills Reconcile removed every entry with no folder and no record, so install <source> -p on a fresh clone deleted all other declared skills An entry goes only when the skill was installed here and is now gone, was moved, or a command removed it

How the reinstall case is decided: installs from a named source (CLI install, search, dashboard) compare the install records from before and after the command (config.ReconcileProjectInstall). Only a skill whose source, branch or tracked mode changed in between rewrites its config entry. Install from config (install -p) never rewrites an entry from local records, so a teammate's edit to config.yaml survives on a machine that has not updated yet.

Because reconcile no longer treats "no folder, no record" as removed, the flows that remove or move a skill say so themselves: move passes the old paths (config.ReconcileProjectMove), and update --prune cleans the config in project mode.

Tests

  • internal/config: config follows a reinstalled source; an untouched skill keeps its declared source; ForgetProjectSkills drops entries and pins (group folder, name-prefix neighbour, same-named agent entry kept); an entry not installed here is kept.
  • tests/integration: the Project mode: reinstalling a skill from a new source keeps the old source in .skillshare/config.yaml #858 flow via uninstall and via --force (config and lockfile name only the new source); a named-source install on a fresh clone keeps the other declared skills; group uninstall now asserts the config.
  • internal/server: dashboard reinstall from a new source; single-skill uninstall drops the config entry.
  • The Project mode: reinstalling a skill from a new source keeps the old source in .skillshare/config.yaml #858 integration test and the dashboard test were run against the unfixed code first and failed there.
  • make check passes; the whole tests/integration suite passes.
  • Manual runs in the devcontainer image (25 scenarios): grouped installs, group and --all uninstall, tracked repo, --dry-run, --json, trash restore, branch change, failed install, teammate-edited config, fresh clone, move, hand-deleted and hand-moved folders, update --all --prune.

Not run: UI tests and website build beyond what make check covers; no E2E runbook was added.

Not covered

  • A legacy tracked-repo record whose group lacks the _ prefix (repo _team, records in group team): uninstall _team -p does not drop team/... config entries.
  • Moving a group that still has declared-but-not-installed skills leaves those entries at the old path.
  • update --prune cleaning the project config is verified by hand only.
  • install -s records a per-skill source that GitLab and file:// sources cannot install again #859 (the per-skill source install -s records for GitLab and file:// sources) is a separate bug.

Checklist

  • I've read CONTRIBUTING.md, including its AI-assisted contributions section
  • I've reviewed every line of the diff and can explain it
  • Tests included and passing (make check) — for code changes
  • No unrelated changes in the diff
  • Scope is focused — one concern per PR (the fresh-clone fix is included because narrowing that reconcile rule is what the uninstall fix makes possible)

…esh-clone installs

In project mode the committed config.yaml is what teammates install from, but
it could disagree with what a machine actually has (#858):

- `uninstall -p` and the dashboard's single-skill and tracked-repo removal
  left the skill's entry in config.yaml, so a later `install -p` brought it
  back. They now drop the entry and the lock pin through one shared
  config.ForgetProjectSkills, as the uninstall docs already promised.
- Installing a skill again from another source or branch (after an uninstall,
  or over the copy with --force) updated only the gitignored .metadata.json.
  config.yaml kept the old source and skills.lock.json ended with the old
  source and the new commit. Installs from a named source (CLI install,
  search, dashboard) now compare the records from before and after the
  command and let the config entry follow the skills it actually reinstalled.
  Install from config never rewrites an entry from local records, so a
  teammate's edit survives on a machine that has not updated yet.
- Reconcile removed every config entry that had no folder and no record. On a
  fresh clone nothing is installed yet, so `install <source> -p` deleted all
  the other declared skills. An entry now goes only when the skill was
  installed here and its folder is gone, when it was moved, or when a command
  removed it; `move` passes the old paths and `update --prune` cleans the
  config itself.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 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-11T14:36:16.055031Z 43bd993 PR opened
ℹ️ 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.

@runkids
runkids merged commit 769087b into main Nov 11, 2026
9 checks passed
@runkids
runkids deleted the runkids/project-reinstall-source-858 branch November 15, 2026 17:52
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.

Project mode: reinstalling a skill from a new source keeps the old source in .skillshare/config.yaml

1 participant