test(scripts): batch 10b pilot (Tier C) — floor git-merge-regen on its eleven named callees - #15326
Merged
Merged
Conversation
…callees
The `--self-test` dispatch decided success by `results.every(Boolean)` and
nothing else, so "every sub-check held" and "the sub-checks never ran" printed
the same line. This file has no self-test entry function and no section
banners: a top-level `if (--self-test)` block invokes eleven named callees,
each printing its own line and returning a boolean, ANDed at the end.
So the roster's unit is the CALLEE and its label is the one the source already
carries — the function's own name. `registerCase('<calleeName>')` is the first
statement of every callee, above any early return, so the ledger records that
the callee RAN and each floor is 1. The eleven invocations become a literal
list of function references, which makes the names the dispatch invokes into
data the floor cross-checks the roster against in both directions, with a
duplicate refusal; the floor itself is evaluated at the AND/verdict site,
immediately before the success line and only on the `--self-test` path, so the
production merge-driver path never reads the ledger.
The `[name, ok]` table inside `reconcileOwnership()` deliberately stays as it
is: recipe A makes a table row a battery for a file whose self-test IS the
table, and here the table is a local of one callee among eleven. The battery is
the unit the dispatch names; that boundary is stated at the site.
Part of the assertion-floor rollout.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
baozhoutao
marked this pull request as ready for review
September 4, 2026 11:41
baozhoutao
enabled auto-merge
September 4, 2026 11:41
baozhoutao
deleted the
claude/issue-13799-batch10b-pilot-tierc-callees
branch
September 4, 2026 12:20
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 #13799 — BATCH 10b, the Tier C PILOT for the callee-dispatch shape. One file:
scripts/git-merge-regen.mjs.All measurements below were taken on this PR's final commit, 839e77f, in an installed worktree pinned at
103677652, with a byte-comparison base worktree detached at the same pin and also installed.What the file is, and why the callee is the battery
scripts/git-merge-regen.mjs(991 lines) has no self-test entry function, no verdict handshake and no named section banners. A top-levelif (--self-test)block invokes eleven named callees, each of which prints its own line and returns a boolean, and the results are ANDed at the end. The AND site is the verdict site. Success was decided byresults.every(Boolean)and nothing else, so "every sub-check held" and "the sub-checks never ran" printed the same line.Per the batch-8 census row 14 and the PM's decision on design question 2, Tier C takes recipe A with the callee name in the role the table-row label plays: one battery per named callee, floor 1, roster = the literal callee-name list,
registerCase('calleeName')as the first statement of each callee.The roster comment states why the callee name is the battery: it is the label the source already carries, so nothing is invented and nothing is judged per comment, and a set difference names WHICH sub-check stopped rather than saying only that something did. Each floor is 1 because what the ledger records is that the callee RAN, not how many assertions it happens to contain.
The boundary this pilot is here to state
reconcileOwnership()holds a literal[name, ok]table, filtered eagerly. Its rows stay as they are and are NOT batteries, and the reason is written at the site: recipe A (PR #15271,check-sdui-manifest) makes a table row a battery for a file whose SELF-TEST is the table — one literal table, one driving loop, and a sink that writes only when a row fails. Here the table is a local of ONE callee among eleven, its rows are evaluated eagerly into booleans before anything loops, and the callee already reduces them to a single printed verdict of its own. Flooring those rows would floor one callee's internals while the other ten stayed at callee granularity — a roster whose unit changes per entry. The rule: the battery is the unit the DISPATCH names.What landed
SELF_TEST_BATTERIES(the eleven callee names, floor 1 each),SELF_TEST_BATTERY_FLOOR = 11,UNATTRIBUTED_BATTERY, thebatterySeenledger, andregisterCase(name). Module-level rather than local because this file has no self-test body — the registrations happen inside eleven separate frames and the floor is read at the dispatch, so the ledger has to outlive all of them. The ledger is named for its role and deliberately not with a self-test spelling, becausecheck:pm-dispatch-gatesanchors on top-level declarations whose name spells self-test.registerCase('calleeName')as the first statement of each of the eleven callees, above any early return.--self-testbranch only.resultsis that list mapped throughrun(); the cross-check readsrun.name, so a renamed callee moves the list with it and cannot drift from the roster in silence.The size pin was measured, not assumed
Pinned at 9999 first and the breach line read back:
Pinned to 11, then restored byte-identically (
cmpagainst a saved copy; blob back to2eb532d3).Deletions, declared
The only lines removed are the verdict lines.
results.every(Boolean)becomes afailurescount so a floor breach can red the verdict, and the red line takes recipe A's spelling:origin/main:✓ merge driver wiring is consistent (24 path(s) deliberately excluded).✗ merge driver wiring is inconsistent — N failure(s) (cases and floor); see above.No assertion condition, message or argument was changed. No comment was promoted to a section head.
The production path is untouched
This script is wired as
check:merge-driverand installed as a git merge driver, so its production path has to stay byte-identical.A six-invocation production-mode harness was run against both worktrees from a throwaway git repo — no
%Pat all, a missing%P, two plain driver-managed rows, an unmapped path (the refusal arm) and the MIXED row (content/docs/permissions/system-context.mdx) — capturing stdout, stderr and every exit code, plus the resultingos-regen-pendingmarker:The green
--self-testrun is byte-identical too, stdout and stderr, exit 0 on both sides.Ablation (f) — the floor cannot fire outside
--self-test. With a guaranteed floor breach applied (leg b),--self-testexits 1 while the same six production invocations stay byte-identical to base on stdout and stderr. Structurally: the dispatch branch opens at line 1141 and the floor call sits at line 1171, inside it; the productionelsearm never reads the ledger.Ablations
Every leg: mutation proven on disk (HEAD blob
2eb532d3moves, plus agrep -cFcount of the injected and of the removed text — an editor exit code is not evidence), restore proven by hash equality against the HEAD blob and an emptygit diff HEAD,trap ... EXIT INT TERMwith absolute paths, and the mutation applied on top of a committed implementation so the restore leg has a real reference.reconcileScriptstoreconcileScriptsRenamed)registerCase()removed (reconcileGenerators)hookIsExecutable)registerCase()moved below an early return, with that early return forcedregisterCase()left firstLeg (a), both halves, verbatim:
Leg (d) is the one worth reading twice: with the floor gone and one callee registering nothing, the run exits 0 and prints the ordinary green line. Restored.
Leg (e) needed two mutations, and this is declared rather than glossed: the early return in
endToEndMixed()is not reached on a healthy tree, so it was forced as well. The e-control leg forces the same early return withregisterCase()left in first position and comes back green, which is what makes the placement — not the forced branch — the cause of (e)'s red. The e-control leg is also the honest demonstration of why the call goes first: a callee that legitimately short-circuits still RAN.Gates
Derived family, from
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack— no hand-built path list; the tool took its own change set from the merge base (1 path,scripts/git-merge-regen.mjs). 22 commands, every one run, all exit 0.Exit codes were captured before any pipe (redirect to a file, read the status, then read the file). Verdict lines, as the gates themselves printed them:
✓ dispatch-gates self-test: 1381 cases pass.— run in the foreground under the shared verify lock, which reportedos-verify-lock: VERDICT command-exit 0 · held the lock 368s (6m08s) · waited 0s.check-self-test-workflow-commands --self-test: ... 6 declared batteries, 23 cases registered, every battery at or above its pinned floor.✓ check:declared-population-live — 201 of 252 famil(ies) declare a path population, and every one of them reaches this tree's 7440 tracked file(s).check-nul-bytes: OK (scanned 7433 text file(s) -- 7433 tracked, 0 untracked-not-ignored; skipped 7 binary; no raw ASCII control bytes).OK check-ratchet-remedy-authority: 202 scripts swept ...✓ check-watch-hint-literal: 49 declaration(s) across 4 rostered name(s) ...pnpm check:merge-driver(which isgit-merge-regen.mjs --self-test && check-regen-pending.mjs --self-test) exits 0, printing all eleven ✓ lines and then✓ merge driver wiring is consistent (24 path(s) deliberately excluded).Whole-repo
pnpm lint(eslint . --no-inline-config): exit 0. Not a narrowed run.Nothing imports this script as a module (
git grep "from '.*git-merge-regen"is empty); the only referencing runnables arecheck:merge-driverandcheck-regen-pending.mjs --self-test, both green above.scripts/regen-artifacts.mjsandscripts/doc-line-anchors.mjsname it in prose but are library modules with no--self-testentry point — invoking them with that flag exits 0 having printed nothing, which is NOT MEASURED, not a pass, and is recorded here as such rather than counted.Instrument, before and after
node scripts/measure-self-test-floor.mjs --json, base worktree vs this branch, 170 rows on both sides. Exactly one row moved:Buckets: base
ROSTER 156 / NONE 13 / COUNT 1to branchROSTER 157 / NONE 12 / COUNT 1. This file leaves NONE; nothing enters NONE and no other row changed in any field.extractWatchHintson this file is identical across base and branch:.gitattributes,.githooks/pre-commit,scripts/git-merge-regen.mjs.Housekeeping
skip-changeset: this diff is one script underscripts/, publishing nothing from any package.🤖 Generated with Claude Code
https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
Generated by Claude Code