From 5278f68262c4c0f4a3b5a4f328894220fd808762 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 22 Oct 2026 19:15:15 +0200 Subject: [PATCH] =?UTF-8?q?Answer=20prose=20round=201:=200=20=F0=9F=94=B4,?= =?UTF-8?q?=204=20=F0=9F=9F=A1;=20fold=20item=20102=20into=20the=20decisio?= =?UTF-8?q?n's=20sentence=20and=20tighten=20the=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/decisions.md | 6 +++--- src/markdown/parse/markdown-to-adf.ts | 6 +++--- src/markdown/parse/portable-markdown-to-adf.test.ts | 2 +- src/markdown/portable/task-list.ts | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/decisions.md b/docs/decisions.md index d5e7257..cbbd8bb 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -713,10 +713,10 @@ also shipped after three rounds: a definitions-only paragraph leaves no block, s follows takes state carried across lines, and every design read worse on Locality while the overall held; the scores at 6182ba6 were Junior 5.5, Mid 5.5, Senior 6 and Architect 5.5, mean 5.63. Item 56, still open, is to give that state one owner. Items 85 and 86, 2026-10-11, shipped after three -rounds under a fall the seats laid on item 93's `splitPath` and `splitPlace`, which place a refused -block's path by replaying `splitTaskList` on stand-in nodes; both seats read the chunk's own image +rounds under a fall the seats laid on item 93's `splitPath` and `splitPlace`, which placed a refused +block's path by replaying `splitTaskList` on stand-in nodes until item 102, 2026-10-22, removed them; both seats read the chunk's own image builder as a gain. The scores at be23835 were Junior 6.5, Mid 6, Senior 6 and Architect 6, mean -6.13. Item 102, 2026-10-22, placed that path in the blocks the one split built. Item 106, 2026-10-13, shipped +6.13. Item 106, 2026-10-13, shipped after three rounds under a worse ruling, the maintainer's call: both paired seats read the overall as the same, but Locality fell to a mean of 5.13, laid on the spelling memo the chunk splits between the CommonMark ask, which fills it, and the walk, which drops each entry as it reads it. The overall diff --git a/src/markdown/parse/markdown-to-adf.ts b/src/markdown/parse/markdown-to-adf.ts index 4727fc9..0f09746 100644 --- a/src/markdown/parse/markdown-to-adf.ts +++ b/src/markdown/parse/markdown-to-adf.ts @@ -219,13 +219,13 @@ function bulletBlocks(items: readonly Block[][], reading: Reading, path: Convert const { nodes: blocks, refusal } = tasks.value if (refusal === undefined) return success(blocks) const place = pathTo(blocks, refusal.marker) - // Failures are values, so a marker the split ever copied out of sight leaves the error at its pre-split path rather than asserting; task-list.test.ts pins that the split keeps it. + // task-list.test.ts pins that the split keeps the marker; were it lost, the error keeps its pre-split path, since nothing here throws. if (place === undefined) return { error: refusal.error, ok: false } const [blockIndex, ...steps] = place return { error: { ...refusal.error, path: [...path.slice(0, -1), listIndex + blockIndex, ...steps.slice(0, -2), ...refusal.within] }, ok: false } } -// A block a task list refused. A placeholder holding `marker` as its one child stands where the block's node would, so the split that builds the list places the refusal too, and `within` is the error's path below that node. +// A block a task list refused. Its placeholder holds `marker` as its one child and stands where the block's node would, so the one split that builds the list places it; `within` is the error's path below that node. type Refusal = { error: ConvertError; marker: AdfNode; within: ConvertErrorPath } // Nodes read from task blocks and the first refusal among them; a list is read up to the task holding its refusal. @@ -252,7 +252,7 @@ function taskBlocks(items: readonly Block[][], reading: Reading, path: ConvertEr return success({ nodes: splitTaskList({ content: tasks, type: 'taskList' }), refusal }) } -// The nodes a block of a task reads to. A refused one is a placeholder, typed as the split tells paragraphs and task lists from other blocks, so a paragraph that failed to read stays a paragraph. +// A refused block reads to a placeholder. The split tells only paragraphs and task lists from other blocks, so a paragraph that failed to read stays a paragraph. function readTaskBlock(block: ReadBlock, reading: Reading, path: ConvertErrorPath, depth: number): TaskNodes { const nodePath = [...path, 'content', 0] const nested = block.kind === 'bulletList' ? taskBlocks(block.items, reading, nodePath, depth) : undefined diff --git a/src/markdown/parse/portable-markdown-to-adf.test.ts b/src/markdown/parse/portable-markdown-to-adf.test.ts index 48e12bf..944d3b2 100644 --- a/src/markdown/parse/portable-markdown-to-adf.test.ts +++ b/src/markdown/parse/portable-markdown-to-adf.test.ts @@ -205,7 +205,7 @@ test('names where a refused block stands after the task list splits', () => { assert.equal(refused('- [ ] a\n\n
x
\n\n tail y\n'), '/content/1') }) -test('holds task lists to the 500 levels the parser carries, refusing one level deeper where it stands', () => { +test('refuses a task list nested one level past the 500 the parser carries, at its deepest item', () => { const nested = (levels: number): string => Array.from({ length: levels }, (_, level) => `${' '.repeat(level)}- [ ] a\n`).join('') assert.ok(portableMarkdownToAdf(nested(largestNesting)).ok) const refused = portableMarkdownToAdf(nested(largestNesting + 1)) diff --git a/src/markdown/portable/task-list.ts b/src/markdown/portable/task-list.ts index aa2fab1..7610243 100644 --- a/src/markdown/portable/task-list.ts +++ b/src/markdown/portable/task-list.ts @@ -19,7 +19,7 @@ export function splitTaskList(list: AdfNode): AdfNode[] { return blocks } -// Where `target` stands among `blocks`: its block's index, then the steps down to it. Every node the split moves keeps its identity, but a lone paragraph, which becomes a taskItem holding its inline nodes. +// Where `target` stands among `blocks`: its block's index, then the steps down to it. The split rebuilds lists and items but never an inline node, so an inline marker stays findable. export function pathTo(blocks: readonly AdfNode[], target: AdfNode): [number, ...ConvertErrorPath] | undefined { const pending: Visit[] = blocks.map((node, step) => ({ node, parent: undefined, step })) for (let visit = pending.pop(); visit !== undefined; visit = pending.pop()) {