Repository navigation
docs(devpath): merge-driver comments say system-context.mdx has a generated register again, and why neither census page is routed - #26610
Merged
Conversation
…m-context.mdx has a generated register Claude-Session: https://claude.ai/code/session_01JQwxbaFpnMwgpCgneKe2qS Co-authored-by: Claude <noreply@anthropic.com>
This was referenced Oct 27, 2026
Contributor
Author
维护者速读
席位核对ACCEPT ·
Generated by Claude Code |
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.
Requested by Warren · project thread
Fixes #26535
Clause-②: no
Metadata-protocol: none
维护者速读
.gitattributes、scripts/regen-artifacts.mjs、scripts/git-merge-regen.mjs里说system-context.mdx「没有生成内容」「--fix会改file:line锚点」的几段注释,改成现在的事实:这页自 docs(permissions): system-context.mdx is a hand-written per-site census of every isSystem read, edited 9 times in 30 days and held by a gate whose --fix is retired — generate it like tenant-audit-census.mdx #26442 起有一个生成区(site register,由check-system-context-census.mjs --write重建),tenant-audit-census.mdx也有一个生成区,两页都不走合并驱动,原因写进NOT_DRIVER_MANAGED那一条。--write)。卡片还要求在同一个 PR 里决定这两页要不要交给合并驱动:结论是不要,理由已写进代码注释。git check-attr merge对两页仍答unspecified。回滚即 revert。scripts/regen-artifacts.mjs中content/docs/permissions/**条目的why(不路由的四条理由);其次.gitattributes第 97 行起的那段;最后scripts/git-merge-regen.mjs的MIXED_COMPARATORS注释。git check-attr merge content/docs/permissions/system-context.mdx content/docs/permissions/tenant-audit-census.mdx,预期两行都是merge: unspecified(路由没变)。What changes
Comments only, in three files. No routing, no code path and no published file changes.
.gitattributes(the block from L97): no longer says "nothing on it is generated" / "It text-merges like its prose neighbours now". It now tells the history through [Decision] isSystem 提权清单页(system-context.mdx):保留「每处提权都要登记」,正文统计数字删掉(B)、挪进生成文件(B')、维持(A),还是整页删(C) #22927 (which removed this row andgen:system-context-census), then says docs(permissions): system-context.mdx is a hand-written per-site census of every isSystem read, edited 9 times in 30 days and held by a gate whose --fix is retired — generate it like tenant-audit-census.mdx #26442 gave the page a generated site register again (rebuilt bynode scripts/check-system-context-census.mjs --write). It also says the page stays unrouted, liketenant-audit-census.mdx, and that each page's gate catches a merge that leaves its region wrong.scripts/regen-artifacts.mjs, theNOT_DRIVER_MANAGEDcontent/docs/permissions/**entry: thewhyno longer calls every page in the directory hand-written prose. It names the two MIXED pages and their--writecommands, and records the routing decision with its reasons (below). Its last sentence used to say "Should a generated page arrive here, route that FILE", which the two unrouted mixed pages contradicted. It now says "a page generated WHOLE". The same file also had two passages that repeated the stale claim, and the new entry would have contradicted them: themixedheader paragraph ("its last generated half") and the retired-row comment ("Nothing on it is generated"). Both now point to the entry.scripts/git-merge-regen.mjsMIXED_COMPARATORS: no longer sayscheck-system-context-census.mjs --fixrewritesfile:linenumbers. That flag is retired: it refuses with exit 2 and names--write(scripts/check-system-context-census.mjsheader, section "--fixis retired"). The comment now says the comparator was written for that page's old line anchors, is the identity on the page today, and is carried by no row. It also says the marker-region register is something this comparator does not blank. In the same file,deferralIsLossless's case 1 said "numbers--fixwill re-derive" and "24 of the last 25 main commits" in the present tense. It now says the row'sgen:re-derives the half, and gives the 24-of-25 figure as the measurement taken back then.Bounded in-place fix, declared
The two extra passages in
scripts/regen-artifacts.mjsand thedeferralIsLosslesssentence inscripts/git-merge-regen.mjsare outside the three locations the card names. All three are in files the claim already covers, have the same defect (a comment saying the page has no generated half, or that--fixre-derives it), are comment-only, and are read by the same gates. Leaving them would have made each file contradict itself.Why — the routing decision: record why not (no routing)
Card's Wanted: "Decide in the same PR whether
system-context.mdx(andtenant-audit-census.mdx) should be routed through the regen driver now that part of each is generated, or record why not in item 2's reason." Decision: not routed. The reason is recorded in item 2'swhy. Evidence, measured onorigin/main9dc8fba:system-context.mdxhas its register at L517–654 of 661 lines.tenant-audit-census.mdxhas its region at L230–319 of 319 lines. An unconditionalmerge=os-regenrow keeps OURS whole, which is the exact failure [finding] #13646's fix routed a MIXED file tomerge=os-regen— the driver keeps one side whole and drops the other's hand-written prose, and the census gate cannot see the loss #14064 measured on this page.mixedlimb would buy nothing. The only comparator isline-anchors(blankAnchorLineNumbers). Measured on both pages:extractLineAnchors(page).length === 0andblankAnchorLineNumbers(page) === page, so it is the identity. With it,deferralIsLosslessdefers only when THEIRS is byte-equal to the ancestor or to OURS. Every real edit, register-only ones included, would taketextMergeInPlace, which is the same text merge git does today, plus a pre-commit regeneration debt. A comparator that blanks a marker region does not exist.gen:script exists. AREGEN_ARTIFACTSrow needs agen:andcheck:pair in its owner manifest, and the self-test verifies the names. Rootpackage.jsonhascheck:system-context-censusand nogen:for either page. [Decision] isSystem 提权清单页(system-context.mdx):保留「每处提权都要登记」,正文统计数字删掉(B)、挪进生成文件(B')、维持(A),还是整页删(C) #22927 removedgen:system-context-census, and the tenant-audit census has no manifest script at all; its gate runs straight fromlint.yml. Routing would mean adding scripts, which goes beyond this card's comment-only scope.check-system-context-census.mjssection F holds the register byte-equal to--write's output, andcheck-tenant-audit-census.mjscheck A does the same for its region, masking only the dated corpus-scale rows. Both gates run inlint-repo-tooling, behind the requiredLint & Repo Gates, onpull_requestandmerge_group.scripts/check-system-context-census.mjs's own header already says the page "is still notmerge=os-regenrouted: liketenant-audit-census.mdx, it text-merges".Routing would change merge behaviour beyond this card's comment-only path. Nothing measured here argues for it, so it is not proposed.
Tests
No behaviour changed, so no test was added and no ablation applies. The edited scripts' own suites:
pnpm check:merge-driver(git-env,git-merge-regenandcheck-regen-pending--self-test; thegit-merge-regenself-test reconcilesscripts/regen-artifacts.mjs) ran with exit 0.node --checkpasses on both scripts. The twopackages/spectest files that name these scripts mention them only in comments, so they are not owed.Census gates, run on the base tree and unchanged by this diff:
node scripts/check-system-context-census.mjsexit 0, ending "the generated register (132 symbol(s)) matches the tree."node scripts/check-tenant-audit-census.mjsexit 0.Verification
Head
07bd64c8. Local subset fromnode scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack(38 families), reconciled with--ran: "38 derived famil(ies) accounted for — 34 run, 4 NOT-MEASURED".Local gate readings (exit codes captured before any pipe)
check:merge-driver,check:nul-bytes,check:entry-guard,check:scripts-symbol-anchors,check:ratchet-remedy-authority,check:cross-package-test-inputs,check:ci-filter-parity,check-self-test-wired(scan and--self-test),check-declaration-mirrors(scan and--self-test),check-comment-mask-corpus, andcheck:pm-dispatch-gates. That last one ran detached as its header requires and ended "dispatch-gates self-test (fast tier): 1935 cases pass". Its exit code came from the log's pass line, with no ELIFECYCLE line.dist/without a fullpnpm build):check:dts-closure,check:dual-build-cjs-loads,check:lean-entry-closure,check:sourcemap-no-sources-content. This is a declared narrowing. These gates read builtdist/output, which a comment edit in rootscripts/and.gitattributescannot change. CI'sLint & Repo Gatesruns them on a fresh build.pnpm lintand every family outside the derived list are left to CI.Acceptance notes
scripts/doc-line-anchors.mjs's header ("Today, since [finding]system-context.mdxre-conflicts faster than one verification lap — the resolve→land window is measurably smaller than the gate union it requires #15921") still says the'line-anchors'comparator is "selected by that page'smixedfield" and that the census--fix"regenerates only the page's declared counts". Both stopped being true at [Decision] isSystem 提权清单页(system-context.mdx):保留「每处提权都要登记」,正文统计数字删掉(B)、挪进生成文件(B')、维持(A),还是整页删(C) #22927. This is the same stale-comment family, but outside this card's file list, so it is left for the seat.scripts/regen-artifacts.mjs'sdocs/audits/**entry calls the strictness ledger's.counts.md"The ONE exception". Butdocs/audits/2026-08-tenant-audit-write-call-sites.counts.mdis also generated whole (byscripts/tenant-audit-census.mjs --write) and unrouted, and its own header explains why. Same family, outside this card.Human Minimum
packages/specholds no runtime logic. (n/a: no schema touched.)pnpm lintpasses. (No formatter ran;pnpm lintis CI's.)main, one pull request.scripts/and.gitattributes, soskip-changeset.)packages/spectouched: its generated artifacts are regenerated and committed. (n/a)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01JQwxbaFpnMwgpCgneKe2qS