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:
+11
-1
@@ -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,7 +91,9 @@ 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
|
||||||
|
// comment carries the ruling)
|
||||||
|
if (!downstreamOutput(f)) {
|
||||||
text.split('\n').forEach((line, i) => {
|
text.split('\n').forEach((line, i) => {
|
||||||
for (const ch of line) {
|
for (const ch of line) {
|
||||||
if (ch.charCodeAt(0) > 0x7f) {
|
if (ch.charCodeAt(0) > 0x7f) {
|
||||||
@@ -93,6 +102,7 @@ for (const f of files) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 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
|
||||||
|
|||||||
Reference in New Issue
Block a user