fix: verify tracked setup writes with the check-ignore + ls-files pair - #3584
fix: verify tracked setup writes with the check-ignore + ls-files pair#3584kyle-sexton wants to merge 3 commits into
Conversation
Phase 1c of the customization-consistency program: every setup that writes tracked consumer files now verifies with both probes — git check-ignore -v (not excluded by .gitignore) AND git ls-files --error-unmatch (actually tracked) — the pair bugs/improvement/ mutation-testing already used. check-ignore alone cannot distinguish tracked from written-but-untracked, the guaranteed state right after a fresh write. INVENTORY §6.4 names fixed: codebase-health, code-tidying, toolchain, repo-fleet-hygiene. Sweep additions (same gap): claude-config, work-items, github, songwriting, discovery, verification, planning, review, ai-slop. Excluded: source-control (stronger staged-status probes in its apply spoke), the three exemplars, and overlay-only check-ignore uses per the class definition. work-items trimmed to stay under the 500-line cap. Gates: markdownlint clean, skill-quality check-skill PASS on all 13. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014uBXt1tMEReShbpG5gsFUd
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 14ee4b813c
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| 8. **Tracked-file pair** (only when the config lives inside a git worktree, e.g. a project's | ||
| tracked `.claude/repo-fleet-hygiene.conf`): `git check-ignore -v "<path>"` reports no match (a | ||
| match is FAIL with the pattern — teammates would never receive the config) AND | ||
| `git ls-files --error-unmatch "<path>"` exits 0 (non-zero is un-ignored but untracked; FAIL |
There was a problem hiding this comment.
Run the probes in the config's owning worktree
When an explicit --config points inside a different worktree (for example, a fleet config kept in a dotfiles checkout), these commands still run against the current project's repository, so ls-files exits nonzero for the outside path and setup incorrectly reports an already-tracked config as untracked; check-ignore likewise consults the wrong repository's rules. I confirmed this behavior and checked git --help, which exposes -C <path> for selecting the command context, and git ls-files -h, which defines --error-unmatch in terms of the selected repository's index. Resolve the worktree containing the config and run both probes there with a repository-relative path.
Useful? React with 👍 / 👎.
…le-verification-depth
Patch bumps with a matching CHANGELOG entry each, per the changelog-parity gate's published-version-reuse rule. Also merges the Phase 1a branch forward (its own bumps) so this stacked branch stays monotonic above its base. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014uBXt1tMEReShbpG5gsFUd
Closes #3571
Summary
Phase 1c of the customization-consistency program: every setup that writes tracked consumer files now verifies with both
git check-ignore -v(not excluded) ANDgit ls-files --error-unmatch(actually tracked), the pair bugs/improvement/mutation-testing already used. check-ignore alone cannot distinguish tracked from written-but-untracked, the guaranteed state right after a fresh write.Stacked on the Phase 1a PR (codebase-health and toolchain setup files overlap); retarget to
mainonce 1a merges.Fix
INVENTORY §6.4 names: codebase-health (apply verify), code-tidying (check probe + apply verify; check-side untracked downgrades to INFO only for a user-confirmed deliberately-private lane, per its declared deviation), toolchain (check FAIL classes + post-write confirm), repo-fleet-hygiene (new check probe 8 + apply verify list; skipped-with-reason outside a worktree). Sweep additions with the same gap: claude-config (team audit-pass.md probe), work-items (binding confirm + schedule/binding probe; trimmed to stay under the 500-line cap), github (team-layer verdict + post-write re-run), songwriting (scaffold confirm), discovery / verification / planning (topic-docs.yaml verify), planning / review (standards bootstrap writes), ai-slop (team write verify).
Exclusions: source-control (exceeds the pair with
git status --porcelain+git add+git diff --quietin its apply spoke, which also carries ls-files); the three exemplars; overlay-only check-ignore uses (verify a file IS ignored) per the class definition; the ~35 setups that write no tracked file.Verification
grep -rln "check-ignore" plugins/*/skills/setup/ --include='*.md' | xargs grep -L "ls-files"returns onlyplugins/source-control/skills/setup/SKILL.md(documented exclusion).check-skill(basemain): PASS on all 13 (work-items initially tripped the 500-line hard cap and was trimmed to 499).Related
Refs
docs/topics/customization-consistency/PLAN.mdPhase 1c. Stacked on the Phase 1a PR (#3569's PR).