mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-12 11:48:29 +01:00
Record the comprehension check: paired ruling worse against 0166a71
This commit is contained in:
@@ -1441,3 +1441,34 @@ Inherited architect, decided by:
|
||||
- Locality: `src/markdown/portable/inline-reduction.ts:168` `trimmedEdges`: reads `spanned[index ± 1]` beside `merged[index]`, a same-length contract neither end states
|
||||
- Locality: `src/markdown/emit/inline-line.ts:69` `portableLineFallback`: the reducer judges the parted line while `linePass` writes the spanned one, so the line judged is no longer the line written
|
||||
- Locality: `src/markdown/emit/inline-line.ts:113` `linePass`: each pass builds, emits and may discard a rewritten node list, a second path to suspect for a mark gone
|
||||
|
||||
## 2026-11-03T21:46:31Z, PR #112 at f7b8e45, against 0166a71
|
||||
|
||||
Ruling: worse
|
||||
|
||||
| Seat | Navigation | Locality | Shape | Self-sufficiency | Overall |
|
||||
|---|---|---|---|---|---|
|
||||
| Mid A | same | worse | worse | same | worse |
|
||||
| Inherited architect | same | worse | worse | worse | worse |
|
||||
|
||||
Mid A, decided by:
|
||||
|
||||
- Locality, Overall: `src/markdown/emit/line-escaping.ts:22` `MarkRun`. `depth` used to be an unconditional index into each node's marks. It now means that only "on a parted line", so `withoutMarks` (`src/markdown/portable/inline-reduction.ts:257`) and `endsAlone` (`src/markdown/emit/unspellable-runs.ts:94`) are correct only because of which line they were handed, and neither shows that at its use.
|
||||
- Locality: `src/markdown/emit/inline-line.ts:71` `portableLineFallback`. The bare `false` argument is what upholds that `depth` condition, and the reason sits in another file. `linePass` tries `true` first and the reducer's counts use `spans: true`, so a reader must keep track of which walk each caller gets.
|
||||
- Locality, Shape, Overall: `src/markdown/emit/inline-line.ts:113` `linePass`. One straight walk became two attempts with a preference. Its helper `writesSpanned` infers edge whitespace from a `!adf:` prefix on a syntax segment, so the reader has to work out why that prefix check means whitespace.
|
||||
- Locality, Shape: `src/markdown/emit/inline-line.ts:282` `runsSharedWithNext`. With `countSharedRuns`, this is a second recursive walk that the reducer must trust to mirror `emitRun`. It uses an empty carried set, returns silently past `largestNesting`, and adds to the emit file's exports.
|
||||
- Shape: `src/markdown/emit/inline-line.ts:247` `inlineRuns`. The base's simple append loop became an offset-skipping loop plus `nodesInRun`, which walks past holders and then slices back to them. It reads as correct, but it takes more to follow.
|
||||
- Shape: `src/markdown/portable/inline-reduction.ts:199` `leafEdges`. The neighbour nodes gave way to `number | undefined` counts, where undefined means a line edge. They come from the `shared` array, which `trimmedEdges` indexes by position, and this is less direct than asking about the neighbour itself.
|
||||
- Shape: `src/markdown/emit/inline-line.ts:40` `InlineContext.spans`. `spans` is a boolean here, but in `emitMarkedRun` it holds the result of `codeSpans(nodes)`, so the name tells a reader less than it should.
|
||||
- Locality: `src/markdown/portable/inline-reduction.ts:168` `trimmedEdges`. This one reads better. The reducer asks the emitter's own grouping instead of the base's parallel `sharedRuns` and its warning comment, so the two can't disagree on what a run is. It offsets part of the cost but doesn't flip the ruling.
|
||||
- Shape: `src/markdown/emit/inline-line.ts:430` `tryLink`. This also reads better, since `nodes[0]?.outer ?? 0` says what the link's nodes hold where the base's `depth + 1` assumed it. It is too small to move the ruling.
|
||||
|
||||
Inherited architect, decided by:
|
||||
|
||||
- Locality, Self-sufficiency: `src/markdown/emit/inline-line.ts:71` `portableLineFallback`, together with `src/markdown/emit/inline-line.ts:115` `linePass` and `src/markdown/portable/inline-reduction.ts:168` `trimmedEdges`. The reducer now trims edges by the spanned grouping and judges fallbacks on the parted line, and the writer then prefers the spanned line, so three steps read two different lines. For `**Run `npm ci` first**` the parted line traces as misflanked and `strong` should drop, and only `adf-to-portable-markdown.test.ts:426` showed otherwise: it survives because `emitEmphasis` spells the kept edge space as `!adf:text`, in a portable verdict line whose directive the portable writer would never emit, and no comment states this.
|
||||
- Locality: `src/markdown/emit/inline-line.ts:267` `nodesInRun`, with `src/markdown/emit/line-escaping.ts:22` `MarkRun`. In the base, a `RunNode`'s `outer` always equalled the walk's `depth`, and `depth` was always an index into a node's marks; now `MarkRun.depth` is a mark index only on a parted line. `withoutMarks` trusts that index, and it holds only because `linePass` and `portableLineFallback` both route fallbacks through the parted attempt, in another file. `tryLink`'s `nodes[0]?.outer ?? 0` is safe only if the first node is always a holder, which the reader has to derive.
|
||||
- Locality, Shape: `src/markdown/portable/inline-reduction.ts:218` `edgeDepth`, with `src/markdown/emit/inline-line.ts:282` `runsSharedWithNext`. The base's local `sharedRuns` is gone, a real gain because the grouping now lives in one place. The replacement is a second recursive walk in the emitter, `countSharedRuns`, which returns silently past `largestNesting` where `emitRun` refuses; its result is a count of runs, yet `edgeDepth` uses it as an index into the leaf's marks, and nothing says why the two agree on a spanned line.
|
||||
- Shape: `src/markdown/emit/inline-line.ts:40` `InlineContext`. `spans` and `spansLines` sit on adjacent lines and mean unrelated things: a run across nodes, and a hard break across lines. `spans` also means code spans at `emitMarkedRun` and at `inline-reduction.ts:248`, while `runSpans` and `codeSpans` read as siblings, and the new boolean is passed bare at its call sites.
|
||||
- Shape: `src/markdown/emit/inline-line.ts:247` `inlineRuns`. The base grew the previous run in place in one loop. The new version uses a `next` skip cursor, a helper that overshoots, and `inside.slice(0, holders)` to take back trailing spanned nodes; the rule is sound and a comment explains it, but it takes longer to verify. `RunGrouping` is satisfied structurally by passing the whole `InlineContext`.
|
||||
- Self-sufficiency: `spec/flavour.md:568` section Marks, read against `src/markdown/emit/inline-line.ts:115` `linePass` and `writesSpanned`. The spec says that where the spanned line does not read back "the run breaks there", while the code parts every run on the line. The code's test is "no fallback, and no directive in a flavour without directives", not a read-back to the same nodes, so a reader holding the spec is misled about which one applies.
|
||||
- Self-sufficiency: `src/markdown/mark-spellings.ts:49` `insideRun`. The base comment gave the footgun: the reducer must ask this grouping or it trims by runs the writers do not spell. The new comment is a bare spec pointer, and no comment on `runsSharedWithNext` carries that warning forward, so the reason the reducer imports the emitter's walk is unstated in the code.
|
||||
|
||||
Reference in New Issue
Block a user