Uh oh!
There was an error while loading. Please reload this page.
docs(scripts/pm): correct os-regen-merge step-3 docblock's hook claim - #14468
Merged
baozhoutao merged 2 commits intoSep 2, 2026
Conversation
The "Step 3 and the pre-commit hook agree (#8047)" section asserted the pre-commit hook "records a DEFERRAL rather than refusing" for step 3's commit. Measured (2026-09-01, #13657 comment 5491447862): it refuses. The hook's deferral mode (#8047) applies only to a merge commit finished BY HAND with `git commit` while `MERGE_HEAD` is present. This script's step 1 (`git merge --no-edit origin/main`) auto-commits with no hook run at all when there is no conflict — git skips pre-commit for a merge it completes itself — so step 3's commit is an ORDINARY commit with no `MERGE_HEAD`, and the hook's `refuse-stale` path fires instead (check-regen-pending.mjs decide(): blocked && !merging && !deferral). Rewrote the section to describe the refusal as the designed outcome (the merge already landed at step 1, so nothing is lost) and to quote the measured hook output on both sides — the refusal and the repair commit's confirmation. Kept the #8047 heading/history reference and the fact that a deferral mode exists; narrowed only WHEN it applies. No behaviour change: step 3's refusal fallback and self-test case 4 already describe the measured behaviour and are untouched.
…-regen-merge-step3-docblock
This was referenced Sep 2, 2026
baozhoutao
marked this pull request as ready for review
September 2, 2026 09:00
baozhoutao
enabled auto-merge
September 2, 2026 09:00
Uh oh!
There was an error while loading. Please reload this page.
baozhoutao
deleted the
claude/issue-14154-os-regen-merge-step3-docblock
branch
September 2, 2026 09:28
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#14154
What changed
scripts/pm/os-regen-merge.sh's "Step 3 and the pre-commit hook agree (#8047)"docblock section claimed the
os-regenpre-commit hook "records a DEFERRALrather than refusing" for step 3's commit. Measured on 2026-09-01 (#13657
comment 5491447862): the hook refuses step 3's commit, and the script
exits 1 mid-sequence — with step 1's merge commit already landed, so nothing
is lost.
Mechanism, verified on this tree (
.githooks/pre-commit:16-18,scripts/check-regen-pending.mjsmergeInProgress()/decide()): thehook's deferral mode applies only to a merge commit finished by hand,
MERGE_HEADpresent at commit time. This script's step 1(
git merge --no-edit origin/main,:238) auto-commits with no conflicts,and git runs no hook for a merge it completes itself — so the marker is
untouched going into step 3. Step 3's commit is therefore an ordinary
commit with no
MERGE_HEAD, anddecide()'sblocked && !merging && !deferralroutes torefuse-stale, exit 1 — the measured refusal.Rewrote the section (kept the
#8047heading/history sentence and the factthat a deferral mode exists) to:
commit), and that step 3 here is not that commit;
step 1's merge already landed;
recognises the shape:
git add -A && git commit) is followed,the repair commit's confirmation:
No behaviour change.
.githooks/pre-commitandscripts/check-regen-pending.mjsare untouched — the triage does not claimthe hook is wrong, and this PR doesn't touch it. Step 3's refusal fallback
(
:280-284) and self-test case 4 ("a refused step-3 commit fails the run")already describe the measured behaviour and needed no edit; no self-test case
label repeats the deferral claim in prose, so no self-test edit was made
either.
Tests
bash scripts/pm/os-regen-merge.sh --self-test—EXIT=0, all 23 casesok, including case 4 "a refused step-3 commit fails the run" (unchangedbehaviour). Also CI's own always-runs tail (
lint.yml"os-regen-mergeself-test") runs this same command unconditionally on every PR.
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands scripts/pm/os-regen-merge.shderives 12 families (8pnpm, 4direct
node). All 12 run clean at head3cfc80196(merged withorigin/main):node scripts/check-ci-filter-parity.mjs= 0node scripts/check-cross-package-test-inputs.mjs= 0node scripts/check-shard-attestation.mjs= 0node scripts/check-test-completeness.mjs= 3 NOT MEASURED (its owntext: needs a saved
turbo run testlog this dev seat does notproduce; CI's Test Core / Dogfood jobs supply it — see
os-dev.md)pnpm check:agent-test-spelling= 0pnpm check:bash32-floor= 0pnpm check:cli-command-ids= 0pnpm check:cross-package-test-inputs= 0pnpm check:entry-guard= 0pnpm check:parse-guard= 0pnpm check:pnpm-filter-targets= 0pnpm check:watch-hint-literal= 0node scripts/pm/dispatch-gates.mjs --ran <list>= 0 (✓ dispatch-gates --ran: 12 derived famil(ies) accounted for — 12 run, 0 NOT-MEASURED.)scripts/**-only extras per the dispatch order:pnpm check:ratchet-remedy-authority= 0pnpm check:declared-population-live= 0node scripts/check-self-test-wired.mjs= 0pnpm check:bash32-flooralready above (this file is bash-3.2-floorgoverned).
shellcheckis not run by this repo's CI onscripts/pm/*.sh(noworkflow references it) — not run.
grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]' scripts/pm/os-regen-merge.sh— no matches.
3cfc80196(git fetch origin main && git merge origin/main, clean auto-merge, no conflicts on this file); theself-test and full gate set were re-run on that tree after the merge.
Changeset
None —
scripts/pm/**-only, comment-only change (no behaviour, no consumedpackage). Applying the
skip-changesetlabel as a same-round step; read-backto confirm below once applied.
Open questions for the PM
scripts/check-regen-pending.mjs:407-410— therefuse-stalemessageitself says "Landing a merge?
bash scripts/pm/os-regen-merge.shruns thesanctioned sequence — it commits the merge first (this hook records that
as a deferral)". That is the same false claim this docblock carried,
printed live on the very refusal this PR now documents correctly. Per
triage,
.githooks/pre-commit/check-regen-pending.mjsare out of thiscard's surface — flagging for a follow-up card.
.githooks/pre-commit:8-13's ownheader carries the same claim — "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... Thatcommit records a deferral instead of being refused." This names step 3
specifically as the exempt/deferred commit, which the measurement in this
PR shows is not so on this script's own happy path. Same file this card is
explicitly barred from editing; flagging alongside the sibling above for
the same follow-up.
Generated by Claude Code