Skip to content

Commit 4e3a496

Browse files
claude[bot]claude
andauthored
test(pm): pin the clause-② reader POSITION rule against the merged #17819 specimen (#18071)
Fixes #17959 Clause-②: no — comments, one self-test battery and its roster floor; the reader and the accept set are byte-identical. ## Measured, not assumed **One reader, two gates.** `readClause2Line` is exported here and applied to the card's claim comment; `scripts/check-changeset-no-major.mjs` imports the same function and applies it to `github.event.pull_request.body` — that is the `Check Changeset` step the ruling named. The fixed spelling is a POSITION rule: the key opens its own line modulo decoration (spaces, one blockquote mark, one list bullet, bold, backticks), the value token is first after the colon and is exactly `yes` or `no`, and trailing prose after the token is accepted by design. WHICH line is never consulted. **It ran, and it fired.** Two `Check Changeset` runs on the same merged head `b280ae29`: - run `34684118255`, 2026-09-12T08:47:01Z — FAILURE, exit 1: "LEVEL AXIS: NOT MEASURED", "declaration line: a near miss, not a declaration". PR #17819 was OPENED with the key inside a backtick span the line then talks on outside of — the #17098 QUOTED-AND-CONTINUED tell. - run `34684357221`, 08:52:36Z (`edited`, same head) — SUCCESS: "LEVEL AXIS: this PR declares clause-② `no`", quoting the bold-wrapped line 4. So the card's question 2 answers PRESENT, bold admitted. `check:pm-clause2-carriers` owed nothing: the `lint.yml` step runs `--self-test` only, and the queue guard carries no clause-② leg. **Outcome (a), and it needs no widening.** The bold form was already admitted; the quoted-and-continued form was already refused. Widening the spelling to clear that red would have refused the very form this file's own remedy sentence prescribes. Declared and enforced agree, so what lands is the PIN and the sentence that says so. ## What landed - Docblock: POSITION means LINE-INITIAL, never TOP-OF-BODY, with the #17819 evidence. No accept set, no exported symbol and no reader line is touched. - One self-test battery, 10 cases, holding both shapes of one sentence from one measured PR; roster floor 20 to 21. - `references/contract-review.md` unchanged: it states no spelling and no placement convention, so there is no convention line to correct. ## Evidence - self-test: 588 to 598 cases, exit 0 (`pnpm check:pm-clause2-carriers`), before and after. - ablation, from the committed state: the position walk truncated to the top three lines, proved on disk by marker count and blob hash, restored to the HEAD blob with `git diff HEAD` empty. Self-test exit 1, 9 of the 10 new cases red — the tenth is the deliberate single-line CONTROL — plus 5 pre-existing cases that read the same rule. - gates at head `7e185157`: `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 35 families; all 35 run in the foreground with exit codes captured before any pipe, all 0; `--ran` reconciles 35 derived / 35 run / 0 NOT-MEASURED (derived). - `pnpm lint` over the whole repo (`eslint . --no-inline-config`): exit 0. - the eight roster families whose roster sits under a path this diff is in: six exit 0; `check:published-readme-exports` and `check:dts-closure` exit 3 — PREREQUISITE NOT MET, no `dist/`. NOT MEASURED, not a red; both judge built package type surfaces and this diff touches no package. `skip-changeset`: `scripts/pm/**` publishes nothing — no published package's `files[]` names `scripts`, and the root manifest is private. --- _Generated by [Claude Code](https://claude.ai/code/session_01DAcomhvR9kKizeYgg89Vo8)_ --------- Co-authored-by: claude <noreply@anthropic.com>
1 parent 6a3bcd8 commit 4e3a496

1 file changed

Lines changed: 56 additions & 3 deletions

File tree

scripts/pm/check-clause2-carriers.mjs

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,32 @@
133133
* naming PLACEMENT rather than spelling, and it is not read as a declaration
134134
* either — what moved is the sentence, never the accept set.
135135
*
136+
* **POSITION means LINE-INITIAL, never TOP-OF-BODY (#17959).** The key must
137+
* open its own line modulo the decoration above; WHICH line it opens is a fact
138+
* this reader has never consulted. `readClause2Line` walks every line of the
139+
* carrier and answers from the first one that IS a declaration attempt, so
140+
* closing-keyword lines, a summary paragraph or a whole section above the
141+
* declaration hide nothing. ⚠️ Worth writing down because a human census read
142+
* it the other way and reported a merged PR as carrying no declaration at all.
143+
* Measured on PR #17819's merged head `b280ae29`, whose body opens with two
144+
* `Fixes` lines, a blank, and then a bold-wrapped declaration on line 4: this
145+
* reader answers `declared` / `no`, and so does the OTHER gate that reads the
146+
* limb — `check-changeset-no-major.mjs` imports THIS function and applies it to
147+
* `github.event.pull_request.body`, which is the `Check Changeset` step the
148+
* ruling named.
149+
*
150+
* ⭐ The same PR is the live control for the QUOTED-AND-CONTINUED tell, because
151+
* it carried BOTH shapes of one sentence. It was OPENED with the key inside a
152+
* backtick span the line then talks on outside of, and `Check Changeset`
153+
* refused that (run 34684118255, 2026-09-12T08:47:01Z, exit 1, "a near miss,
154+
* not a declaration", LEVEL AXIS NOT MEASURED); the seat rewrote the span as
155+
* bold, and the `edited` re-run on the SAME head read it (run 34684357221,
156+
* 08:52:36Z, "✓ LEVEL AXIS: this PR declares clause-② `no`"). ⛔ So no accept
157+
* set moves for this card: the bold form was already admitted, the
158+
* quoted-and-continued form was already refused, and a spelling widened to
159+
* make that red go green would have refused the very form this file's own
160+
* remedy sentence prescribes. What #17959 adds is the PIN and this paragraph.
161+
*
136162
* **It writes nothing.** No label, ever — hanging or clearing a review gate
137163
* from a checker would be issuing the review verdict, which is 自查放行 and is
138164
* the one thing the whole clause-② chain forbids. Same call H31 makes, for the
@@ -667,16 +693,17 @@ const SELF_TEST_BATTERIES = Object.freeze({
667693
'#17366: the correction comment — the self-solvable exit, and the three things it is not': 65,
668694
'#17149: a claim that parses to ZERO branches — malformed, never absent': 26,
669695
'#17098: a key-INITIAL line that DESCRIBES the spelling — the half the fixture did not cover': 48,
696+
'#17959: POSITION is the LINE, not the body — the merged #17819 specimen in both its shapes': 10,
670697
});
671698

672699
// DELETING an entry silences that battery's floor exactly as effectively as
673700
// zeroing it, so the roster's own size is pinned too.
674701
// Raised by exactly the one battery #16304 adds, again by exactly the one
675702
// #17302 adds, and again by exactly the one #17366 adds, so the roster's
676703
// existing slack is preserved rather than tightened or loosened as a side
677-
// effect, and once more by the one #17149 adds, by the one #17098 adds, and by
678-
// the one #17915 adds.
679-
const SELF_TEST_BATTERY_FLOOR = 20;
704+
// effect, and once more by the one #17149 adds, by the one #17098 adds, by the
705+
// one #17915 adds, and by the one #17959 adds.
706+
const SELF_TEST_BATTERY_FLOOR = 21;
680707

681708
// The key an assertion is filed under when no battery is open. It is not a
682709
// declared battery, so it reds by the same set difference rather than silently
@@ -5089,6 +5116,32 @@ export function selfTest() {
50895116
{ id: 1, created_at: '2026-08-30T09:00:00Z', body: 'Claim: session_x · claude/issue-1-old\nClause-②: yes' },
50905117
]).state !== 'declared');
50915118

5119+
// -- #17959: POSITION is the LINE, not the body ---------------------------
5120+
//
5121+
// The merged specimen, kept as bytes rather than as a memory of it. PR #17819
5122+
// opens with two closing-keyword lines and a blank one and carries the
5123+
// declaration on line 4; the census that produced the filing card read that
5124+
// body as carrying no declaration, while both gates read `no`. The SAME PR
5125+
// carried the refused shape first — one sentence, two markdown spans — so the
5126+
// accepted and the refused form are pinned here as one pair, against one
5127+
// measured PR, and neither reading is moved by this battery.
5128+
battery('#17959: POSITION is the LINE, not the body — the merged #17819 specimen in both its shapes');
5129+
const P17819_HEAD = 'Fixes #17456\nFixes #17762\n\n';
5130+
const P17819_REASON = ' — the diff adds no exported symbol, no key on a published payload and no registration; '
5131+
+ 'it narrows three existing implementations onto the signatures they already declare.';
5132+
const P17819_MERGED = P17819_HEAD + '**Clause-②: no**' + P17819_REASON;
5133+
const P17819_OPENED = P17819_HEAD + '`Clause-②: no`' + P17819_REASON;
5134+
t('⭐ the MERGED body reads DECLARED — bold-wrapped, on line 4, with closing keywords above it', readClause2Line(P17819_MERGED)?.kind === 'declared');
5135+
t('…carrying the value the seat wrote, which is what `Check Changeset` printed on run 34684357221', readClause2Line(P17819_MERGED)?.value === 'no');
5136+
t('…and quoting LINE 4 back, never the first line — the row names the line it actually read', says(readClause2Line(P17819_MERGED)?.line, 'Clause-②: no') && !says(readClause2Line(P17819_MERGED)?.line, 'Fixes'));
5137+
t('⛔ POSITION is the LINE: the same line alone at the top reads identically, and BOTH read `no`', readClause2Line('**Clause-②: no**' + P17819_REASON)?.value === 'no' && readClause2Line(P17819_MERGED)?.value === 'no');
5138+
t('⛔ …and pushing it further down changes nothing either — no line index is consulted', readClause2Line('a\nb\nc\nd\ne\n**Clause-②: no**' + P17819_REASON)?.value === 'no');
5139+
t('⭐ the shape the SAME PR was OPENED with is NOT a declaration — the span opens before the key and the line talks on outside it', readClause2Line(P17819_OPENED)?.kind === 'near-miss');
5140+
t('…reasoned DESCRIBING, the reading `Check Changeset` refused on run 34684118255 at exit 1', readClause2Line(P17819_OPENED)?.reason === 'describing');
5141+
t('⭐ the two bodies differ by exactly the two decoration markers, and the readings differ with them', P17819_MERGED.replace('**Clause-②: no**', '`Clause-②: no`') === P17819_OPENED && readClause2Line(P17819_OPENED)?.kind !== readClause2Line(P17819_MERGED)?.kind);
5142+
t('⛔ the reader is CARRIER-agnostic — the same text on this file\'s own carrier, the claim comment, reads the same', cardDeclaration([CLAIM(P17819_MERGED)]).state === 'declared' && cardDeclaration([CLAIM(P17819_MERGED)]).value === 'no');
5143+
t('⛔ CONTROL: neither reading moved for this card — bold declared and quoted-and-continued described before it too', readClause2Line('**Clause-②: no**')?.value === 'no' && readClause2Line('`Clause-②: no` — yesterday\'s answer')?.reason === 'describing');
5144+
50925145
// -- The floor: every declared battery RAN, and ran its cases (#13489) -----
50935146
//
50945147
// Evaluated after every battery has had its chance and BEFORE the verdict, so

0 commit comments

Comments
 (0)