Skip to content

fix(hooks): correct the false deferral claim in check-regen-pending.mjs and .githooks/pre-commit - #14545

Merged
baozhoutao merged 2 commits into
mainfrom
claude/issue-14470-deferral-prose
Sep 2, 2026
Merged

fix(hooks): correct the false deferral claim in check-regen-pending.mjs and .githooks/pre-commit#14545
baozhoutao merged 2 commits into
mainfrom
claude/issue-14470-deferral-prose

Conversation

@baozhoutao

Copy link
Copy Markdown
Contributor

Fixes #14470

Both sibling copies of the false "records a DEFERRAL" claim corrected in scripts/pm/os-regen-merge.sh by #14154 survived: the refuse-stale message in scripts/check-regen-pending.mjs and the header of .githooks/pre-commit. Both said this hook records the sanctioned landing sequence's step-3 commit as a deferral. It does not — step 1's merge (git merge --no-edit) auto-commits with no hook run at all (git skips pre-commit for a merge it completes itself), so the marker is untouched going into step 3, whose commit is an ordinary one this hook refuses on purpose. That refusal is the designed collection point, not a deferral.

The deferral mode (#8047) is real, but applies only to a merge commit finished BY HAND with MERGE_HEAD present at commit time — a conflicted merge an operator resolves and finishes with git commit. Both texts now state that precisely, mirroring the reference wording already correct in scripts/pm/os-regen-merge.sh:110-115.

Old → new

scripts/check-regen-pending.mjs (refuse-stale message):

  • Old: "Landing a merge? bash scripts/pm/os-regen-merge.sh runs the sanctioned sequence — it commits the merge first (this hook records that as a deferral) and regeneration follows as its own commit."
  • New: "Landing a merge? bash scripts/pm/os-regen-merge.sh runs the sanctioned sequence — its merge auto-commits first with no hook run at all (git skips pre-commit for a merge it completes itself), so THIS refusal, on the ordinary commit right after, is that sequence's designed collection point — not a deferral. Regeneration follows as its own commit."

.githooks/pre-commit (header):

  • Old: "One commit is exempt, and only one: the MERGE commit itself, which the sanctioned landing sequence (scripts/pm/os-regen-merge.sh, step 3) commits BEFORE regenerating... That commit records a deferral instead of being refused."
  • New: "One commit is exempt, and only one: a MERGE commit finished BY HAND, with MERGE_HEAD present at commit time... The sanctioned landing sequence (scripts/pm/os-regen-merge.sh) does NOT hit that exemption: its step 1 merge auto-commits with no hook run at all..., so the marker is untouched going into step 3, whose commit is an ORDINARY one this hook refuses on purpose — that refusal is the designed collection point... not a deferral."

Scope

Prose only, two files, no behaviour change — decide() and every code path are untouched. #14154's triage already ruled the hook's behaviour correct; this card only corrects the two sentences describing it.

Verification

  • node scripts/check-regen-pending.mjs --self-test — pass (on the merged tree, head b5986fd2d).
  • Live-triggered the new refuse-stale text in a throwaway repo (no merge, no deferral, a pending marker naming a real REGEN_ARTIFACTS entry): exit 1, printed the new sentence verbatim.
  • Readers of .githooks/pre-commit (git grep -n "githooks/pre-commit" -- scripts .github): check-bash32-floor (--self-test 153 cases + live check), check-regen-pending.mjs's own self-test, git-merge-regen.mjs --self-test — all pass; lint.yml's reference is prose-only.
  • node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands scripts/check-regen-pending.mjs .githooks/pre-commit → 18 commands, all run → --ran: 18 derived, 18 run, 0 NOT-MEASURED, 0 UNRUN.
  • pnpm check:ratchet-remedy-authority, pnpm check:declared-population-live, node scripts/check-self-test-wired.mjs, pnpm check:bash32-floor — all pass.
  • Narrowed lint (eslint --no-inline-config scripts/check-regen-pending.mjs) — clean.
  • git fetch origin main && git merge origin/main (clean, no conflicts) → self-test re-run on merged tree b5986fd2d — pass.

No third copy of either sentence repo-wide; no test pins the old text.

Changeset

scripts/** + .githooks/ — publishes nothing, so no changeset. skip-changeset label applied (REST), per the convention PR #14468 followed.

Generated by Claude Code


Generated by Claude Code

…js and .githooks/pre-commit

Both sibling copies of the false claim corrected in os-regen-merge.sh by
#14154 survived: the hook's refuse-stale message and the pre-commit header
still said this hook records the sanctioned landing sequence's step-3
commit as a deferral. It does not — step 1's merge auto-commits with no
hook run at all (git skips pre-commit for a merge it completes itself), so
the marker is untouched going into step 3, whose commit is an ordinary one
this hook refuses on purpose. That refusal is the designed collection
point, not a deferral.

The deferral mode (#8047) is real, but applies only to a merge commit
finished BY HAND with MERGE_HEAD present at commit time — a conflicted
merge an operator resolves and finishes with `git commit`. Both texts now
state that precisely, mirroring the reference wording already correct in
scripts/pm/os-regen-merge.sh:110-115.

Fixes #14470

Co-Authored-By: Claude Code <noreply@anthropic.com>
@claude claude Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 2, 2026
@github-actions github-actions Bot added the size/s label Sep 2, 2026
@baozhoutao
baozhoutao marked this pull request as ready for review September 2, 2026 11:28
@baozhoutao
baozhoutao enabled auto-merge September 2, 2026 11:28
@baozhoutao
baozhoutao added this pull request to the merge queue Sep 2, 2026
Merged via the queue into main with commit e6fd6b2 Sep 2, 2026
36 checks passed
@baozhoutao
baozhoutao deleted the claude/issue-14470-deferral-prose branch September 2, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants