Skip to content

Commit 425f292

Browse files
committed
fix(devx): the docs-frontmatter self-test refuses an unreadable extractor with exit 3 PREREQUISITE NOT MET
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016vtdMao3dQS9EfQfpyWixd
1 parent 68cbec1 commit 425f292

1 file changed

Lines changed: 18 additions & 7 deletions

File tree

scripts/check-doc-frontmatter.mjs

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -921,9 +921,10 @@ const CHILD_MODULE_GRAPH = [
921921
* and nothing had been found; the cases had not stopped running, they had never
922922
* been reachable; and the remedy the text prescribes -- hunt for a deleted case
923923
* -- looks for code nobody deleted. An absent prerequisite is NOT MEASURED, and
924-
* this repo already answers that with exit 3 `PREREQUISITE NOT MET` in eighteen
925-
* scripts. This gate was the one outside the convention, not the one proposing
926-
* it: `scripts/import-prerequisite.mjs` owns the wording, the exit code and the
924+
* this repo already answers that with exit 3 `PREREQUISITE NOT MET` across the
925+
* scripts that print those two words. This gate was the one outside the
926+
* convention, not the one proposing it, so nothing here is designed:
927+
* `scripts/import-prerequisite.mjs` owns the wording, the exit code and the
927928
* load-bearing "Nothing was measured" clause, and its header carries the
928929
* argument for the number.
929930
*
@@ -948,7 +949,9 @@ const CHILD_MODULE_GRAPH = [
948949
* branch against constructed trees without an uninstalled checkout to run on.
949950
*
950951
* @param {string} root a repo root to ask about
951-
* @returns {{ headline: string, detail: string[], fix: string } | null}
952+
* @returns {{ pkg: string, headline: string, detail: string[], fix: string } | null}
953+
* -- `pkg` is the shape `classifyImportFailure` returns, so the shared frame's
954+
* closure step reads this verdict exactly as it reads its own.
952955
*/
953956
export function docsExtractorPrerequisite(root) {
954957
const from = join(root, DOCS_APP);
@@ -1058,9 +1061,17 @@ export async function selfTest() {
10581061
//
10591062
// Placed here rather than beside battery (7), the only battery that needs it,
10601063
// so the shared frame's load-bearing clause -- "this gate exited before
1061-
// running a single check" -- is literally true when it prints. 45 gates
1062-
// inherit that sentence verbatim; a refusal issued after six batteries had
1063-
// already judged would make it false in all of them.
1064+
// running a single check" -- is literally true when it prints. Every gate that
1065+
// imports that frame inherits the sentence verbatim, so a refusal issued after
1066+
// six batteries had already judged would make it false in all of them at once.
1067+
//
1068+
// The price is real and worth naming: on a tree where `apps/docs` is not
1069+
// installed, batteries (1)-(10) no longer report their own findings. That tree
1070+
// is a local one -- CI's `lint` job runs `pnpm install --frozen-lockfile` over
1071+
// the whole workspace, so this line is never reached there -- and the run still
1072+
// FAILS either way. What a reader loses is a finding they could not have
1073+
// trusted the count of; what they gain is a verdict that does not lie about
1074+
// what was measured.
10641075
//
10651076
// ⛔ This is not a weaker gate. Exit 3 is non-zero and every consumer of this
10661077
// script treats any non-zero as failure, so nothing that used to red goes

0 commit comments

Comments
 (0)