3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-12 11:48:29 +01:00

Answer prose round 1: 1 🔴, 2 🟡 (0 misread); correct the decision, item 81 and a comment

This commit is contained in:
2026-11-09 08:07:26 +01:00
committed by Lillem4n
parent 87e5f0dca1
commit 04127727a8
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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<ConvertErrorCode, () => Result<unknown>> = {
'engine-limit': () =>
withinEngineLimits(() => {
+3 -3
View File
@@ -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<ConvertErrorCode, …>`, 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.