Uh oh!
There was an error while loading. Please reload this page.
fix(hooks): correct the false deferral claim in check-regen-pending.mjs and .githooks/pre-commit - #14545
Merged
Merged
Conversation
…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>
baozhoutao
marked this pull request as ready for review
September 2, 2026 11:28
baozhoutao
enabled auto-merge
September 2, 2026 11:28
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#14470
Both sibling copies of the false "records a DEFERRAL" claim corrected in
scripts/pm/os-regen-merge.shby #14154 survived: therefuse-stalemessage inscripts/check-regen-pending.mjsand 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 skipspre-commitfor 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_HEADpresent at commit time — a conflicted merge an operator resolves and finishes withgit commit. Both texts now state that precisely, mirroring the reference wording already correct inscripts/pm/os-regen-merge.sh:110-115.Old → new
scripts/check-regen-pending.mjs(refuse-stalemessage):bash scripts/pm/os-regen-merge.shruns the sanctioned sequence — it commits the merge first (this hook records that as a deferral) and regeneration follows as its own commit."bash scripts/pm/os-regen-merge.shruns 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):scripts/pm/os-regen-merge.sh, step 3) commits BEFORE regenerating... That commit records a deferral instead of being refused."MERGE_HEADpresent 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, headb5986fd2d).refuse-staletext in a throwaway repo (no merge, no deferral, a pending marker naming a realREGEN_ARTIFACTSentry): exit 1, printed the new sentence verbatim..githooks/pre-commit(git grep -n "githooks/pre-commit" -- scripts .github):check-bash32-floor(--self-test153 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.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 treeb5986fd2d— pass.No third copy of either sentence repo-wide; no test pins the old text.
Changeset
scripts/**+.githooks/— publishes nothing, so no changeset.skip-changesetlabel applied (REST), per the convention PR #14468 followed.Generated by Claude Code
Generated by Claude Code