What
Lumen's read hook intercepts Rust, Python, TypeScript and TSX source at or above 300 lines. .yml is not covered, so YAML files are read whole through the built-in Read and land in the coverage backlog. This issue records the decision not to add .yml interception, so the reasoning stays searchable rather than being re-argued. It is closed as wontfix, not solved.
Evidence
- Backlog table,
docs/efficiency.md §3: .yml — 5 calls, 31,010 tokens read whole. Aggregated from read_events by the_recorded_ledger_agrees_with_itself in crates/lumen-mcp/tests/efficiency.rs.
- All five of those reads are of one file,
.github/workflows/release.yml, the largest at 640 lines. Other .yml files appear in the ledger, but every read of them is under the 300-line threshold, so none of them are in this row.
- Break-even,
docs/efficiency.md §4: 5,383 avoided tokens per read. Below that, the extra round an interception forces costs more than the outline saves. 31,010 is gross tokens read, not tokens an outline would avoid; the avoidable share per read sits under break-even, so even a perfect outline would not clearly pay for the round it costs.
- Correctness, separate from cost: a partial YAML read is not valid YAML. Anchors and aliases reference other parts of the document, and multi-document streams are separated by
---. A line outline therefore invites a confidently wrong answer, which is worse than no answer.
Neither half of this is comfortable. 31,010 tokens is a real bill — though it is one file read five times rather than a broad pattern — and the correctness objection is against the line-outline shape, not against YAML support as such. The payoff falls short of break-even by a margin fresh corpus data could close.
What would change this
How to re-measure
cargo test --release -p lumen-mcp --test efficiency -- --nocapture
find . -name '*.yml' -type f -not -path './target/*' -not -path '*/node_modules/*' -print0 \
| xargs -0 wc -l | sort -n
The first prints the Coverage: what leaked, versus what was out of scope block, whose per-extension backlog lists .yml with its call count and tokens read whole, plus the break-even section. It resolves the ledger through lumen_core::meter::db_path() and returns without printing that block if none is found; set LUMEN_DB=/path/to/lumen.db to target one. Figures reflect whichever ledger is present and will differ from those above. The second lists the repository's own .yml files by size, so you can see whether more than one of them is large.
What
Lumen's read hook intercepts Rust, Python, TypeScript and TSX source at or above 300 lines.
.ymlis not covered, so YAML files are read whole through the built-in Read and land in the coverage backlog. This issue records the decision not to add.ymlinterception, so the reasoning stays searchable rather than being re-argued. It is closed as wontfix, not solved.Evidence
docs/efficiency.md§3:.yml— 5 calls, 31,010 tokens read whole. Aggregated fromread_eventsbythe_recorded_ledger_agrees_with_itselfincrates/lumen-mcp/tests/efficiency.rs..github/workflows/release.yml, the largest at 640 lines. Other.ymlfiles appear in the ledger, but every read of them is under the 300-line threshold, so none of them are in this row.docs/efficiency.md§4: 5,383 avoided tokens per read. Below that, the extra round an interception forces costs more than the outline saves. 31,010 is gross tokens read, not tokens an outline would avoid; the avoidable share per read sits under break-even, so even a perfect outline would not clearly pay for the round it costs.---. A line outline therefore invites a confidently wrong answer, which is worse than no answer.Neither half of this is comfortable. 31,010 tokens is a real bill — though it is one file read five times rather than a broad pattern — and the correctness objection is against the line-outline shape, not against YAML support as such. The payoff falls short of break-even by a margin fresh corpus data could close.
What would change this
.ymlfiles — more than the single one here — being read repeatedly, so avoided tokens per read exceed the 5,383 break-even..ymlrises out of the tail of the backlog table — its token total reaches the range currently held by.mdand.scss..ymlpayoff clears it.How to re-measure
The first prints the
Coverage: what leaked, versus what was out of scopeblock, whose per-extension backlog lists.ymlwith its call count and tokens read whole, plus the break-even section. It resolves the ledger throughlumen_core::meter::db_path()and returns without printing that block if none is found; setLUMEN_DB=/path/to/lumen.dbto target one. Figures reflect whichever ledger is present and will differ from those above. The second lists the repository's own.ymlfiles by size, so you can see whether more than one of them is large.