Repository navigation
Conversation
- Replace .trim() with split/filter to preserve git status porcelain column layout (leading space is the index status, not whitespace) - Only run scope filtering when baseBranch is provided (chain mode); non-chain mode treats all dirty files as in-scope - Skip checkpoint with warning when unrelated dirty files exist (AC-2) - Update tests: drop HEAD...HEAD fallback, add AC-4 integration tests - Add CHANGELOG entry
Closes AC-4 by adding src/lib/workflow/checkpoint.integration.test.ts, which exercises createCheckpointCommit against a real temp worktree: - dirty tracked infra file (.claude/memory.md) → checkpoint skipped + warning - only feature file dirty → scoped checkpoint commit - clean tree → returns true, no commit (AC-5 end-to-end) Also adds two unit tests in run.test.ts: - porcelain rename entries extract the new path, not the old - untracked (??) files in chain mode are classified out-of-scope Clarifies the rename-target .trim() in worktree-manager.ts with a comment.
Without -z, git status --porcelain and git diff --name-only quote paths with non-ASCII or control characters (e.g. "caf\303\251.ts"). The scoping logic would then compare quoted/unquoted strings and misclassify the file as out-of-scope, silently skipping the checkpoint. -z switches to NUL-terminated unquoted output. Rename/copy entries emit the new path followed by a separate old-path entry, which the parser consumes as a pair. Tests: +1 unit (unicode path), +1 integration (unicode path in real git), rewrite rename test to the -z two-entry format.
admarble
added a commit
that referenced
this pull request
Apr 18, 2026
Extends the Chain Mode → Checkpoint Commits section in run-command.md to explain: - Checkpoints stage only files touched by the issue's commits (not git add -A) - The new warn-and-skip output users will see when unrelated dirty files exist - How to respond to the warning - That unicode/special-char paths are handled Pairs with the behavior change shipped in #535. Entire-Checkpoint: 27f002f3c8e8
6 tasks
admarble
deleted the
feature/528-fix-checkpoint-scope-chain-mode-checkpoint-to-feat
branch
April 23, 2026 06:38
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
git add -AincreateCheckpointCommitwith a scopedgit add -- <inScope>. In chain mode, staging is limited to paths touched by the issue's commits (git diff --name-only -z baseBranch...HEAD)..claude/*,.sequant-manifest.jsondirtied bysequant syncor Claude Code memory writes), the checkpoint is skipped with a warning rather than sweeping them into the PR base. This eliminates the regression documented in fix(checkpoint): scope chain-mode checkpoint to feature paths, don't sweep dirty tree #528 (PR feat: Add smoke test step for UI issues in /exec #37 shipped +5600 lines of contamination).-z(NUL-terminated) output on bothgit status --porcelainandgit diff --name-only, so paths with unicode or special characters aren't misclassified by git's default quoting.Test plan
npm run buildcleannpm run lintclean (0 warnings)src/commands/run.test.ts(12 newcreateCheckpointCommittests covering scoped staging, warn+skip, rename pairs, unicode paths, untracked files, non-chain fallback, clean tree, and failure paths)src/lib/workflow/checkpoint.integration.test.tsspawns realgitagainst a temp worktree; covers: dirty non-feature file → warn+skip, clean-out-of-scope → scoped commit, clean tree → no-op, unicode path round-tripAC coverage
baseBranch...HEAD, notgit add -A["add","-A"]assertion), scoped + abort paths coveredgitin temp worktreeCHANGELOG.mdentry under[Unreleased] → Fixed