Skip to content

Per-file budget share: one generated data file takes 88% of a 15-file range #238

Description

@nikolay-e

Split out of the still-true half of the external report at
git.nikolay-eremeev.com/nikolay-e/diffctx issue 3. That issue's headline —
"34 of 36 changed files silently missing" — no longer reproduces: every
changed file is represented at the default budget, and when a tight budget does
drop files the output now names them under
**Changed files not represented in the output (budget/selection):**. What it
asked for and did not get is a bound on how much of one run a single file may
take.

Measured on 1.15.0+HEAD (2026-08-26)

Synthetic analogue of the reporter's shape: one generated data/records.json
(+16502 lines) plus 12 new TS modules, a test and a shell script — 15 changed
files, default (auto) budget.

metric value
changed files represented 15 of 15
sections emitted 870
sections from data/records.json 847 (97%)
output characters from that one file 88%
total 31,329 tokens

Under --budget 8000 the same range represents 9 of 15 files, and under
--budget 4000 it represents 6 of 15 — with the data file holding a share in
both, while whole source modules get none.

The ask that survives

A per-file ceiling (or a round-robin first pass) so every changed file receives
representation before any file receives a second share. A reviewer reading this
output learns 847 records of a generated blob and nothing about six of the
twelve modules the same commit introduced — the opposite of
comprehension-per-token, which is the project's stated lens.

Q-class: this changes selection output, so it is frozen until the next
evaluation cycle boundary and needs a corpus rerun plus a baseline decision, not
a hot fix.

Close condition

A range of this shape emits at least one fragment for every changed file before
any file's second fragment, at both the auto budget and --budget 4000, with
the corpus gate green (or its baseline delta explained and accepted).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv3

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions