Skip to content

Keep .stackwich/ out of git when the tools create it - #44

Merged
ovhirup merged 1 commit into
mainfrom
issue-34-self-ignore-state
Nov 2, 2026
Merged

ovhirup merged 1 commit into
mainfrom
issue-34-self-ignore-state

Conversation

@ovhirup

@ovhirup ovhirup commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Closes #34.

Problem

tools/handoff.py and tools/verify_gate.py create .stackwich/ in the user's repository without ignoring it. A later git add -A or git commit -a, from an executor or a person, then commits the handoff and the verification records. The handoff contains the plan, the next step and git status. The docs only asked users to add .stackwich/ to .gitignore by hand.

Change

  • verify_gate.state_dir() creates .stackwich/ together with a .gitignore containing *, so the directory ignores itself. The user's tracked .gitignore is not touched, and if .stackwich/.gitignore already exists it is kept.
  • handoff.py save and verify_gate.py run both create the directory through that helper.
  • docs/handoff.md and docs/verify-gate.md describe the new behavior. A handoff written by hand, without the tools, still needs .stackwich/ ignored; the policy wording for that is Trim the policy block to a word budget enforced in CI #41.

Verification

  • Tests written first: 2 failed before the fix. The third, which checks that an existing .stackwich/.gitignore is kept, passed before and after, as intended.
  • cd tools && python3 -m unittest discover -v: 48 passed, up from 45, with none skipped.
  • cd measured && python3 -m unittest -v test_measured: OK, and approve.py --self-check reports SOD: PASS.
  • All structural check steps of validate.yml, run locally: OK.
  • End to end, in a fresh repository: verify_gate.py run, then handoff.py save, then git add -A.
    • With main's tools, .stackwich/handoff-files.json, .stackwich/handoff.md, .stackwich/verify.jsonl and app.py are staged.
    • With this branch, only app.py is staged.

This branch is independent of #43.


Generated by Claude Code

handoff.py and verify_gate.py created .stackwich/ in the user's repository
without ignoring it, so a later `git add -A` committed the handoff (plan,
next step, git status) and the verification records. The docs only asked
users to add it to .gitignore by hand.

- verify_gate.state_dir() creates .stackwich/ with a .gitignore of `*`,
  so the directory ignores itself without touching the user's .gitignore.
  An existing .stackwich/.gitignore is kept.
- handoff.py save and verify_gate.py run both create it through state_dir().
- docs/handoff.md and docs/verify-gate.md say so; a handoff written by hand,
  without the tools, still needs .stackwich/ ignored (policy wording: #41).

Closes #34.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TgCNfwCj3YG9xP3pMB6z2k
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 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-11-02T08:02:01.700904Z f198629 Draft marked ready
ℹ️ 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.

@ovhirup
ovhirup merged commit 6e53040 into main Nov 2, 2026
2 checks passed
@ovhirup
ovhirup deleted the issue-34-self-ignore-state branch November 2, 2026 09:38
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.

.stackwich/ state can be committed into user repositories

2 participants