Bind provider credentials to canonical or explicitly configured HTTPS origins and preserve that policy across remote consumers. Reject cross-site credentialed reads, linked fallback directories, and discovered-agent writes outside the source; audit staged content before rooted atomic publication.
Add boundary regressions, private Git update coverage, stable cross-platform fixtures, and aligned documentation. Verified the integrated main baseline with all executed CI checks passing.
Tracked repos are shallow blob:none partial clones, so they lack the
blobs of intermediate commits. Since git 2.45.1, a local upload-pack
refuses to lazy-fetch missing objects, so both the candidate clone and
the publish fetch back into the checkout failed with "fetch-pack:
invalid index-pack output" once more than one upstream commit arrived.
Re-enable lazy fetching only for these two local transports, whose
source is our own checkout, and pass origin's auth env so private
repos can supply the blobs. Fetched blobs are hash-addressed, so the
published tree still matches the audited revision.
Closes#667
Two dashboards (or a dashboard and the CLI) serving the same source ran
"Update all" at once. The server mutex only covers one process, so both
pulled into the same checkouts: one saw the other's half-applied merge as
"local changes would be overwritten", and concurrent fetches into a
blob:none clone failed with "fetch-pack: invalid index-pack output".
update.TrackedRepo, install --track --update, and the in-place pull of a
git-installed skill now hold a flock in the checkout's git directory; a
second process waits up to a minute, then fails with a clear message.
Force on a git-installed skill only skipped the local-modification check
and then ran a plain pull, which refused to merge over the edits the docs
say --force discards. It now fetches and resets to upstream, so a failed
fetch still keeps the edits. Followed checkouts keep pulling, since they
must be clean and may hold the user's unpushed commits.
The pull error dropped the file list git indents under it, and the
finished-update subtitle said everything was up to date even when items
had failed.
* fix(update): audit tracked candidates before publication
Prevent rejected tracked-update bytes from becoming readable through published target links by staging and auditing a private candidate before updating the active checkout. Publish the exact approved revision without a second upstream pull.
Preserve sparse state, audit metadata, followed checkouts, and compatible edits. Recover staged and unstaged changes after failed forced publication, including deletions, renames, and sparse exclusions. Cover the boundary deterministically and align error messages and localized documentation.
* fix(update): preserve local bytes across Git line-ending conversion
Overlay dirty worktree bytes after staging candidate patches so core.autocrlf does not silently rewrite local edits. Cover staged, unstaged, and cancelled worktree changes while retaining their index state.
Make permission-failure coverage explicitly POSIX-only and compare private checkout contents to their original bytes. Align red-team assertions with candidate rejection and register private temporary cleanup with the raw-write guard.
* test(install): normalize checkout after configuring line endings
Windows fixtures initially inherit core.autocrlf=true. Reset the isolated checkout after selecting the subtest setting so changing it to false does not turn untouched upstream files into local edits.
* fix(update): honor accepted findings in dashboard tracked updates
The dashboard ignored findings accepted through the CLI, so a tracked repo
that `update --force` let through was blocked again on the next dashboard
update, and every dashboard Force Retry had to be repeated. Regular skill
updates in the dashboard already honored and recorded acceptances, so only
tracked repos differed.
Tracked-repo updates now always honor accepted findings and record the ones
an override lets through, for both callers. The opt-in option and the
AuditGate flag it fed are removed, since no caller turns them off.
Dashboard agent tracked repos passed an empty source dir, so a nested repo
kept acceptances in its group folder under a different key than the CLI.
They now pass the agents source, as the CLI does.
* fix(update): reload the agents store after agent repo refresh
Dashboard agent tracked repos now refresh metadata in the agents source,
but a metadata change reloaded the skills store, leaving the agents store
as it was until the next request. Reload the store that matches the source.
Every caller of update.TrackedRepo now passes a source dir, so the
empty-dir guard and its doc no longer describe a supported mode. The new
agent test reuses the tracked fixture instead of rebuilding it.
Simplify and code-review passes over #474 found the fix spread over
several definitions of "tracked repo" and three holes in the repair.
One install.IsTrackedCheckout (a _-prefixed git checkout) now backs
GetTrackedRepos, GetUpdatableSkills, the dashboard routing and the repair.
GetUpdatableSkills skipping such entries replaces the two CLI resolver
filters, so `skillshare check` and the dashboard Updates tab no longer list
a rewritten repo a second time as a regular skill. The repair checks that
one path instead of walking the whole source tree.
- Reconcile sets tracked on a checkout again without dropping type or
repo_url, so a rewritten entry that went through it was never cleaned.
The repair now also runs when those regular-install fields remain.
- The repair used GetByPath, whose basename fallback can return another
top-level item's entry; it now uses the repo's own key.
- A tracked entry whose checkout is gone fell through to the basename
fallback of resolveTrackedRepo and pulled a different repo with the same
basename. It now reports the repo as missing on disk.
The old dashboard update rewrote a tracked repo's metadata entry as a
regular install: tracked was dropped and type, repo_url and version were
added. Those repos stayed broken after the routing fix, because
`skillshare update <repo>` found the name twice (as a repo and as a
regular skill) and refused it, and nothing restored the entry.
The shared tracked-repo update now restores such an entry to what
install --track records (source, branch, group, tracked) when its path is
a checkout GetTrackedRepos lists, so regular skills are never touched.
CLI name and glob resolution skip a regular-skill match whose path is
already a tracked repo, so the update can reach that repair.
Codex review: the routing fix sent every git checkout with metadata to
the tracked-repo update, including standalone skills installed as a full
checkout, whose regular update records the new version and commit.
Their version stayed stale and update checks kept reporting an update.
Only tracked entries and _-prefixed checkouts now skip the regular path.
The CLI and dashboard update a tracked repo through update.TrackedRepo,
which never looked for submodules. A pull that turned a skill directory
into a submodule reported success and the skill vanished on the next
sync. TrackedRepoResult now carries the skipped-submodule warnings and
both callers show them.
Refs #433
The dashboard update of N tracked repos loaded the metadata store 2N times
under the server lock, and each load walks the whole source tree. The refresh
now returns before loading when the repo has no root SKILL.md, reports
whether it saved a change, and the server reloads its store only then,
through the existing reloadSkillsStore.
The CLI single-repo path tracked its output with two flags and a OnceFunc.
The caller hook now runs once for every outcome, so the spinner stop, the
discard warning and the pull summary live in one place and print in the same
order as before.
auditGateFailClosed rebuilt three of its messages by hand; they are
AuditGateError's own wording with another subject, so both now come from one
function.
Refs #443
Updating a tracked repo is a fail-closed sequence: check for uncommitted
changes, pull, audit what was pulled, reset to the pre-pull commit when the
audit blocks. The CLI had two copies of the pull flow, the dashboard a third,
and the audit gate existed four times (CLI, dashboard, and two in install).
The copies had drifted: the dashboard ignored a failed git status and never
refreshed root-skill metadata, and each copy worded a failed rollback on its
own.
update.TrackedRepo now owns the sequence and returns a structured result;
install.AuditGate is the only gate. internal/update is a new package because
internal/git already imports internal/install. The CLI keeps its spinner,
rows and the "Apply anyway?" prompt, passed in as one Confirm callback; the
dashboard turns the result into its JSON item.
Behaviour changes, all towards the stricter copy:
- the dashboard reports a failed git status as an error instead of pulling;
- the dashboard refreshes root-skill metadata after an update, like the CLI;
- a prompt that fails rolls the update back instead of leaving it applied;
- the rollback-failed and rollback-unavailable texts come from one place.
Accepted findings stay as they were (CLI honours and records them, the
dashboard does neither), now as the explicit AcceptedFindings input. The
"blocked and rolled back" texts are unchanged per caller because the
dashboard matches on them.
Refs #443