Repository navigation
Measure which changed lines a Briefing shows in each hunk - #29
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
briefingCoverage(comparison, document)reports, for every hunk of a captured comparison, which changed lines a saved Briefing cites, which it shows only because an excerpt expanded, and which it never shows. Each hunk is explained, partly explained or not explained, and the result carries totals.Why
An agent writes every Briefing, and nothing tells the reader which parts of the diff its story never shows. A later trust layer needs that answer derived by the server, not reported by the agent. This branch builds the measure.
Decisions and trade-offs
expanded, kept apart fromcitedPlease check the shown-excerpt rule at
src/briefing-coverage.ts:18against whatpublic/briefing.jsrenders. A mismatch would count lines the reader never sees.No ADR was added or amended on this branch.
How to test
Nothing calls
briefingCoverageyet, so no hand can exercise it in the app. Readsrc/briefing-coverage.tsagainstexcerptRowsinsrc/briefing-diff.ts. Then reason about a 200-line replacement cited at its middle line: the rows behind the omitted-lines marker must come out unexplained. Nothing here needs a human eye.