Skip to content

Commit 412908c

Browse files
fix(pm): the record writer refuses a Head-sha key followed by a hex span anywhere on a line; a backtick fence's info string holds no backtick (#28166)
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DMzsEnY5eHjuNZKQgC1AUAt)_ domain:skills#2 · os-elon-musk · session_016WV4cwv77cYicgaKyj39Y2 Fixes #28111 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:PR #28103 契约复核留下的 should-fix 1–3。(1) `post-stamped.mjs` 发帖前的 `Head-sha` 拒收加第二条「有键」判据:行内任何位置「键名紧跟 7–40 位十六进制码段」也算作者写了键。#28103 把判据收窄到「以键开头的行」后,16 种读取器读不出 head 的写法(键前有单词、一行两个键、表格行、下划线强调、任务列表项、题头样式、unicode 项目符号或 emoji、项目符号后接引用、删除线、括号、NBSP 缩进、HTML 注释)悄悄通过了;现在又都拒收。(2) `RECORD_KEY_SPELLINGS['Head-sha']`、拒收文案和函数注释改说题头「缩进最多三个空格」,不再说「不缩进」,与读取器一致。(3) `check-half-states.mjs` 的 `FENCE_LINE`:反引号围栏的信息串含反引号时不开栏(CommonMark §4.5),波浪线围栏不受此限。共 2 个文件,+45/−13。 - 为什么改:三项都是 #28103 复核记录 6523547564 点名的。第 1 项是响亮度:作者写了一条读取器读成「无 head」的记录,却听不到一句拒收。卡片给了 (a) 加判据 / (b) 记录边界两个选项,要求先测再选:实测第二判据在 2026-10-23 以来 11764 条评论(750 条带题头记录)上一条都不多拒,所以选 (a)。第 2、3 项是措辞与 CommonMark 规则,均属 cosmetic。无新门禁、无新拒收类。 - 风险与回滚:语料前后对比(基线 `27e0bd584` vs 本 head):750 条记录读法逐条相同(0 变),11764 条评论拒收逐条相同(0 变);#28103 放开的散文提及(只提键名、或码段在句子后面)仍不拒;新判据唯一会拒的散文形态是「键名紧跟码段」出现在读不出 head 的记录体里,这是卡片接受的边界,线上 0 例,已钉住。围栏规则只会让读取器读到更多本来就该读到的行(0 条线上记录含该形态)。回滚即 revert。 - 先看:`post-stamped.mjs` 的 `HEAD_SHA_KEY_SPAN` 与 `headShaKeyPresent`(两行),再看 `check-half-states.mjs` 的 `FENCE_LINE`(一行)。 - 两分钟验证:五个自测在本 head 全部 exit 0:half-states 5131(主干 5130,+1 钉)、recognisers 337、post-stamped 753(主干 747,+6 钉)、owed-reviews 65、guard 403。三条消融各恰红本项新钉:去掉第二判据 4 枚红、围栏规则还原 1 枚红、措辞还原 1 枚红。 - 需要你做的:无。本 PR 不碰四个契约面,不欠契约复审;落地档以登记册为准(本地 `--test` 读为两条路径均不在登记册上,普通队列落地)。 ## What changes - **`scripts/pm/post-stamped.mjs` — item 1, choice (a).** A second presence limb, `HEAD_SHA_KEY_SPAN` (`/head-sha[`*_~]*[ \t]*:[ \t*_~|]*`[0-9a-f]{7,40}`/i`): the key directly followed by a 7-to-40 hex code span, anywhere on a line, through the decoration a key or a value may wear. `headShaKeyPresent` is the OR of the two limbs and replaces the bare `HEAD_SHA_KEY_LINE.test` in `recordKeyedLineRefusals` and in the `headShaKeyLine` locator. The refusal's `why` names both limbs. The docblock records the 16 shapes the limb restores, the prose shapes that stay free, the one prose shape it refuses (the key immediately followed by a hex span inside a sentence) and the corpus measurement behind accepting it. - **`scripts/pm/post-stamped.mjs` — item 2.** `RECORD_KEY_SPELLINGS['Head-sha']` says the heading is `itself indented at most three spaces`; the refusal `why` and the `recordKeyedLineRefusals` docblock say the same; `unindented` is gone from all three. - **`scripts/pm/check-half-states.mjs` — item 3.** `FENCE_LINE` is `/^[ ]{0,3}(`{3,}(?!.*`)|~{3,})/`: a backtick run opens a fence only when the rest of the line carries no backtick; a tilde run's info string may hold one. `FENCE_CLOSE_LINE`, the walker and every other reader are untouched; the docblock cites CommonMark §4.5 and the #28103 review's F16. - **Pins.** post-stamped: the 16 shapes in two pins (each refused AND reader null), the freed prose cases (no span, span later in the sentence, a sub-floor span, a non-hex span) stay free, the accepted prose bound (refused in a reader-null body, passes beside a plain key line), the locator quotes the span-limb line and the `why` names both limbs, the spelling and the `why` grant the heading three spaces and never say `unindented`; the existing wording pin is loosened to `BELOW an unquoted`. check-half-states (H51 block): a backtick run with a backtick in its info string opens nothing (the line below reads; after a later bare run the FIRST plain line still wins), a backtick-free info string opens, a tilde run with a backtick in its info string opens, and such a line inside an open four-backtick fence stays fenced. ## Why The contract review of PR #28103 (record 6523547564) left should-fixes 1 to 3, filed as #28111 and triaged p3 (6524831843: loudness only, no wrong head admitted). Measured on `origin/main` `27e0bd584` before the change (`skills-lane-seat2/28111/probe-shapes.mjs` in the project files, both trees): 1. All 16 shapes the review listed (plus a second table-row spelling) pass `recordKeyedLineRefusals` untouched and read `null` in `contractReviewHeadSha`: a record that silently reads as no record. 2. The spelling said `unindented` of the heading while the reader opens the scope on `/^[ ]{0,3}#/`. 3. ```` ``` a`b ```` opened a fence, so the record's own `Head-sha:` line below it was skipped (fail-closed; CommonMark renders the line as a paragraph). **Item 1, (a) versus (b), measured before choosing.** The card prefers restoring loudness where it costs no live false positive. The span limb's false-positive population is a line that matches `HEAD_SHA_KEY_SPAN` but is not a key line. On the 11764 issue comments updated since 2026-10-23 (REST, 118 pages, fetched 2026-10-30T14:40Z; 750 carry the heading marker): **0** such lines in any comment, **0** in any record, so **0** records newly refused; 0 records carry the key anywhere without a key line. Choice (a) therefore costs no live refusal, and the one synthetic prose false positive the review named (P3, the key immediately followed by a hex span inside a sentence) is pinned as the accepted bound so the next reader of the function knows it was chosen. Choice (b) was not taken. No new gate, no new refusal class: the writer's refusal fires on a superset of what it fired on after #28103 and a subset of what it fired on before (every shape it now refuses, base-before-#28103 refused too), and the reader's accept set only grows by lines CommonMark already rendered as paragraphs. ## Verification - Self-tests on the committed head `30a0fbad`, exit captured before any pipe: `check-half-states --self-test` 0 (5131 cases; main 5130), `record-recognisers --self-test` 0 (337), `post-stamped --self-test` 0 (753 across 26 batteries; main 747), `check-owed-reviews --self-test` 0 (65 in 9 batteries), `check-governed-queue-guard --self-test` 0 (403). - Ablation on the committed head (`skills-lane-seat2/28111/ablation.log`), each leg one `sed`, restored with `git checkout`, porcelain empty: (A) `headShaKeyPresent` back to the line limb alone: post-stamped 4 of 753 red, all four the new span-limb pins; (B) `FENCE_LINE` back to the base shape: half-states 1 of 5131 red (the new info-string pin), post-stamped 0; (C) the spelling back to `unindented`: post-stamped 1 of 753 red (the new wording pin). No other pin moves in any leg. - Corpus (`skills-lane-seat2/28111/probe-corpus.mjs`, `probe-corpus.out`): 11764 issue comments updated since 2026-10-23, 750 carrying the heading marker, driven through `contractReviewHeadSha` and `recordKeyedLineRefusals` in a worktree at `origin/main` `27e0bd584` and one at this head: 0 records read differently (the 2 nulls are the two no-key legacy records on both trees), 0 comments refused differently (the 1 refusal on each side is the pre-existing `Local-runs` row on record 6517315440); 0 lines match the span limb without being a key line; 0 comments carry a backtick fence opener with a backtick in its info string. - Shapes (`probe-shapes.out`): on this head each of the 17 shapes is refused and reads null; P1 (no span) and P2 (span later in the sentence) stay free; P3 (key then span in a sentence) is refused as the accepted bound; P4 (a plain line above a prose mention) reads and passes. - ESLint (`--no-inline-config`) on the two files: exit 0. - Gates: `dispatch-gates --commands` at the committed head `30a0fbad` derives 48 families (26 pnpm, 22 direct node); all 48 run in a second worktree at this head after `pnpm install --frozen-lockfile --ignore-scripts`, every exit 0 (`skills-lane-seat2/28111/gates-ran.clean.txt`); `--ran` reconciles 48 derived / 48 run / 0 NOT-MEASURED / 0 UNRUN. No changeset derived: no published package is touched, `skip-changeset` rides the create. - Landing tier: `check-governed-merges.mjs --test` on the two paths answers 0 of 2 on the register (not governed, ordinary queue landing); the register's reading at PR time is the seat's. No contract review is owed: none of the four contract faces is touched. ## Human Minimum Each item is one rule from [CONTRIBUTING.md › Human Minimum](https://github.com/objectstack-ai/objectstack/blob/main/CONTRIBUTING.md#human-minimum), which links the AGENTS.md text that states it. - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (not touched) - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; the derived lint families pass. - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. (no published package: `skip-changeset`) - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. (not touched) - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English (the 维护者速读 block is the one Chinese channel). - [x] The *Before Submitting* list in CONTRIBUTING.md is done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016WV4cwv77cYicgaKyj39Y2 Co-authored-by: Claude <noreply@anthropic.com>
1 parent a3d24c9 commit 412908c

2 files changed

Lines changed: 45 additions & 13 deletions

File tree

‎scripts/pm/check-half-states.mjs‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12710,8 +12710,16 @@ export const CONTRACT_REVIEW_HEAD_SHA_LINE = new RegExp(
1271012710
* Measured in the delta review of the fence-tracking reader (2026-10-30): a
1271112711
* ``` followed by prose closed the fence here while the renderer kept it open,
1271212712
* so a `Head-sha:` line after it was read; 0 of 713 live records carry one.
12713+
*
12714+
* A BACKTICK fence's info string may not contain a backtick (CommonMark §4.5):
12715+
* a line opening on three backticks whose rest carries one more is a paragraph
12716+
* holding code spans, not a fence, so it opens nothing and the lines below it
12717+
* are read. A tilde fence's info string may hold anything, backticks included.
12718+
* Measured in the #28103 review (F16, 2026-10-30): the opener read such a line
12719+
* as a fence and skipped the record's own line below it, in the fail-closed
12720+
* direction; 0 of 713 live records carry one.
1271312721
*/
12714-
const FENCE_LINE = /^[ ]{0,3}(`{3,}|~{3,})/;
12722+
const FENCE_LINE = /^[ ]{0,3}(`{3,}(?!.*`)|~{3,})/;
1271512723
const FENCE_CLOSE_LINE = /^[ ]{0,3}(`{3,}|~{3,})[ \t]*$/;
1271612724

1271712725
/**
@@ -33618,6 +33626,7 @@ Doubles as the fire's **write self-check** (step 0). \`201\` is not the reading.
3361833626
t('⛔ record reader: a `Head-sha:` line before the heading, blockquoted, bulleted or fenced — naming another head ABOVE the record\'s own — is NO review of that head', Object.values(CITED51).map((body) => latestContractReviewOnHead([cm51(1, body, T51)], HEAD51)).join('|'), '|||');
3361933627
t('⭐ record reader: …and each IS the review of the head its own line names — the cited line is prose to the reader', Object.values(CITED51).map((body) => latestContractReviewOnHead([cm51(1, body, T51)], OLDHEAD51)?.sha).join(), [OLDHEAD51, OLDHEAD51, OLDHEAD51, OLDHEAD51].join());
3362033628
t('⛔ record reader: a quoted, bulleted or fenced line ALONE names no head, nor does a line with NO heading above it, nor one inside an unclosed fence', [contractReviewHeadSha(UNDER51(`> Head-sha: \`${HEAD51}\``)), contractReviewHeadSha(UNDER51(`- **Head-sha:** \`${HEAD51}\``)), contractReviewHeadSha(UNDER51('```md', `Head-sha: \`${HEAD51}\``, '```')), contractReviewHeadSha(`Head-sha: \`${HEAD51}\``), contractReviewHeadSha(UNDER51('```', `Head-sha: \`${HEAD51}\``))].join('|'), '||||');
33629+
t('⛔ #28111 · record reader: a backtick run whose info string carries a BACKTICK opens no fence (CommonMark) — the line below it reads; a backtick-free info string opens one, and so does a tilde run with a backtick in its info string', [contractReviewHeadSha(UNDER51('``` a`b', `Head-sha: \`${HEAD51}\``)), contractReviewHeadSha(UNDER51('```md `x`', `Head-sha: \`${HEAD51}\``, '```', `Head-sha: \`${OLDHEAD51}\``)), contractReviewHeadSha(UNDER51('```md', `Head-sha: \`${HEAD51}\``)), contractReviewHeadSha(UNDER51('~~~ a`b', `Head-sha: \`${HEAD51}\``)), contractReviewHeadSha(UNDER51('````', '``` a`b', `Head-sha: \`${HEAD51}\``, '````', `Head-sha: \`${OLDHEAD51}\``))].join('|'), [HEAD51, HEAD51, '', '', OLDHEAD51].join('|'));
3362133630
t('record reader: a tilde fence is a fence too, and CRLF line endings read', [contractReviewHeadSha(UNDER51('~~~', `Head-sha: \`${HEAD51}\``, '~~~', `Head-sha: \`${OLDHEAD51}\``)), contractReviewHeadSha(`## Contract review\r\nHead-sha: \`${HEAD51}\`\r\n`)].join(), [OLDHEAD51, HEAD51].join());
3362233631
t('⛔ record reader: the RETIRED dialects — head in the heading (two spellings), on the first body line, in an adoption sentence — name no head', [DIALECT_A, DIALECT_B, DIALECT_C, DIALECT_D].map((d) => latestContractReviewOnHead([cm51(1, d(HEAD51), T51)], HEAD51)).join('|'), '|||');
3362333632

‎scripts/pm/post-stamped.mjs‎

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2060,20 +2060,35 @@ export function keyedLineRefusalText(rows) {
20602060

20612061
/** What the record's owner accepts, printed BY the refusal so the fix is one line away. */
20622062
export const RECORD_KEY_SPELLINGS = Object.freeze({
2063-
'Head-sha': '`Head-sha: ` then the reviewed head as 7 to 40 hex in a code span of its OWN, at the START of a line (up to three spaces of indent) BELOW an unquoted, unindented `## Contract review` heading — not blockquoted, not bulleted, not inside a fence, not indented as code (four spaces or a tab), not before the heading, not under a quoted or code-indented heading; the first such line is the head the record names, and a record written before the line existed may omit it',
2063+
'Head-sha': '`Head-sha: ` then the reviewed head as 7 to 40 hex in a code span of its OWN, at the START of a line (up to three spaces of indent) BELOW an unquoted `## Contract review` heading itself indented at most three spaces — not blockquoted, not bulleted, not inside a fence, not indented as code (four spaces or a tab), not before the heading, not under a quoted or code-indented heading; the first such line is the head the record names, and a record written before the line existed may omit it',
20642064
'Local-runs': '`Local-runs: none` at the START of a line, or `Local-runs: probe — REASON` naming the ONE local run the read-only rule was broken for and why; a record written before the line existed may omit it',
20652065
});
20662066

2067-
/** PRESENCE only, case-blind: a `Head-sha` key opening a LINE, however decorated or placed — any indent, blockquote
2068-
* markers, a bullet or a list number, bold or backticks around the key — so a decorated, fenced, code-indented or
2069-
* pre-heading key line still counts as written. Consulted solely to tell "the author wrote the key and the reader
2070-
* cannot read it" (refused) from "no key at all" (not re-judged). ⛔ Not mid-sentence: a comment that quotes a record's
2071-
* heading and then names the key in prose wrote no key line, and was refused for it until 2026-10-30 (loudness only). */
2067+
/** PRESENCE only, case-blind, TWO limbs — either says "the author wrote the key":
2068+
* 1. `HEAD_SHA_KEY_LINE` — a `Head-sha` key opening a LINE, however decorated or placed: any indent, blockquote
2069+
* markers, a bullet or a list number, bold or backticks around the key — so a decorated, fenced, code-indented or
2070+
* pre-heading key line still counts as written. The convention `keyLineRegex` imposes on every other key.
2071+
* 2. `HEAD_SHA_KEY_SPAN` — the key DIRECTLY followed by a 7-to-40 hex code span, anywhere on a line, through the
2072+
* decoration a key or a value may wear (bold, backticks, underscores, strikethrough, a table cell bar). Restores the
2073+
* refusal of 16 reader-null shapes the line limb alone let through (the #28103 review, ①.4): a word before the
2074+
* key (`Current Head-sha:`), a second key on the line, a table row, underscore emphasis, a task-list item, a
2075+
* heading-styled key, a unicode bullet or an emoji, a bullet then a blockquote marker, strikethrough, parentheses,
2076+
* a no-break-space indent, an HTML comment. Each reads null to every reader, so each is a record that would be
2077+
* filed as a review of NO head; this limb says so before the write.
2078+
* Consulted solely to tell "the author wrote the key and the reader cannot read it" (refused) from "no key at all"
2079+
* (not re-judged). ⛔ Not a mid-sentence mention: a comment that quotes a record's heading and then names the key in
2080+
* prose — `Head-sha:` with no span, or a span further along the sentence — wrote no key, and was refused for it until
2081+
* 2026-10-30 (loudness only). The one prose shape the span limb DOES refuse is the key immediately followed by a hex
2082+
* span inside a sentence, which the #28103 review measured as its only false positive and this card accepted:
2083+
* measured on the 11764 issue comments updated since 2026-10-23 (750 carrying the record's heading, 2026-10-30),
2084+
* 0 comments write that shape on a line that is not also a key line, so the limb refuses no live body. */
20722085
const HEAD_SHA_KEY_LINE = /^[ \t]*(?:>[ \t]*)*(?:(?:[-*+]|\d+[.)])[ \t]+)?[`*]*head-sha[ \t`*]*:/im;
2086+
const HEAD_SHA_KEY_SPAN = /head-sha[`*_~]*[ \t]*:[ \t*_~|]*`[0-9a-f]{7,40}`/i;
2087+
const headShaKeyPresent = (line) => HEAD_SHA_KEY_LINE.test(line) || HEAD_SHA_KEY_SPAN.test(line);
20732088

20742089
/** The first line carrying a `Head-sha` key, however spelled — a LOCATOR for the writer's eye, ⛔ never the judgement. */
20752090
function headShaKeyLine(text) {
2076-
const hit = text.split(/\r?\n/).find((line) => HEAD_SHA_KEY_LINE.test(line));
2091+
const hit = text.split(/\r?\n/).find(headShaKeyPresent);
20772092
return hit === undefined ? '(no single line carries the key)' : offendingSpan(hit.trim(), 160);
20782093
}
20792094

@@ -2084,8 +2099,8 @@ function headShaKeyLine(text) {
20842099
* verdict over a line nobody had been asked to write. Scoped by the record's own heading marker, on `--comment`
20852100
* alone — a record IS a comment.
20862101
* Head-sha `contractReviewHeadSha` (`check-half-states.mjs`) is the ONE reader every guard reaches the record's head
2087-
* through: the first plain `Head-sha:` line below an unquoted, unindented heading, outside any blockquote,
2088-
* bullet, fence or indented code. A
2102+
* through: the first plain `Head-sha:` line below an unquoted heading indented at most three spaces (as the
2103+
* line itself may be), outside any blockquote, bullet, fence or indented code. A
20892104
* body that carries the key somewhere and reads `null` there would be filed by every reader as a review of
20902105
* NO head — absent on the owed list, refused at the queue — so it is refused here, before the write. The
20912106
* template's null-oid placeholder reads as a head (it is 40 hex) and is not this row's: C6 refuses it.
@@ -2097,8 +2112,8 @@ export function recordKeyedLineRefusals(body) {
20972112
const text = String(body ?? '');
20982113
if (!CONTRACT_REVIEW_HEADING_MARKER.test(text)) return [];
20992114
const rows = [];
2100-
if (HEAD_SHA_KEY_LINE.test(text) && contractReviewHeadSha(text) === null)
2101-
rows.push({ key: 'Head-sha', line: headShaKeyLine(text), why: '`contractReviewHeadSha` reads NO head here — a `Head-sha` key opens a line, but no line below an unquoted, unindented `## Contract review` heading carries it plainly with a hex span of its own (a blockquoted, bulleted, fenced or pre-heading line, a code-indented line — four spaces or a tab — a line under a quoted or code-indented heading, the key folded into the span, a bare hex value, a lowercase key and a sub-floor span all read as nothing). Every reader would file this record as a review of NO head.' });
2115+
if (headShaKeyPresent(text) && contractReviewHeadSha(text) === null)
2116+
rows.push({ key: 'Head-sha', line: headShaKeyLine(text), why: '`contractReviewHeadSha` reads NO head here — a `Head-sha` key opens a line or is followed by a hex span, but no line below an unquoted `## Contract review` heading indented at most three spaces carries it plainly with a hex span of its own (a blockquoted, bulleted, fenced or pre-heading line, a code-indented line — four spaces or a tab — a line under a quoted or code-indented heading, the key folded into the span, a bare hex value, a lowercase key and a sub-floor span all read as nothing). Every reader would file this record as a review of NO head.' });
21022117
const runs = readLocalRuns(text);
21032118
if (!localRunsStand(runs))
21042119
rows.push({ key: 'Local-runs', line: runs.line, why: '`readLocalRuns` reads the line and cannot grade its value — `none` and `probe — REASON` are the closed set, and a probe with no reason names no deviation.' });
@@ -5328,7 +5343,15 @@ export function selfTest() {
53285343
// or `+`-bulleted line, is a written line the reader refuses, and is refused here.
53295344
t('⭐ NOT a key line: a record-shaped comment that names `Head-sha:` mid-sentence, with no line opening on the key, is untouched — presence is a key LINE', rkeys('## Contract review\n\nThe seat\'s own record carries its Head-sha: line plainly, below the heading; see `Head-sha:` in the template.') === '' && rkeys(`> ## Contract review\n\nquoted above; the record\'s Head-sha: line is \`${SHA_HEAD}\` there`) === '');
53305345
t('⛔ …while a decorated key LINE still counts as written and is refused when the reader names no head: numbered, doubly quoted, `+`-bulleted, and one under a CODE-INDENTED heading', rkeys(SHA_WITH([`1. Head-sha: \`${SHA_HEAD}\``])) === 'Head-sha' && rkeys(SHA_WITH([`> > **Head-sha:** \`${SHA_HEAD}\``])) === 'Head-sha' && rkeys(SHA_WITH([`+ Head-sha: \`${SHA_HEAD}\``])) === 'Head-sha' && rkeys(` ## Contract review\nHead-sha: \`${SHA_HEAD}\``) === 'Head-sha');
5331-
t('the `Head-sha` refusal and the printed spelling NAME the two causes the reader added — a code-indented line and a line under a quoted or code-indented heading', (() => { const text = recordLineRefusalText(recordKeyedLineRefusals(SHA_WITH([`\tHead-sha: \`${SHA_HEAD}\``]))); const rule = RECORD_KEY_SPELLINGS['Head-sha']; return text.includes('a code-indented line — four spaces or a tab') && text.includes('a line under a quoted or code-indented heading') && rule.includes('not indented as code (four spaces or a tab)') && rule.includes('not under a quoted or code-indented heading') && rule.includes('BELOW an unquoted, unindented'); })());
5346+
// ⛔ #28111: the SECOND presence limb — the key directly followed by a hex span, anywhere on a line — restores the
5347+
// refusal of the 16 reader-null shapes the line limb let through (the #28103 review, ①.4); each reads null and is refused.
5348+
t('⛔ #28111 · the key behind a WORD, a second key on the line, a table row and a task-list item are written keys the reader cannot read — refused', [`Current Head-sha: \`${SHA_HEAD}\``, `Reviewed Head-sha: \`${SHA_HEAD}\``, `head: Head-sha: \`${SHA_HEAD}\``, `Served-tier: \`${CONTRACT_REVIEW_TIER_NAME}\` · Head-sha: \`${SHA_HEAD}\``, `| Head-sha: | \`${SHA_HEAD}\` |`, `| Head-sha: \`${SHA_HEAD}\` |`, `- [ ] Head-sha: \`${SHA_HEAD}\``].every((line) => rkeys(SHA_WITH([line])) === 'Head-sha' && contractReviewHeadSha(SHA_WITH([line])) === null));
5349+
t('⛔ #28111 · underscore emphasis, a heading-styled key, a unicode bullet or an emoji, a bullet then a blockquote marker, strikethrough, parentheses, a no-break-space indent and an HTML comment — each refused', [`_Head-sha:_ \`${SHA_HEAD}\``, `__Head-sha__: \`${SHA_HEAD}\``, `### Head-sha: \`${SHA_HEAD}\``, `• Head-sha: \`${SHA_HEAD}\``, `✅ Head-sha: \`${SHA_HEAD}\``, `- > Head-sha: \`${SHA_HEAD}\``, `~~Head-sha:~~ \`${SHA_HEAD}\``, `(Head-sha: \`${SHA_HEAD}\`)`, `\u00a0Head-sha: \`${SHA_HEAD}\``, `<!-- Head-sha: \`${SHA_HEAD}\` -->`].every((line) => rkeys(SHA_WITH([line])) === 'Head-sha' && contractReviewHeadSha(SHA_WITH([line])) === null));
5350+
t('⭐ #28111 · the prose cases #28103 freed STAY free under the span limb: the key with no span, the key with its span further along the sentence, a sub-floor span, and the key with a span that is no sha', rkeys('## Contract review\n\nThe seat\'s own record carries its Head-sha: line plainly, below the heading; see `Head-sha:` in the template.') === '' && rkeys(`> ## Contract review\n\nquoted above; the record\'s Head-sha: line is \`${SHA_HEAD}\` there`) === '' && rkeys('## Contract review\n\nits Head-sha: `ba3d95` prefix is the one I cite') === '' && rkeys('## Contract review\n\nits Head-sha: `origin/main` is what I cite') === '');
5351+
t('⛔ #28111 · the one prose shape the span limb refuses, by the card\'s accepted bound: the key IMMEDIATELY followed by a hex span inside a sentence, in a body whose reader names no head; a record carrying its own plain line above it passes', rkeys(`## Contract review\n\nI re-read the record above (its Head-sha: \`${SHA_HEAD}\` is the one I judged) and agree.`) === 'Head-sha' && rkeys(SHA_WITH([`Head-sha: \`${SHA_HEAD}\``], `(the earlier record\'s Head-sha: \`${'a'.repeat(40)}\` is superseded)`)) === '');
5352+
t('#28111 · the locator quotes the span-limb line the refusal is about, and the `why` names BOTH limbs', (() => { const rows = recordKeyedLineRefusals(SHA_WITH([`Current Head-sha: \`${SHA_HEAD}\``])); return rows.length === 1 && rows[0].line.startsWith('Current Head-sha') && rows[0].why.includes('opens a line or is followed by a hex span'); })());
5353+
t('#28111 · `RECORD_KEY_SPELLINGS[\'Head-sha\']` grants the heading the three spaces the reader admits — "indented at most three spaces", never "unindented"', RECORD_KEY_SPELLINGS['Head-sha'].includes('heading itself indented at most three spaces') && !/unindented/.test(RECORD_KEY_SPELLINGS['Head-sha']) && !/unindented/.test(recordKeyedLineRefusals(SHA_WITH([`> Head-sha: \`${SHA_HEAD}\``]))[0].why));
5354+
t('the `Head-sha` refusal and the printed spelling NAME the two causes the reader added — a code-indented line and a line under a quoted or code-indented heading', (() => { const text = recordLineRefusalText(recordKeyedLineRefusals(SHA_WITH([`\tHead-sha: \`${SHA_HEAD}\``]))); const rule = RECORD_KEY_SPELLINGS['Head-sha']; return text.includes('a code-indented line — four spaces or a tab') && text.includes('a line under a quoted or code-indented heading') && rule.includes('not indented as code (four spaces or a tab)') && rule.includes('not under a quoted or code-indented heading') && rule.includes('BELOW an unquoted'); })());
53325355
t('both lines unreadable ⇒ both rows, `Head-sha` first', rkeys(SHA_WITH([`> Head-sha: \`${SHA_HEAD}\``], 'Local-runs: probe')) === 'Head-sha,Local-runs');
53335356
t('the `Head-sha` refusal prints the spelling that reads, names the owner, and quotes the offending line', (() => { const rows = recordKeyedLineRefusals(SHA_WITH([`> Head-sha: \`${SHA_HEAD}\``])); const text = recordLineRefusalText(rows); return text.includes(RECORD_KEY_SPELLINGS['Head-sha']) && text.includes('contractReviewHeadSha') && rows[0].line.includes('> Head-sha'); })());
53345357
t('⛔ NOT a record: a claim or a report carrying a quoted `Head-sha:` line is untouched — the reader runs on the record\'s heading only', rkeys(`Claim: x\n> Head-sha: \`${SHA_HEAD}\``) === '' && rkeys(`os-dev-report\n\n> Head-sha: \`${SHA_HEAD}\``) === '');

0 commit comments

Comments
 (0)