Skip to content

Commit 1c26e45

Browse files
docs(plan): cross-reference bd-1d6io in qmd-per-line-provenance plan
Both investigations found source-tracking off-by-one bugs in pampa, but at different layers (parse-time scanner vs. serialize-time writer) — note the connection so neither gets fixed in ignorance of the other.
1 parent d8c3d34 commit 1c26e45

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

claude-notes/plans/2026-06-18-qmd-per-line-provenance.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,20 @@ TDD-first; pampa-only.
1919
> examples each, distinct Pandoc elements). Those fixtures become the regression
2020
> tests here.
2121
22+
> **Related investigation (different layer, same family of bug).** bd-1d6io
23+
> (`claude-notes/plans/2026-06-01-bd-1d6io-investigation.md`, worktree
24+
> `.worktrees/bd-1d6io-annotated-qmd-source-tracking`) found a source-tracking
25+
> off-by-one on the **parse/JSON-writer** side: the tree-sitter code-span and
26+
> attribute-key scanners absorb one byte of preceding whitespace into the token,
27+
> so `Inline::Code`/attr-key `source_info` ranges start one byte too early. That
28+
> is a token-boundary bug in the **scanner** (parse-time), not a linearity
29+
> assumption in the **qmd writer** (serialize-time) — a different bug, not a
30+
> duplicate — but it's evidence of the same broader pattern: pampa's
31+
> source-tracking machinery has more than one place where an implicit
32+
> boundary/linearity assumption silently breaks. Not folded into this plan's
33+
> scope (§SCOPE is qmd-writer methods only); noted here so the two don't get
34+
> fixed in ignorance of each other.
35+
2236
---
2337

2438
## 1. Motivation — two failures, one root cause

0 commit comments

Comments
 (0)