You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
update: tracked-repo pull and the post-pull audit gate exist in three copies #443
"Update one tracked repo" — dirty check → pull / force pull → audit scan → ResetHard(beforeHash) on failure — exists as three pull flows and three audit gates. This is a fail-closed safety sequence, and the copies no longer behave the same.
The server discards the dirty-check error (handler_update.go:307, isDirty, _ := git.IsDirty(repoPath)); the CLI treats it as a failure (update_handlers.go:120-126).
The CLI gate calls install.ApplyAcceptedFindings / RecordAcceptedFindings (update_handlers.go:20,62). internal/server has no direct call to either.
refreshTrackedRootSkillMetadata runs only in the CLI path.
The "rollback also failed, malicious content may remain" message is assembled separately in each copy.
Commits efcc3e6, d2b322e, b92938a and aafb7e7 look like the same follow-policy or branch change applied once per side (judged from commit titles only).
Proposed change
Make "update one tracked repo" a single operation in internal/install (or a new internal/update), built on auditGateFailClosed, which is the most complete gate today. It owns dirty detection, pull, audit gate, rollback and metadata refresh and returns a structured result. The CLI keeps spinner, prompt and printing; the handler converts to JSON.
Rollback paths (scan failure, threshold exceeded, reset failure) are then tested once, against a local bare repo.
Risks
The CLI asks whether to accept findings; the interface has to carry that decision point without growing wide.
updateTrackedRepo and updateTrackedRepoQuick are already two copies inside the CLI and may need merging first.
Activity
test(update): pin tracked-repo update behaviour of the dashboard and CLI
refactor(update): update tracked repos through one shared operation
fix(update): keep the tracked-repository wording and log metadata errors
refactor(update): load metadata only for root-skill repos, report once