Repository navigation
feat(gates): a line ceiling on every file already in facade form - #34103
Conversation
check-facade-delegation-only now reads a third registry list, `ceilings`: one row per registered facade file with its measured line count, the commit it was measured on, the ceiling (count + CEILING_MARGIN = 100) and the ruling record that set it. Over the ceiling is an error telling the author to put new code in a new module; raising a ceiling is maintainer-only. A file not in facade form takes no ceiling. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
|
domain:server#5 · zhuangjianguo · session_01QsR2jTyY9BGjj9WBi7QgH6 Review claim · head cfb690a · 2026-11-16T04:05Z |
|
domain:server#5 · zhuangjianguo · session_01QsR2jTyY9BGjj9WBi7QgH6 Review — PASSHead-sha:
The patch-id is |
|
domain:server#5 · zhuangjianguo · session_01QsR2jTkZnXtRhuEiiyidvJ 席位核对ACCEPT · area S4 (E1) · Head-sha:
|
|
domain:server#5 · zhuangjianguo · session_01QsR2jTkZnXtRhuEiiyidvJ Landing (landing-operations B) · head
State change: ready + auto-merge (area authorising line). |
Requested by Steedos · project thread
Part of #33949. This PR is ruling item 2 (the narrow line ceiling). Item 1 (eight codemod splits, one at a time) stays open on the card, and split 1 (objectql
registry.ts) follows as its own PR.Clause-②: no
Metadata-protocol: none
维护者速读
check:facade-delegation-only,没有新脚本、没有新 workflow。scripts/facade-delegation-registry.json的ceilings三行(数字);再看scripts/check-facade-delegation-only.mjs里的CEILING_MARGIN(为什么是 100)和checkCeilings。node scripts/check-facade-delegation-only.mjs,预期最后几行显示每个文件「11605 lines, ceiling 11705 (100 left)」这样的余量,退出码 0。What changes
scripts/check-facade-delegation-only.mjsreads a third list inscripts/facade-delegation-registry.json,ceilings, one row per registered facade FILE:packages/metadata-protocol/src/protocol.tspackages/objectql/src/engine.tspackages/drivers/driver-sql/src/sql-driver.tsEach row is
{ file, baseLines, baseCommit, maxLines, ruling }. The gate refuses:maxLines. The message tells the author to put the new code in a new module, and says raising a ceiling is maintainer-only: it needs a maintainer ruling, cited as the row'sruling, withbaseLinesandbaseCommitre-measured;maxLinesoutsidebaseLinestobaseLines + CEILING_MARGIN. A ceiling is the measured count plus the margin, never a number picked to fit;The margin is 100 lines, flat (
CEILING_MARGIN). Two readings on 63db724 set it:engine.ts, summed across PRs fix(objectql): an async after-hook fired inside a unit of work runs once the unit commits, and not at all when it rolls back #34043, feat(i18n): serve labels by i18n.sourceLocale as the authored language #34025, perf(objectql): drop a required master's parent chain for a View All reader over unrestricted hops #33897 and feat(objectql): a nested-relation condition on a read verb is one read-scoped in-database subquery per relationship, up to three, where it is provably the same read as the id read #33652.protocol.tsgets +9 (fix(metadata-protocol, rest)!: the layered read of a name two packages hold refuses as the plain read does, naming the holders as details.candidates (ADR-0150 D3/D5) #33885) andsql-driver.tsnone. That was measured over all 73 open PRs (53 carry files) through the REST files list. So 100 does not red a PR that was reviewed before the ceiling existed.protocol.tsgrew +178 (11,427 to 11,605) andengine.ts+157 (6,597 to 6,754), all of it delegation stubs and docblocks. At that rate 100 lines is about three days. A file that starts growing again meets its ceiling within a week, not after another thousand lines.One number fits every file because the growth comes per member (a stub plus its docblock), not in proportion to the file's size.
There is no new script, workflow or
package.jsonchain. CI already runspnpm check:facade-delegation-only(--self-test, then the gate) inLint & Repo Gates, stepfacade-delegation-only.Tests
The self-test grows from 38 to 44 batteries (
SELF_TEST_BATTERY_FLOOR38 to 44):⛔ MAINTAINER-ONLYraise wording.ceilingsarray is RED.Existing fixtures get a roomy ceiling by default, so the H/A/E/N rows still judge delegation alone.
Ablation (each leg through scripts/ablation-replace.mjs, restore proven blob == HEAD, `git diff HEAD` empty)
The first C3 attempt used the replacement
continue;, which is a substring of the anchor. The tool refused it as a no-op ("the replacement count moved 15 -> 15, a rise of 0, not the declared 1"). It was re-run with a replacement unique in the file.The real files against a lowered ceiling (scratch registry, protocol.ts maxLines 11604)
Acceptance notes
protocol.tsand about 31 onengine.ts), the first ceiling is reached in about three days. That is the ruling working as written: new code goes to a new module, or the maintainer raises the ceiling. Seats adding facade members should expect to see it soon.lint.ymlcomment above thefacade-delegation-onlystep describes the delegation rule only. It is left untouched because workflows are a governed surface outside this PR's file surface. The script header is the authority, and it now documents the ceiling.packages/objectql/src/registry.ts) registers its facade with its post-split ceiling in its own PR, as the header now requires.Verification
Head
cfb690a278(the branch merged with origin/main27c2f1ea32); every reading below is from that tree.Local gates (dispatch-gates derivation, 31 families, each exit code captured before any pipe)
No changeset: the diff is
scripts/**only, which ships in no package'sfiles[], so it is labelledskip-changeset.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ