Skip to content

Commit 97e30bb

Browse files
committed
fix(pm): assemble the record template's branch placeholder so it is not read as a dead path population
The dispatch derivation reads any quoted path-shaped literal in a gate's module body as the population that gate watches. The template's branch placeholder is path-shaped and names no tracked file, so it became this family's only declared literal and `check:declared-population-live` refused it: a gate telling the derivation it reads a population while the derivation reads none. Assembled from two parts, neither carrying a separator, so neither is admitted and this file goes on declaring no path population — the state it had before the template landed, and the truthful one, since it reads no file in the tree. The printed template is byte-identical (same md5 before and after), and a new self-test case spells the printed placeholder out where the scan does not reach, so a later tidy that re-joins the literal is caught rather than silently shipped. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DAcomhvR9kKizeYgg89Vo8
1 parent d8afc33 commit 97e30bb

1 file changed

Lines changed: 20 additions & 2 deletions

File tree

‎scripts/pm/check-clause2-carriers.mjs‎

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ const SELF_TEST_BATTERIES = Object.freeze({
697697
'#17149: a claim that parses to ZERO branches — malformed, never absent': 26,
698698
'#17098: a key-INITIAL line that DESCRIBES the spelling — the half the fixture did not cover': 48,
699699
'#17959: POSITION is the LINE, not the body — the merged #17819 specimen in both its shapes': 10,
700-
'#18042: the copyable record TEMPLATE — the one machine-read artefact with nothing to copy': 23,
700+
'#18042: the copyable record TEMPLATE — the one machine-read artefact with nothing to copy': 24,
701701
});
702702

703703
// DELETING an entry silences that battery's floor exactly as effectively as
@@ -2668,7 +2668,17 @@ export function readServedTier(text) {
26682668
*/
26692669
export const RECORD_TEMPLATE_PLACEHOLDERS = Object.freeze({
26702670
headSha: '0'.repeat(40),
2671-
implementedBy: 'claude/issue-NNNN-slug',
2671+
// ⛔ ASSEMBLED, never spelled as one span -- and for the same reason the
2672+
// repo-shape example in `main`'s refusal below is spelled in two: the
2673+
// dispatch derivation reads any quoted path-shaped literal in a module body
2674+
// as the population this gate watches, and a branch placeholder names no
2675+
// tracked file. Spelled whole, it made this family's ONLY declared literal a
2676+
// dead one, which `check:declared-population-live` refuses out loud -- a gate
2677+
// telling the derivation it reads a population while the derivation reads
2678+
// none. Neither half carries a separator, so neither is admitted, and this
2679+
// file goes on declaring no path population at all (it reads no file in the
2680+
// tree). ⛔ Do not re-join these into one literal to tidy it.
2681+
implementedBy: ['claude', 'issue-NNNN-slug'].join('/'),
26722682
reviewedBy: 'session_SEATSESSIONID',
26732683
});
26742684

@@ -5417,6 +5427,14 @@ export function selfTest() {
54175427
t('⛔ nor an unfilled MENU in the record — one value per slot, never the `yes|no` shape this file refuses', !TPL_RECORD.includes('|'));
54185428
t('`--template` is an honoured flag, so the parse, the usage text and the refusal all know it', KNOWN_FLAGS.has('--template') && argvRefusalLines(['--template']) === null && usageLines().join('\n').includes('--template'));
54195429
t('⛔ …spelled as taking NO value, so it can never eat the argument after it', KNOWN_FLAGS.get('--template').value === null);
5430+
// The branch placeholder is ASSEMBLED in the module body so the derivation
5431+
// does not read it as a dead path population. This pin spells the printed
5432+
// form OUT, here where the scan does not reach, so the assembly can never
5433+
// quietly print something else -- and so a future tidy that re-joins it into
5434+
// one literal is caught by `check:declared-population-live` rather than by
5435+
// nobody. ⛔ Not derived from the constant: a pin written from the thing it
5436+
// pins asserts nothing.
5437+
t('⭐ the printed placeholder is EXACTLY the branch form, assembled or not', says(TPL_RECORD, 'Implemented-by: `claude/issue-NNNN-slug`') && RECORD_TEMPLATE_PLACEHOLDERS.implementedBy === 'claude/issue-NNNN-slug');
54205438

54215439
// -- The floor: every declared battery RAN, and ran its cases (#13489) -----
54225440
//

0 commit comments

Comments
 (0)