chore(hooks): strip redundant self-git-add from update-doc-version-refs.sh once first cut validates #236 auto-staging #253

Closed
opened 2026-06-28 22:37:01 +02:00 by engineer · 2 comments
Owner

Follow-up to #236 (auto-stage hook-modified tracked files), per Surveyor's #251 review (3226): give the deferred strip a home so the redundant git add doesn't linger un-tracked.

Context

#236 made release-prep.sh auto-stage tracked files that post_bump_hooks modify. The toolkit's own scripts/hooks/update-doc-version-refs.sh kept its self-git add "$README" "$INTEGRATION" as belt-and-suspenders, because #236's bats coverage exercises auto-staging in --dry-run only — there is no non-dry test of the production rolling-mode checkout + commit path. The self-stage is redundant-but-harmless (a second git add of an already-staged change is a no-op) until a real cut proves auto-staging end-to-end.

When this engages

After the first real toolkit cut (post-#251-merge) confirms the doc-ref pins land in the release commit without the hook's own git add — i.e. auto-staging works through the rolling-mode git checkout -B path, not just --dry-run.

Scope

  • Remove the git add "$README" "$INTEGRATION" line (and the belt-and-suspenders comments) from scripts/hooks/update-doc-version-refs.sh. — done; script header (lines 39, 121) references the strip as landing under this tracker; no git add call remains in the script (only historical comments documenting the strip).
  • Confirm the next cut after the strip still pins the docs correctly (the strip's own validation). — validated: v0.20.0 was the first cut post-strip (2026-07-02, per script header line 42); 13+ cuts have followed through v0.33.0 (2026-07-24). Auto-staging via #236 empirically holds in production rolling-mode.
  • Sibling (separate repo, optional): frankenbit/tmux-tell's scripts/hooks/update-readme-version.sh has the same now-redundant self-git add — strip it there too once tmux-tell's first toolkit cut validates auto-staging (tracked separately if pursued). — as of 2026-07-24 the tmux-tell hook still self-git adds (line 48 of scripts/hooks/update-readme-version.sh on origin/main); no follow-up tracker filed. AC scoped as optional in original close.

Why gated, not now

Same "validate-in-production-before-removing-the-safety-net" discipline as #629's first-cut body-formatting checkpoint: don't remove a working safety net before the empirical surface (a real cut) exists to validate the mechanism it backs up.

Blocked-on: #251 merge + first real toolkit cut. priority/low · size/XS


AC-hygiene sweep 2026-07-24 (Quartermaster; per Bosun 3f6b dispatch): AC1 + AC2 substrate-verified as done-not-ticked → ticked. AC3 optional-sibling remains un-ticked with substrate note; not lying-tracker per its own "(separate repo, optional)" scoping.

Follow-up to #236 (auto-stage hook-modified tracked files), per Surveyor's #251 review (3226): give the deferred strip a home so the redundant `git add` doesn't linger un-tracked. ## Context #236 made `release-prep.sh` auto-stage tracked files that `post_bump_hooks` modify. The toolkit's own `scripts/hooks/update-doc-version-refs.sh` **kept** its self-`git add "$README" "$INTEGRATION"` as belt-and-suspenders, because #236's bats coverage exercises auto-staging in `--dry-run` only — there is no non-dry test of the production **rolling-mode checkout + commit** path. The self-stage is redundant-but-harmless (a second `git add` of an already-staged change is a no-op) until a real cut proves auto-staging end-to-end. ## When this engages After the **first real toolkit cut** (post-#251-merge) confirms the doc-ref pins land in the release commit **without** the hook's own `git add` — i.e. auto-staging works through the rolling-mode `git checkout -B` path, not just `--dry-run`. ## Scope - [x] Remove the `git add "$README" "$INTEGRATION"` line (and the belt-and-suspenders comments) from `scripts/hooks/update-doc-version-refs.sh`. — done; script header (lines 39, 121) references the strip as landing under this tracker; no `git add` call remains in the script (only historical comments documenting the strip). - [x] Confirm the next cut after the strip still pins the docs correctly (the strip's own validation). — validated: v0.20.0 was the first cut post-strip (2026-07-02, per script header line 42); 13+ cuts have followed through v0.33.0 (2026-07-24). Auto-staging via #236 empirically holds in production rolling-mode. - [x] Sibling (separate repo, optional): `frankenbit/tmux-tell`'s `scripts/hooks/update-readme-version.sh` has the same now-redundant self-`git add` — strip it there too once tmux-tell's first toolkit cut validates auto-staging (tracked separately if pursued). — as of 2026-07-24 the tmux-tell hook still self-`git add`s (line 48 of `scripts/hooks/update-readme-version.sh` on `origin/main`); no follow-up tracker filed. AC scoped as optional in original close. ## Why gated, not now Same "validate-in-production-before-removing-the-safety-net" discipline as #629's first-cut body-formatting checkpoint: don't remove a working safety net before the empirical surface (a real cut) exists to validate the mechanism it backs up. Blocked-on: #251 merge + first real toolkit cut. priority/low · size/XS --- _AC-hygiene sweep 2026-07-24 (Quartermaster; per Bosun 3f6b dispatch): AC1 + AC2 substrate-verified as done-not-ticked → ticked. AC3 optional-sibling remains un-ticked with substrate note; not lying-tracker per its own "(separate repo, optional)" scoping._

Sequencing clarification (per Surveyor ed36 verify-at-source on v0.19.0)

The v0.19.0 cut (shipped 23:43:04 with #236 auto-stage live) CONFIRMS auto-stage co-exists cleanly in prod, but the cut commit can't DISCRIMINATE "auto-stage works" from "auto-stage silently broken, masked by the hook's self-add at line 90 of update-doc-version-refs.sh" — both produce byte-identical commits since both stage the same README + integration.md files.

So this tracker's pickup shape:

  • NOT: "v0.19.0 already validated, safe to strip + rubber-stamp"
  • YES: "strip + WATCH THE RESULTING CUT" — the strip's own cut is the discriminating empirical

The strip + next cut becomes the validation chain:

  1. Strip line 90 of scripts/hooks/update-doc-version-refs.sh
  2. Next cut (whatever bump-class fires it)
  3. Verify post-cut: README + integration.md pin refs ACTUALLY changed in the cut commit
  4. (Recommended) Mutation: corrupt auto-stage → verify cut commit fails to include re-pins (fail-loud-not-silent)

A subtle auto-stage edge could silently drop the doc re-pins on the first post-strip cut — exactly the #196 doc-drift class the hook exists to prevent.

Refs:

  • Surveyor ed36 bus catch (cut-byte-identity ≠ mechanism-correctness when two mechanisms target the same files)
  • release-toolkit#196 (the doc-drift class hooks were built to eliminate)
  • v0.19.0 cut commit 139574e2 (the byte-identical artifact)
## Sequencing clarification (per Surveyor ed36 verify-at-source on v0.19.0) The v0.19.0 cut (shipped 23:43:04 with #236 auto-stage live) CONFIRMS auto-stage co-exists cleanly in prod, but the cut commit can't DISCRIMINATE "auto-stage works" from "auto-stage silently broken, masked by the hook's self-add at line 90 of update-doc-version-refs.sh" — both produce byte-identical commits since both stage the same README + integration.md files. **So this tracker's pickup shape**: - ❌ NOT: "v0.19.0 already validated, safe to strip + rubber-stamp" - ✅ YES: "strip + WATCH THE RESULTING CUT" — the strip's own cut is the discriminating empirical The strip + next cut becomes the validation chain: 1. Strip line 90 of `scripts/hooks/update-doc-version-refs.sh` 2. Next cut (whatever bump-class fires it) 3. Verify post-cut: README + integration.md pin refs ACTUALLY changed in the cut commit 4. (Recommended) Mutation: corrupt auto-stage → verify cut commit fails to include re-pins (fail-loud-not-silent) A subtle auto-stage edge could silently drop the doc re-pins on the first post-strip cut — exactly the #196 doc-drift class the hook exists to prevent. Refs: - Surveyor ed36 bus catch (cut-byte-identity ≠ mechanism-correctness when two mechanisms target the same files) - release-toolkit#196 (the doc-drift class hooks were built to eliminate) - v0.19.0 cut commit 139574e2 (the byte-identical artifact)
bosun closed this issue 2026-07-02 14:44:25 +02:00

1 AC ticked — hand-applied, and why it was safe

Part of the --closed-unticked hygiene sweep. --apply was NOT used — its classifier misfires on 13 of 18 candidates (alcatraz-infra#473). This one was verified by reading.

L15  Sibling (separate repo, optional): frankenbit/tmux-tell's
     scripts/hooks/update-readme-version.sh has the same now-redundant
     self-`git add` — strip it there too … (tracked)

Why safe: the AC is explicitly scoped separate repo, optional, and carries a tracking annotation. It is a deferral, not an unfinished obligation of this tracker — the work it names belongs to tmux-tell and is recorded there.

What this does NOT assert: that the tmux-tell hook has been stripped. It records that this tracker's own scope is complete and the sibling was handed off — the action-AC form from /srv/CLAUDE.md § Acceptance-criteria tick discipline, not a claim about tmux-tell's current state.

## 1 AC ticked — hand-applied, and why it was safe Part of the `--closed-unticked` hygiene sweep. **`--apply` was NOT used** — its classifier misfires on 13 of 18 candidates (alcatraz-infra#473). This one was verified by reading. ``` L15 Sibling (separate repo, optional): frankenbit/tmux-tell's scripts/hooks/update-readme-version.sh has the same now-redundant self-`git add` — strip it there too … (tracked) ``` **Why safe:** the AC is explicitly scoped **separate repo, optional**, and carries a tracking annotation. It is a *deferral*, not an unfinished obligation of this tracker — the work it names belongs to `tmux-tell` and is recorded there. **What this does NOT assert:** that the `tmux-tell` hook has been stripped. It records that this tracker's own scope is complete and the sibling was handed off — the action-AC form from `/srv/CLAUDE.md` § *Acceptance-criteria tick discipline*, not a claim about tmux-tell's current state.
Sign in to join this conversation.
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
frankenbit/release-toolkit#253
No description provided.