Repository navigation
v1.91.326.0 feat(ship): reviewers read one packet; the parent reads a compact findings record (GSTA-167) - #3621
Conversation
|
😎 This pull request was merged. |
…t findings record (GSTA-167) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…; a test holds the packet boundary equal to it Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
53bede3 to
1a558de
Compare
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…s, read= ranges, data summaries, no stale partial manifest - --base origin/main no longer renders origin/origin/main (resolveBaseRef shared by build and audits) - PACKET lines carry budget_role and read= ranges under 30,000 bytes; build prints BUDGET_NEXT for gstack-ship-budget --next - each packet ends with END OF PACKET; the brief reads it with the read tool in parallel ranges, about 3 calls - .json/.jsonl/.ndjson/.csv/.tsv additions past 400 changed lines reach reviewers as a DATA SUMMARY - a partial build keeps other reviewers only at the same head, base and diff content - collect: a matrix counts only from a state-machines reviewer; a CRITICAL line failing validation is invalid Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…, a stale Red Team build refuses, any-case CRITICAL lines - topLevelKeys takes keys and columns from the diff's own lines, never the working tree, which a symlink can point at a private file (outside voice CRITICAL) - a --findings build whose head, diff base or content differs from the manifest refuses with STALE_MANIFEST instead of dropping the specialists' coverage (adversarial + Red Team) - collect: a CRITICAL line in any case, or one that fails to parse, makes its reviewer invalid (Red Team) - docs and the misplaced Value header in the review-packet tests Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…es BUDGET_NEXT as the --next value Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
E2E Evals: ✅ PASS30 executed, 0 reused rule/judge records | 0 manual accepted (unscored; no score-cache credit) | $12.31 rule/judge cost | reconcile exit: 0 Profile: pr / mode Rule and judge shards
Fail-closed reconciliationSliced lane: planner → duration-packed executors → fail-closed report. Behavior cases run a pre-registered 3-trial panel (PASS at 2/3 with no contract violation); a PASS 2/3 is shown with its failed trial, never as a clean pass. Reused results retain their original provenance and expiry. Dispatched narrow screen (gstack-ship-queue ready --screen) of merge commit |
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…s round 3) (#3638) * revert(review): restore pre-#3621 reviewer briefs (GSTA-167 no-loss round 3) Reverts the reviewer-packet parts of 5358a3b (#3621, v1.91.326.0) and ce3a093 (#3636, v1.91.330.0). No-loss round 3 (handoffs/GSTA-167/noloss3-results.md) found the packet reviewers caught 10 of the 19 blockers the dcd62c3 reviewers find. Every non-stamp file is back to dcd62c3's bytes; the later main commits 959c8a6, 9184ffd and de53aef touch none of these files and are kept. Stamp files (VERSION, package.json, agents-digest) stay at main; CHANGELOG gains an [Unreleased] entry. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test: keep the reverted reviewer-packet files gone and unreferenced (GSTA-167) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(changelog): name the reviewer-packet guard test Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pre-landing review fixes Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * chore: stamp 1.91.331.0 Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Part of GSTA-167 / GST-134 (P-1: cut /ship token cost). Pairs with #3620 (budget thresholds and handoff).
Summary
gstack-review-packet buildruns the plangstack-review-planprints (lifted intolib/review-plan-live.ts) and writes one file perDISPATCH:line: the role's instructions and findings contract, its checklists, that reviewer's diff (literal base sha, its exclusions,-U8), a plan excerpt, a read budget and the output path. Steps 7 and 8 audits, the specialists, the Red Team, the fix-check and Step 11's adversarial pass and outside voice all dispatch this way. Packets over 200 KB split by path with no hunk cut and no path dropped; audits are never split.PACKET:line carriesread=line ranges of at most 30,000 bytes andbudget_role=; the packet ends withEND OF PACKET <name>. Capy's read tool returned about 37,800 characters of a 2,016-line file with no truncation notice (probe: 480 of 2,016 lines), so the brief reads the packet as parallel range reads in turn 1, at most 2 more ranges in turn 2, then one write: about three calls.BUDGET_NEXT: dispatch:<roles>, one budget role per packet (audits asspecialist, shards as their reviewer), and the prose passes that value togstack-ship-budget check --next, never packet names..json,.jsonl,.ndjson,.csvand.tsvchanges over 400 changed lines (not package or config manifests) reach reviewers as a summary built from the diff alone: changed-line count, top-level keys, first and last 40 changed lines. The testing reviewer and the coverage audit read data undertest/orfixtures/in full. A feat: add /cfo skill — session cost + AI spend dashboard #34-shaped diff (three ~70 KB wiki JSON files) now gives every role one packet instead of two.gstack-review-packet collectparses, validates and dedupes, prints at most 60 lines (one per reviewer plus each CRITICAL), and writesmerged.jsonlandinformational.md. Missing or unusable output exits 3 withREVIEW_COVERAGE_INCOMPLETE. A matrix record counts only from the state-machines reviewer; a CRITICAL line that fails to parse or validate, in any case, makes its reviewer invalid.--findings) against a changed tree refuses withSTALE_MANIFEST.lib/review-prompts.tsholds every reviewer prompt and the resolvers import it; /review's generated output is unchanged.capy/skill/gstack/SKILL.md: one program builds packets, creates at most 10 subagents per call within free slots, polls withtranscript: "none"and returns only collect's output.--base origin/mainno longer rendersorigin/origin/mainin audit prompts.Selection, depth rules, the blocking floor, gate-class adversarial and fix-check are unchanged.
Documentation
Status: updated — one factual line added to docs/ship-budget.md; no blockers.
Scope. Candidate
gsta167-docs-1793308916(edit mode): branchgsta-167-review-packets, base53db038c, head1d460c6e; 31 committed files plus the unstaged CHANGELOG.md entry; nothing staged or untracked. The branch addsbin/gstack-review-packet(build/collect),lib/review-packet.ts,lib/review-packet-collect.ts,lib/review-prompts.ts,lib/review-plan-live.ts, theREVIEW_COVERAGE_INCOMPLETEresult code, and rewrites /ship's reviewer dispatch (ship section templates, resolvers, the Capy skill paragraph). Banned-terms check: none (the repo keeps no list).Documentation health:
--nextcomes fromgstack-review-packet build'sBUDGET_NEXT:line, one role per packet; audits reserve asspecialist, shards as their reviewer's role; links to review-policy.md#reviewer-packets)budgetRoleand collect's exit 3)review-coverage-incompleteanchor matcheslib/result-codes-budget.tsandbin/gstack-doctor-components.sh)gstack-review-planstill names each dispatch's effort; packets carry it aseffort=)gstack-review-planis absent too), so the new binary needs no line thereCoverage:
gstack-review-packet build/collect: reference (review-policy.md, ship-budget.md, the binary's --help), explanation (review-policy.md), how-to (troubleshooting.md for the exit-3 path; capy/skill/gstack/SKILL.md for Capy dispatch). No tutorial is expected for an internal /ship helper.REVIEW_COVERAGE_INCOMPLETE: reference and fix in troubleshooting.md.lib/review-prompts.ts(one source for reviewer prompts): reference in review-policy.md only, which is enough for an internal module.Debt. None critical. Diagram drift: none (no diagram names the review machinery). One note for the parent, not a docs gap: review-policy.md's "Gate paths for the machinery itself" list matches
lib/review-depth.ts, and neither includes the new packet files, so an edit to them classifies as code, not gate.Dogfood on this PR's own /ship
The second pass read the fix range and the first the whole diff, so the per-reviewer drop is not like for like. Step 8 did not run (no plan binding).
Why
A Capy call costs the ~100k host floor plus context, so a reviewer costs calls times context. GSTA-152 measured ~2.7M per pass-1 specialist that explores the repo, against 0.23-0.51M with a lean brief.
Blast radius
ship/ and review/ prose (generated),
scripts/resolvers/{review-army,fix-check,outside-voice-steps,defensive-review}.ts, newlib/review-{packet,packet-collect,plan-live,prompts}.tsandbin/gstack-review-packet,docs/review-policy.md,docs/ship-budget.md,capy/skill/gstack/SKILL.md. Three tests that pinned the old /ship dispatch prose now check where the contract lives (packet or lib).Tests
test/review-packet.test.ts(41). Each fix above has a test that failed before it (the replay batch failed 19 tests at f0f938d; the pass-2 fixes failed at dd5bf54). Local focused runs: review-packet 41, defensive-review-framing 5, parity-suite 2, ship-workflow-clarity 38, review-plan-cli 21, module-size-ratchet 6, skill-validation 340; typecheck clean. Remote pregate at 1eda7b9: 23,842 tests, 0 failed, $0.08.Gate edits: tests this PR wrote were adjusted with their fixes: the audit-prompt test expects
git diff mainfor a fixture with no origin remote; the matrixtest.eachrow declares the state-machines checklist;defensive-review-framingnamesADVERSARIAL_NATIVEwhere the native prompt no longer sits "below"; the partial-build test now expects a Red Team refusal. No pre-existing test was weakened.Review-record notes
Sibling trial merges
#3620 (ede6c52): merges cleanly; generated docs stay fresh; review-packet, parity, ship-budget* and ship-workflow-clarity pass. #3596 is in the base (53db038).
Follow-ups (not in this PR)
lib/review-depth.tsgate paths do not list the packet files, so edits to them classify as code, not gate (docs audit note).gstack-review-plan --base mainprintsDEPTH_ERROR: scope_error … no_baseand drops security and performance;--base origin/mainworks. Pre-existing on main.Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
lib/review-packet-collect.ts:68parseOutside has two untested branches that change the gate: an outside voice that classifies as findings but uses no[Severity] path:line — ...lines gets a synthetic CRITICAL (P0/P1) or INFORMATIONAL finding pointing at the out file, and a NO_FINDINGS reply reads clean. The only outside-voice collect tests cover line-format findings and a refusal, so a regression that drops the fallback would let unformatted P0 output be collected as clean.bin/gstack-review-packet:96The Red Team packet's inputs are built in the bin without tests: the specialist count N comes from the previous manifest's specialist reviewers (sharded reviewers deduplicated byreviewer), and merged.jsonl lines that fail JSON.parse or carry a non-arraysourcesare dropped silently, so the Red Team is told fewer findings exist. The existing Red Team test checks only that one well-formed finding appears.test/review-packet.test.tsThe /ship Red Team flow (Step 9.1 build+collect, thenbuild --only red-team --findingsinto the same $_PK, then collect again needing pending=0) is never exercised end to end. The Red Team test only checks the manifest still liststesting; it never writes specialist outputs before the partial red-team build, so a regression where the partial build clears other reviewers' .out files or leaves the deferred entry pending (Step 9.4's pending=0 gate never clears) would pass every test.test/review-packet.test.tsship/sections/test-coverage.md now hands the Step 7 audit its parent inputs (framework/bootstrap decision, permitted paths, passes) only through--context .gstack/tmp/audit-context.txt, which lib/review-packet.ts renders as a## Parent contextblock. No test passes --context, so dropping or mis-reading that block would silently strip the audit's permissions and caps with every test green; the prose-flag test checks only that the flag name is documented.scripts/resolvers/outside-voice-steps.ts:132The isShip branch tells the reader that the adversarial packet carries 'the defensive framing, the prompt below, the diff ...', but in ship mode no prompt follows: the ternary renders DEFENSIVE_REVIEW_FRAMING and ADVERSARIAL_NATIVE only in the non-ship branch, so the generated ship/sections/adversarial.md refers to a prompt that is not there.bin/gstack-review-packet:89--generation and --passes-used are applied by string-replacing the literal placeholders '<allowed|audit-only>' and 'passes used: ' in the prompt fence read from ship/sections/.md. If the template wording changes, the replace silently does nothing and the audit packet keeps the placeholder, with no error or test pinning the coupling.lib/review-packet-collect.ts:146collect reserves a magic 'tail = 6' lines only for CRITICAL rows. REVIEWER:, pending and AUDIT: lines are unbounded once more than 25 results are non-clean (the shown filter only drops clean ones), so the final lines.slice(0, COLLECT_MAX_LINES) can cut off the COLLECT: summary and the REVIEW_COVERAGE_INCOMPLETE result line. The exit code still reports it, but the printed record loses the line that names the missing packets.scripts/resolvers/review-army.ts:101diffBase()'s ship branch ('DIFF_BASE=') is now dead: its only callers (line 136 in generateSpecialistDispatch and line 350 in generateRedTeam) run only for /review, since /ship returns generatePacketDispatch early and the ship Red Team branch builds a packet. The docstring above it still describes /ship writing the sha into each dispatched prompt, which packets now do via --range.ship/sections/adversarial.md:101The new packet paragraph says the adversarial packet carries 'the prompt below', but this diff deleted the native subagent prompt that used to follow; the next prompt below is the Codex outside-voice prompt, so a reader is pointed at the wrong text. The native prompt now lives only in lib/review-prompts.ts (ADVERSARIAL_NATIVE).lib/review-prompts.ts:15FIXTURE_PATHSPECS uses bare 'test' (git's default fnmatch without FNM_PATHNAME), so reviewerDiff strips every path containing the substring 'test' from the security, Red Team and adversarial packets, not just tests: e.g. attestation/latest/contest-named source, and in this very diff ship/sections/test-coverage.md(.tmpl) prose landed in the summary-only stat. Before, those reviewers could run git themselves; the packet's read budget now forbids git commands and caps reads at 5 x 200 lines, so security-relevant source with 'test' in its path gets no full adversarial read and nothing flags the gap.lib/review-packet.ts:222draftFor calls reviewerDiff once per DISPATCH line, so a standard/full plan with ~8-10 reviewers reruns the whole-branchgit diff -U8,git diff --stat,git ls-files --others, and onegit diff --no-indexsubprocess per untracked file (line 85) for every reviewer, although most reviewers share the same (exclude, summary) inputs. On a large branch with many untracked files, build time and process spawns scale as reviewers × (3 + untracked) instead of once.lib/review-packet.ts:183When a reviewer shards, writePackets re-runs shardChunks over every chunk on each step of a loop that grows the budget by 5% until it reaches the cap (it can take dozens of iterations). shardChunks recomputes Buffer.byteLength(cur) on every add (line 105) for a buffer of up to ~200 KB, so each call costs O(chunks × shard bytes). A diff with thousands of small files therefore rescans hundreds of MB per iteration, and builds on exactly the large diffs that need sharding become slow.lib/review-packet.ts:163PacketDraft.tail is always [] (draftFor line 221 and auditDraft line 241 both set tail: []) and render spreads it at line 168; no producer ever fills itscripts/resolvers/review-army.ts:101diffBase() keeps a /ship branch ('DIFF_BASE=') and a /ship docstring that nothing reaches now: its only callers are the /review specialist prompt (after the new ship early return at line 106) and the non-ship Red Team branch (line 350)lib/review-packet.ts:253A partial build keeps earlier reviewers' entries and their old .out files, so the fixed fix-check directory can feed stale results into collect. Every fix-check builds into the same.gstack/tmp/review-packets-fcwith--only fix-check,outside-voice, which sets partial=true. Line 253 keeps every prior entry that this build did not rebuild, and writePackets only clears the out files of packets it rewrites. Suppose a later pass's plan does not list outside-voice, but an earlier fix-check did. Collect then reads the earlier fix-check's outside-voice output as current coverage while the manifest header shows the new head and diff_base. A stale CRITICAL sends the pass to decision 2, and a stale missing or invalid result makes REVIEW_COVERAGE_INCOMPLETE that no dispatch in this pass can clear.lib/review-packet.ts:252Both audits build into one directory without --only, and that wipes the other audit's files. Step 7 (test-coverage.md.tmpl:17) and Step 8 (plan-completion.md) both use--out-dir .gstack/tmp/review-packets-audit. Because neither build passes --only, line 252 deletes every prior entry's .out and packet file and rewrites the manifest with only the new audit. So the plan-completion build deletes the test-coverage audit's result file. If Step 7's child is still writing, or a later step or a Steps 6-8 repeat rereads thatout=path, the audit reads as missing.bin/gstack-review-packet:94Relative input paths resolve against two different directories. --out-dir (line 71) and --plan-file are resolved before livePlan, which calls process.chdir(root). --findings (94), --fix-list, --tests, --callers (111) and --context (84) are read after the chdir, so they resolve against the repository root. Run from a subdirectory,build --only red-team --findings "$_PK/merged.jsonl"reads a different path than the $_PK that build wrote and collect resolves (collect has no chdir). The red-team build then fails as unreadable, or picks up another tree's merged.jsonl.ship/sections/plan-completion.md:58Step 7 (test-coverage, ship/sections/test-coverage.md:19) and Step 8 (plan-completion) both build into .gstack/tmp/review-packets-audit without --only, so the second build runs non-partial writeManifest, which rm's the first audit's out file and its packet file and replaces the manifest. If the two audits are dispatched together, or if the Step 7 out is reread after Step 8 builds, the first reader loses its packet or result and falls to the audit-failure path.lib/review-packet-collect.ts:148complete counts only missing or invalid results, so a pending (deferred, never built) red-team still exits 0. Only prose ('Step 9.4 needs a collect with pending=0') blocks it, so a parent that gates on the exit code, as REVIEW_COVERAGE_INCOMPLETE suggests, skips the Red Team silently.bin/gstack-review-packet:119The red-team follow-up build is told to reuse 'the Step 9.1 build's flags', which are fixed before any specialist CRITICAL exists, so --critical-found is absent. If planReview lists red-team on code class only under --critical-found, the rebuilt plan has no red-team dispatch and the --only red-team build writes zero packets but still exits 0 with PACKETS: n=0. The Red Team never runs and nothing flags it. Unverified: it depends on review-depth.ts, which is outside this diff.lib/review-packet-collect.ts:79mergeFindings merges by identity even when both findings come from the same reviewer, and identity falls back to path:category when line is missing or is a string. Distinct findings in one file (common for adversarial findings without a line) collapse into one, and only the higher-confidence summary and fix survive. A reviewer that copies the contract's literal fingerprint 'path:line:category' collapses all of its findings. The dropped defect never reaches merged.jsonl or Fix-First.lib/review-packet-collect.ts:51A JSON line with severity CRITICAL that fails validFinding (a specialist or red-team finding without a numeric confidence, category or specialist) is counted as invalid_lines and dropped. If any other line is valid the reviewer reads status=findings, collect exits 0, and the blocking finding disappears.lib/review-prompts.ts:15In git's default pathspec matching, 'test' matches any path containing 'test', including latest-, attest/attestation and ship/sections/test-coverage.md(.tmpl). The security specialist, Red Team and adversarial packets therefore see those product and gate files only as a stat, and the packet read budget forbids git commands, so the reviewer cannot recover them. This review got test-coverage.md's gate prose changes as a stat only.lib/review-packet.ts:180When a packet's fixed part (inlined checklists, 8 KB plan, and a full --stat repeated in every shard) reaches the 200 KB cap, budget clamps to 1. Every hunk then becomes its own oversize shard, so a wide diff (thousands of files) can produce thousands of reviewer packets and subagents, each still over the cap.lib/review-packet.tsreadRanges lets a single line longer than READ_CHUNK_BYTES become its own range over the read budget. That is the exact silent-truncation case read= exists to prevent: a minified one-line JSON or a long generated line under DATA_SUMMARY_LINES (400 changed lines) rides the diff whole. The read= test only builds shortexport constlines, so this branch is neither tested nor surfaced to the reviewer.lib/review-packet.ts:86The JSDoc for reviewerDiff ("The reviewer's DIFF_CMD at -U8 ... split per file; fixtures go to a stat in summary mode") was left in place when DATA_FILE, MANIFEST_FILE, topLevelKeys and dataSummary were inserted below it, so it now attaches toconst DATA_FILE, and reviewerDiff (which gained a keepData parameter and data summaries) has no doc comment. Editors and hover docs show the wrong text on both symbols.lib/review-packet.ts:305writeManifest now reads the manifest intooldat the top, but the cleanup loop calls readManifest(dir) a second time and names its loop variableold, which shadows the outeroldmanifest. The loop'soldis a PacketEntry while the outer one is a Manifest, so a later edit inside the loop that means the manifest silently gets the entry.lib/review-packet.ts:125reviewerDiff now replaces any .json/.jsonl/.ndjson/.csv/.tsv chunk with more than 400 changed lines by a DATA SUMMARY (top-level keys plus the first and last 40 changed lines) for every role, the security specialist, Red Team and adversarial pass included. MANIFEST_FILE exempts only package/tsconfig/*.config.json, so JSON that carries executable or permission configuration (.claude/settings.json hooks and permissions, .mcp.json server commands, a hooks.json, a policy/allowlist file) is hidden from the security reviewers once a change to it is large enough. That opens a review blind spot: an inserted command or a widened permission in the middle of a big change never reaches a reviewer, who can only ask the parent for a line range they have no reason to ask for.lib/review-packet.ts:92topLevelKeys reads the whole data file and, for .jsonl/.ndjson/.csv/.tsv, splits the entire text just to use its first line; dataSummary calls it once per reviewer packet (draftFor/auditDraft each run reviewerDiff), so a large summarized data file is read and, for .json, fully JSON.parse'd once per reviewer in a build. Bounded and only on the >400-changed-line path, so not blocking.lib/review-prompts.ts:87The new packetBrief requires the file-reading tool and forbids cat for every host, and review-army.ts and outside-voice-steps.ts render it into the Claude Code Agent-tool brief as well. Claude Code's Read tool truncates any line longer than 2000 characters, so a packet line past that length (a long prose line in a SKILL.md or docs diff, or a minified or generated line) reaches a Claude Code reviewer cut short, and the brief now rules out the only other way to read it. readRanges limits bytes per range, not characters per line.lib/review-packet.ts:87DATA SUMMARY hides everything but the first and last 40 changed lines of any .json/.jsonl/.csv past 400 changed lines from the security specialist, Red Team and adversarial pass. MANIFEST_FILE spares package-lock.json and config manifests but not lockfile-like or policy JSON such as npm-shrinkwrap.json, *.schema.json, .claude/settings.json hooks, or allowlist/quarantine JSON outside test/, so a swapped resolved URL or an added allowlist entry in the middle of a large change reaches no reviewer.lib/review-packet.ts:227Step 7/8 audit packets are no longer sharded or capped, so a large branch's audit packet grows without bound; read= ranges split the reads, but the audit model still has to hold the whole diff in context. Past the reviewer's window (about 800 KB of diff) the audit cannot complete, where before it was split at 200 KB.lib/review-packet.ts:217A single diff line longer than the read tool's approximately 37,800-character limit still becomes one oversized read range: the overflow branch flushes preceding lines but never splits or rejects the long line. A minified JSON addition or long source-string literal therefore gets silently truncated despite consuming every advertised range, and collect can accept a clean review of incomplete input. Provide a bounded representation or fail closed when a line cannot fit.lib/review-packet-collect.ts:48Fix 3 fails closed on benign prose: the case-insensitive /\bCRITICAL\b/i on any unparseable line means a clean reviewer that writes 'NO FINDINGS' plus a stray line like 'Nothing critical here.' (or a valid finding plus such prose) now gets status=invalid and collect exits 3 with REVIEW_COVERAGE_INCOMPLETE. Before this fix the same output read clean with invalid_lines=1. It costs a re-dispatch and doesn't drop findings; restricting the unparseable-line match to an uppercase CRITICAL token, or to lines that look like a JSON object or a severity tag, would keep the Red Team case and drop the false trips.lib/review-packet.ts:93Fix 1 regresses the summary for data files modified in place. topLevelKeys now parses only the changed '+' lines, so a large existing .json edited mid-file gives a fragment and prints 'top-level keys: (not parsed)', where it used to list the real keys. For a .csv/.tsv whose header row is unchanged, 'columns:' prints the first changed data row as if it were the header and mislabels it. New and deleted files still summarize correctly, which is the only shape the tests cover. Labeling the line as 'first changed line' when the chunk is not a whole-file add or delete would avoid the misleading label.