feat(release-prep): auto-stage hook-modified tracked files (eliminate the hooks-must-git-add footgun) #236
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit#236
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Surfaced by Engineer during #209 recon (bus id 2911):
release-prep.sh'sgit commitis explicit-staged-only (no-a). Hooks that modify tracked files must currently callgit addthemselves, or their edits are silently left uncommitted. This is a footgun for hook authors: the documented mechanism says "hooks modify files," but the staging requirement is undocumented + non-obvious.#209 (the post_bump_hooks dogfood) ships the convention "hooks must git-add their own changes" as the immediate-scope LEAN A. This tracker proposes the structural fix.
Proposal — ALT B (from #209 fork-2)
Enhance release-prep to auto-stage hook-modified tracked files: snapshot the working tree state before the hook loop, run hooks, then
git addany tracked files the hooks modified before the commit.git addboilerplate neededImplementation surface
git addany tracked files whose state changedgit add→ auto-staged + committeddocs/integration.md§ Post-bump hooks to drop the "must git-add" requirement once this landsComposition
What this PR does NOT do
Refs
priority/low · size/S
engineer referenced this issue2026-06-28 14:46:46 +02:00