Skip to content

fix: verify tracked setup writes with the check-ignore + ls-files pair - #3584

Open
kyle-sexton wants to merge 3 commits into
chore/gitignore-line-convergencefrom
chore/tracked-file-verification-depth
Open

fix: verify tracked setup writes with the check-ignore + ls-files pair#3584
kyle-sexton wants to merge 3 commits into
chore/gitignore-line-convergencefrom
chore/tracked-file-verification-depth

Conversation

@kyle-sexton

Copy link
Copy Markdown
Contributor

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) 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.

Stacked on the Phase 1a PR (codebase-health and toolchain setup files overlap); retarget to main once 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 --quiet in 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 only plugins/source-control/skills/setup/SKILL.md (documented exclusion).
  • markdownlint-cli2 over the 13 touched SKILL.md files: 0 issues.
  • skill-quality check-skill (base main): 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.md Phase 1c. Stacked on the Phase 1a PR (#3569's PR).

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
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T17:20:37.757652Z 14ee4b8 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +72 to +75
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

kyle-sexton and others added 2 commits September 1, 2026 14:16
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant