diff --git a/docs/decisions.md b/docs/decisions.md index df1f440..a08b072 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -960,8 +960,8 @@ https://issues.chromium.org/issues/521080746 unfixed can run the library. The library reads JSON text with `parseJsonText`, never `JSON.parse`: from V8 13.6, `JSON.parse` can read an escaped key as another key it read before, and the round-trip then refuses its own -output. A test fails on `JSON.parse(` in a shipped file. The tests' own oracles keep `JSON.parse`, -since a misread there fails the gate and never hides a bug. +output. A test reads escaped keys back through each reader after priming V8's misread. The tests' +own oracles keep `JSON.parse`, since a misread there fails the gate and never hides a bug. ## An ADF document is read once into a plain copy diff --git a/src/result.test.ts b/src/result.test.ts index 02947ad..6bf3964 100644 --- a/src/result.test.ts +++ b/src/result.test.ts @@ -14,7 +14,7 @@ import { withinEngineLimits } from './length-bound.ts' const em: AdfMark = { type: 'em' } const duplicateMarks: AdfDocument = { content: [{ content: [{ marks: [em, em], text: 'x', type: 'text' }], type: 'paragraph' }], type: 'doc', version: 1 } -// One refusal per code. The Record type fails the build where a code has no entry, or an entry names no code. +// The Record type fails the typecheck where a code has no entry, or an entry names no code. const causes: Record Result> = { 'engine-limit': () => withinEngineLimits(() => { diff --git a/todo.md b/todo.md index 9d8ccf1..a3dcf9b 100644 --- a/todo.md +++ b/todo.md @@ -153,9 +153,9 @@ Technical principle: DRY. Found by the principles audit of the release review of ### 81. Fail the gate unless the README's error tables list exactly the codes `ConvertErrorCode` holds. -`src/result.test.ts` holds one refusal per code in a `Record`, so a code added -or removed leaves the README's tables a false contract under a green gate. Assert that the tables -list exactly the codes of that record's keys. Found by the technical-principles audit of item 78, +Nothing checks the README's tables against the codes: `src/result.test.ts` holds a refusal per code, +but a code added or removed leaves the tables a false contract under a green gate. Assert that the +tables list exactly the codes `causes` holds. Found by the technical-principles audit of item 78, 2026-10-05. ### 147. Ship `adfToPlainText`, writing a document's content with no markup, under a README goal for plain text.