the lint learns the downstream-output carve-out (developer, 2026-11-29): calibration.md and packager-calibration.md capture model emissions verbatim as research records, and the ASCII rule is for authored prose -- a captured emission's bytes are the datum, rewriting them falsifies the record. Rule 1 scopes around the two files; every other rule still applies. The lint is green again after 8ef96c7 shipped the files past it -- the staging-order miss, 'lint again after staging' bit exactly as written.

This commit is contained in:
2026-11-29 00:11:11 +00:00
parent 20e06448d0
commit 29086b41cf
+18 -8
View File
@@ -64,6 +64,13 @@ const substrateProse = (f) => f === 'README.md' || ROOT_PROMPTS.has(f);
// the checker's own source names what it bans (the rule patterns and // the checker's own source names what it bans (the rule patterns and
// their comments); it is exempt from the rules it defines // their comments); it is exempt from the rules it defines
const isSelf = (f) => f === 'test/check-repo.mjs'; const isSelf = (f) => f === 'test/check-repo.mjs';
// rule 1's carve-out (developer, 2026-11-29): downstream output --
// files that capture model emissions verbatim as research records.
// The ASCII rule is for authored prose ("the encoding is the
// problem, never the visual"); a captured emission's bytes are the
// datum, and rewriting them would falsify the record. Rule 1 only --
// every other rule still applies to these files.
const downstreamOutput = (f) => f === 'calibration.md' || f === 'packager-calibration.md';
// rule 10's patterns, derived at runtime so this file never contains // rule 10's patterns, derived at runtime so this file never contains
// the facts it bans (a literal here would be the leak itself). The // the facts it bans (a literal here would be the leak itself). The
@@ -84,15 +91,18 @@ for (const f of files) {
if (buf.includes(0)) continue; // binary -- no text rules to enforce if (buf.includes(0)) continue; // binary -- no text rules to enforce
const text = buf.toString('utf8'); const text = buf.toString('utf8');
// rule 1: ascii bytes // rule 1: ascii bytes (downstream output exempt -- the helper's
text.split('\n').forEach((line, i) => { // comment carries the ruling)
for (const ch of line) { if (!downstreamOutput(f)) {
if (ch.charCodeAt(0) > 0x7f) { text.split('\n').forEach((line, i) => {
fail(`${f}:${i + 1} non-ascii U+${ch.charCodeAt(0).toString(16).padStart(4, '0')} "${ch}"`); for (const ch of line) {
break; // one report per line is plenty if (ch.charCodeAt(0) > 0x7f) {
fail(`${f}:${i + 1} non-ascii U+${ch.charCodeAt(0).toString(16).padStart(4, '0')} "${ch}"`);
break; // one report per line is plenty
}
} }
} });
}); }
// rule 2: no text-mutating css. text-transform is linted in every // rule 2: no text-mutating css. text-transform is linted in every
// code file (it only ever appears as a css property -- inline // code file (it only ever appears as a css property -- inline