Repository navigation
fix(#1354): warn when tracked skills have uncommitted changes — phases use the committed ones - #1385
Merged
Merged
Conversation
…s use the committed ones sequant run checks phase worktrees out from git, so an uncommitted sync never reaches a phase. run (before provisioning), doctor, sync and update now say so and name the committed version, from one shared helper (src/lib/skills-commit-state.ts). Entire-Checkpoint: 2fdad61d2fc8
Entire-Checkpoint: d48eecccb7f4
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sequant runchecks each phase worktree out from git, so phases load the skills committed atHEAD. Asequant syncthat was never committed never reached a phase. TheSkills are outdatedwarning read the version file on disk, so it named a version the phases weren't using. Downstream, on 2026-10-06, it said 2.18.0 while every phase ran the committed 2.15.1, and the run failed in a way only the phase transcripts could explain.The new
src/lib/skills-commit-state.tsreads what git sees: tracked files under.claude/skills/with uncommitted changes, and.sequant-versionatHEAD. One formatter produces the warning everywhere:sequant run: warns before any worktree is provisioned, next to the fix(run): spec runs in the main checkout, which the skills pre-flight never checks — a stale checkout silently degrades spec (#933 regression) #1193 main-checkout pre-flight, when the run resolves skills and uses worktree isolation. It's a warning, not a failure, consistent with fix(doctor/run):doctorandrun --dry-runreport success when nothing would work #1257: a failure would block anyone who keeps deliberate local skill edits.doctor: the "Skills Committed" check warns on tracked-but-modified skills. fix(doctor/run):doctorandrun --dry-runreport success when nothing would work #1257 already handled untracked ones.sync/update: after writing, tell the user to commit.claude/skills/. This is checked against git state rather than the list of written files, so it also fires when the skills were already uncommitted before this sync.docs/troubleshooting.md: a new entry, "Phases behave like an older sequant aftersync".Rejected alternative: copying working-tree skills into worktrees. It would make phase behavior depend on uncommitted state, which is the opposite of why worktrees come from git.
Fixes #1354
AC coverage
runwarns before provisioning and names the committed versionsrc/lib/workflow/run-skills-commit-warning.integration.test.tsuses a real git repo (committed 2.15.1, on disk 2.18.0) and asserts the warning printed beforeensureWorktrees.src/lib/skills-commit-state.integration.test.tscovers the state reader.doctorwarns on tracked skills with uncommitted changessrc/commands/doctor.test.ts> "warns when tracked skills have uncommitted changes, naming the committed version (#1354)"sync/updatesay to commit the skillssrc/lib/skills-commit-state.integration.test.ts> "AC-3: sync's closing message…".updatecalls the samewarnUncommittedSkills.grep -n "Phases behave like an older sequant after" docs/troubleshooting.mdAffected suites pass:
src/commands, skills pre-flight, the orchestrator and the new tests, 51 files and 770 tests.tscandnpm run lintare clean.Mutation records
Mutation-verified: AC-1 — disabled the run warning (
if (warning && false)); the run test failed; restored.Mutation-verified: AC-2 — forced
modified: []at doctor's call site; the doctor #1354 test failed and 73 others passed; restored.Mutation-verified: AC-3 — disabled
warnUncommittedSkills's print; the AC-3 test failed; restored.🤖 Generated with Claude Code