fix(devx): a merge-tree probe no longer records an os-regen deferral, and name the sound probe spelling - #15868
Merged
Conversation
…l, and name the sound probe spelling `git merge-tree --write-tree` runs merge-ort, so it invokes the `os-regen` merge driver — which recorded `$GIT_DIR/os-regen-pending` for a merge that wrote nothing. The next ordinary commit in that checkout was then refused by `pre-commit` with a staleness report for a merge that never happened. Gate the marker write on the index lock. Measured across ten invocation shapes: `GITHEAD_*`/`GIT_REFLOG_ACTION` — the obvious signals — are absent for cherry-pick and rebase, which are real merges that do owe the marker; the index lock is held by all eight real-merge shapes and by neither merge-tree mode. Pinned in `--self-test` in both directions, with a firing control so "no marker" cannot pass by never reaching the driver. `scripts/pm/os-regen-merge.sh`'s header gains the corollary and the sound probe spelling. The `-c merge.os-regen.driver=` spelling is documented as REFUSED: the empty string does not disable the driver, so it reports a conflict for every routed path, including ones that text-merge cleanly. Part of #15815 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
This was referenced Sep 5, 2026
baozhoutao
marked this pull request as ready for review
September 5, 2026 12:18
baozhoutao
enabled auto-merge
September 5, 2026 12:18
Contributor
Author
|
Flipped ready + auto-merge enabled (12:18Z, Generated by Claude Code |
baozhoutao
pushed a commit
that referenced
this pull request
Sep 5, 2026
…regen path is not GitHub mergeability, and name the sound probe (#15871) AGENTS.md §11 already says the `merge=os-regen` driver is a LOCAL facility. What it never stated is the corollary that costs a seat a round trip: a local `git merge-tree` of a routed path runs the same merge-ort machinery as `git merge`, so it HONOURS the driver, while GitHub runs none — the two answer different questions about the same snapshot. The added bullet names the sound instrument (a throwaway bare clone sharing the object store, where the driver is genuinely absent, which is GitHub's actual condition) and refuses the falsified `-c merge.os-regen.driver=` spelling, whose empty string does not disable the driver but leaves git failing to run it and reporting a conflict for every routed path — including ones that text-merge cleanly. Measurements are on PR #15868, which carries the same text in `scripts/pm/os-regen-merge.sh`'s header. Part of #15815 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
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 free
to 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.
Part of #15815 — the ORDINARY half only. The governed half (the same corollary sentence in
AGENTS.mdMulti-agent discipline section 11) is a separate card the PM seat files, so this PR deliberately does not touch it..gitattributesis unchanged.The ruling named
git -c merge.os-regen.driver= merge-tree --write-tree BASE HEADas the safe spelling. The card's own correction comment (11:01Z) says that command is unsound, and I measured it and the correction is right. Setting the driver to the empty string does not disable it: git still tries to RUN it, fails witherror: cannot run : No such file or directory, and marks the path conflicted — so it reports a conflict for every routed path, including ones that text-merge perfectly.Two pairs over
packages/spec/spec-changes.json, git 2.43.0, exit codes captured before any pipe. Ground truth isgit merge-fileon the three blobs, which is what a driver-less server-side merge runs:-c ...driver=The middle column is the trap the card is about. The third is a false-positive instrument that agrees with the truth only by coincidence. Only the bare-shared-clone column tracks the truth in both rows, so that is the spelling the header now carries:
The ruling's corollary sentence itself is unchanged and is in the header verbatim in substance: a local
merge-treeof anymerge=os-regenpath with the driver registered is not evidence about GitHub's mergeability.The marker gate — what actually distinguishes a probe
The ruling's hypothesis was "a
merge-treeinvocation has no worktree to write". Measured false:merge-treeruns withis-inside-work-tree: true,show-toplevelandabsolute-git-diridentical to a real merge. So is the next candidate. The driver was replaced by a shim dumping argv, env and git state; every shape rebuilt from a fresh fixture:GITHEAD_*GIT_REFLOG_ACTION$(git-path index).lockmerge othermerge otherpull … other⛔ The two env vars a reader reaches for first are absent for cherry-pick and rebase — real merges that DO write the worktree and DO owe the marker. Gating on them would drop the marker there, silently, in the dangerous direction. The index lock is held by all eight real-merge shapes and by neither
merge-treemode, and it is the mechanism rather than an accident:merge-treeis the low-level command that does not touch the index or working tree. Read throughgit rev-parse --git-path index, so a linked worktree's own index andGIT_INDEX_FILEboth answer correctly (verified from a linked worktree: probeno, real mergeYES).Anything unmeasurable falls back to marking — the asymmetry is written into the code comment: a false "real merge" costs one self-clearing marker, a false "probe" would leave
pre-commitnothing to refuse.Verification
Exit codes captured before any pipe; verdict lines quoted as the tools printed them.
pnpm install --offlinerun;merge.os-regen.driver = node "$(git rev-parse --show-toplevel)/scripts/git-merge-regen.mjs" %O %A %B %P):merge-treewith the driver on exited 0, printed⟳ packages/spec/spec-changes.json / not text-merged — it is generated, and left the marker containingpackages/spec/spec-changes.json.git mergestill recordspackages/spec/spec-changes.json.node scripts/git-merge-regen.mjs --self-test: exit 0 before and after; the only output delta is the added line✓ probe gate: git merge-tree reaches the driver and records nothing; the same repo's real merge still records.git hash-objectproof both ways): commenting out the one gate line changed the blob7b4734ba…→cacac5ab…, and the self-test went red with✗ self-test: a git merge-tree probe wrote os-regen-pending — the probe gate is not firing→✗ merge driver wiring is inconsistent — 1 failure(s). Restore verified byte-identical to HEAD with an emptygit diff HEAD.bash scripts/pm/os-regen-merge.sh --self-test: exit 0 before and after, output byte-identical.node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commandsderived 31 families; all 31 run, all green. Reconciled:✓ dispatch-gates --ran: 31 derived famil(ies) accounted for — 31 run, 0 NOT-MEASURED.Six of them first refused with exit 3 /ERR_MODULE_NOT_FOUND(prerequisite not met, nothing measured) and were re-run green after the offline install.pnpm check:pm-dispatch-gatesneeded more than 420s and is green at✓ dispatch-gates self-test: 1511 cases pass.pnpm check:nul-bytesexit 0, plus a direct control-character sweep over both files (no hits).node scripts/pm/check-governed-merges.mjs --teston the final file list:✅ NOT governed — ordinary queue landing applies to a PR with exactly this file list.origin/main: exit 0, merges clean.pulls/N/files).Scripts-only diff, so
skip-changeset.🤖 Generated with Claude Code
https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
Generated by Claude Code