Skip to content

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

fix(diff): renumber hunk headers after trimming context (#4319)

Jay Hemnani9355ec701917
diff --git a/crates/headroom-core/src/transforms/diff_compressor.rs b/crates/headroom-core/src/transforms/diff_compressor.rs
index dc20ddf09..33cfe5f3a 100644
--- a/crates/headroom-core/src/transforms/diff_compressor.rs
+++ b/crates/headroom-core/src/transforms/diff_compressor.rs
@@ -429,19 +429,22 @@ impl DiffCompressor {
}
}
- // Trim context inside each kept hunk.
- let mut compressed_hunks: Vec<DiffHunk> = Vec::with_capacity(selected.len());
+ // Trim context inside each kept hunk. Trimming can split a hunk
+ // in two, so the kept/removed counts stay per original hunk.
+ let selected_count = selected.len();
+ let mut compressed_hunks: Vec<DiffHunk> = Vec::with_capacity(selected_count);
for hunk in selected {
- let trimmed = reduce_context(&hunk, self.config.max_context_lines);
- if trimmed.lines.len() > largest_kept {
- largest_kept = trimmed.lines.len();
+ for trimmed in reduce_context(&hunk, self.config.max_context_lines) {
+ if trimmed.lines.len() > largest_kept {
+ largest_kept = trimmed.lines.len();
+ }
+ context_kept_total += trimmed.context_lines;
+ compressed_hunks.push(trimmed);
}
- context_kept_total += trimmed.context_lines;
- compressed_hunks.push(trimmed);
}
- hunks_kept_total += compressed_hunks.len();
- hunks_removed_total += original_hunk_count - compressed_hunks.len();
+ hunks_kept_total += selected_count;
+ hunks_removed_total += original_hunk_count - selected_count;
compressed_files.push(DiffFile {
hunks: compressed_hunks,
@@ -1042,7 +1045,14 @@ fn extract_line_number(header: &str) -> usize {
// ─── Context trimming ──────────────────────────────────────────────────────
-fn reduce_context(hunk: &DiffHunk, max_context: usize) -> DiffHunk {
+/// Trim each hunk's context to `max_context` lines around its changes.
+///
+/// Dropping context moves where a hunk starts and can leave a gap between
+/// two changes, so every contiguous run of kept lines becomes its own hunk
+/// with a header recomputed from the original line numbers (the same hunks
+/// `git diff -U<max_context>` prints). A hunk that loses no lines keeps its
+/// header byte-for-byte.
+fn reduce_context(hunk: &DiffHunk, max_context: usize) -> Vec<DiffHunk> {
let parents = hunk_parents(&hunk.header);
let change_kind = |l: &str| -> (bool, bool) {
if parents > 1 {
@@ -1052,6 +1062,34 @@ fn reduce_context(hunk: &DiffHunk, max_context: usize) -> DiffHunk {
}
};
+ // Lines past the extent the header declares (the empty string left by a
+ // trailing newline, a format-patch signature) are not part of the hunk:
+ // they never count as a change, ride along with the last run, and are
+ // not numbered.
+ let ranges = parse_hunk_ranges(&hunk.header, parents);
+ let body_len = ranges
+ .as_ref()
+ .map_or(hunk.lines.len(), |r| hunk_body_len(&hunk.lines, parents, r));
+
+ let signature = (body_len..hunk.lines.len()).find(|&i| hunk.lines[i] == "-- ");
+
+ // An edit before any signature means the header understates its hunk.
+ // That is malformed input, so the hunk passes through as it came.
+ let understated = hunk.lines[body_len..signature.unwrap_or(hunk.lines.len())]
+ .iter()
+ .any(|l| {
+ let (added, deleted) = change_kind(l);
+ added || deleted
+ });
+ if understated {
+ return vec![build_hunk(
+ hunk.header.clone(),
+ hunk.lines.clone(),
+ &change_kind,
+ hunk.score,
+ )];
+ }
+
// Indices of `+`/`-` lines.
let change_positions: Vec<usize> = hunk
.lines
@@ -1059,7 +1097,7 @@ fn reduce_context(hunk: &DiffHunk, max_context: usize) -> DiffHunk {
.enumerate()
.filter_map(|(i, l)| {
let (added, deleted) = change_kind(l);
- if added || deleted {
+ if i < body_len && (added || deleted) {
Some(i)
} else {
None
@@ -1067,53 +1105,115 @@ fn reduce_context(hunk: &DiffHunk, max_context: usize) -> DiffHunk {
})
.collect();
+ let mut keep = std::collections::BTreeSet::new();
if change_positions.is_empty() {
// No-changes hunk → keep up to `max_context` leading lines, like Python.
- let take = max_context.min(hunk.lines.len());
- let lines: Vec<String> = hunk.lines.iter().take(take).cloned().collect();
- return DiffHunk {
- header: hunk.header.clone(),
- lines,
- additions: 0,
- deletions: 0,
- context_lines: take,
- score: hunk.score,
- };
- }
+ keep.extend(0..max_context.min(hunk.lines.len()));
+ } else {
+ // Indices to keep: each change + `max_context` lines either side.
+ for &pos in &change_positions {
+ keep.insert(pos);
+ let lo = pos.saturating_sub(max_context);
+ for i in lo..pos {
+ keep.insert(i);
+ }
+ let hi = (pos + max_context + 1).min(hunk.lines.len());
+ for i in (pos + 1)..hi {
+ keep.insert(i);
+ }
+ }
- // Indices to keep: each change + `max_context` lines either side.
- let mut keep = std::collections::BTreeSet::new();
- for &pos in &change_positions {
- keep.insert(pos);
- let lo = pos.saturating_sub(max_context);
- for i in lo..pos {
- keep.insert(i);
+ // Bug-fix: ALWAYS keep `\ No newline at end of file` markers (and any
+ // other backslash-prefixed metadata) regardless of distance from a
+ // change. These are structural patch markers, not context — losing
+ // them breaks round-trippable patches and changes the semantic
+ // meaning of the trailing line in the file. Mirrors the same fix in
+ // the Python source.
+ for (i, line) in hunk.lines.iter().enumerate() {
+ if line.starts_with('\\') {
+ keep.insert(i);
+ }
}
- let hi = (pos + max_context + 1).min(hunk.lines.len());
- for i in (pos + 1)..hi {
- keep.insert(i);
+ }
+
+ // A format-patch signature and what follows it stay whatever the context
+ // radius, up to the blank lines at the very end.
+ let last = hunk.lines.iter().rposition(|l| !l.is_empty());
+ if let (Some(signature), Some(last)) = (signature, last) {
+ keep.extend(signature..=last);
+ }
+
+ let untouched = keep.range(..body_len).next().is_none() || keep.len() == hunk.lines.len();
+ let Some(ranges) = ranges.filter(|_| !untouched) else {
+ // Nothing trimmed, or a header we can't renumber: one hunk under
+ // the original header.
+ return vec![build_hunk(
+ hunk.header.clone(),
+ keep.iter().map(|&i| hunk.lines[i].clone()).collect(),
+ &change_kind,
+ hunk.score,
+ )];
+ };
+
+ // Split the kept lines into contiguous runs.
+ let mut runs: Vec<Vec<usize>> = Vec::new();
+ for &i in &keep {
+ match runs.last_mut() {
+ Some(run) if i >= body_len || run.last() == Some(&(i - 1)) => run.push(i),
+ _ => runs.push(vec![i]),
}
}
- // Bug-fix: ALWAYS keep `\ No newline at end of file` markers (and any
- // other backslash-prefixed metadata) regardless of distance from a
- // change. These are structural patch markers, not context — losing
- // them breaks round-trippable patches and changes the semantic
- // meaning of the trailing line in the file. Mirrors the same fix in
- // the Python source.
- for (i, line) in hunk.lines.iter().enumerate() {
- if line.starts_with('\\') {
- keep.insert(i);
+ let marker = "@".repeat(parents + 1);
+ let (mut old_next, mut new_next) = (ranges.old_next, ranges.new_next);
+ let mut out = Vec::with_capacity(runs.len());
+ let mut pos = 0usize;
+ for run in runs {
+ // Advance the line numbers over everything before this run.
+ while pos < run[0] {
+ advance(&hunk.lines[pos], parents, &mut old_next, &mut new_next);
+ pos += 1;
+ }
+ let (old_start, new_start) = (old_next.clone(), new_next);
+ for &i in run.iter().filter(|&&i| i < body_len) {
+ advance(&hunk.lines[i], parents, &mut old_next, &mut new_next);
+ }
+ pos = run[run.len() - 1] + 1;
+
+ let mut header = marker.clone();
+ for (start, next) in old_start.iter().zip(&old_next) {
+ header.push_str(&format_range('-', *start, next - start, parents > 1));
}
+ header.push_str(&format_range(
+ '+',
+ new_start,
+ new_next - new_start,
+ parents > 1,
+ ));
+ header.push(' ');
+ header.push_str(&marker);
+ header.push_str(&ranges.heading);
+
+ out.push(build_hunk(
+ header,
+ run.iter().map(|&i| hunk.lines[i].clone()).collect(),
+ &change_kind,
+ hunk.score,
+ ));
}
+ out
+}
- let mut new_lines: Vec<String> = Vec::with_capacity(keep.len());
+fn build_hunk(
+ header: String,
+ lines: Vec<String>,
+ change_kind: &dyn Fn(&str) -> (bool, bool),
+ score: f64,
+) -> DiffHunk {
let mut additions = 0usize;
let mut deletions = 0usize;
let mut context_lines = 0usize;
- for &i in &keep {
- let line = &hunk.lines[i];
- new_lines.push(line.clone());
+ for line in &lines {
let (added, deleted) = change_kind(line);
if deleted {
deletions += 1;
@@ -1123,14 +1223,130 @@ fn reduce_context(hunk: &DiffHunk, max_context: usize) -> DiffHunk {
context_lines += 1;
}
}
-
DiffHunk {
- header: hunk.header.clone(),
- lines: new_lines,
+ header,
+ lines,
additions,
deletions,
context_lines,
- score: hunk.score,
+ score,
+ }
+}
+
+/// Line numbers parsed from a hunk header: where each old side (one per
+/// parent) and the new side start, how many lines each spans, and the
+/// trailing section heading (` def foo():`).
+struct HunkRanges {
+ old_next: Vec<usize>,
+ old_len: Vec<usize>,
+ new_next: usize,
+ new_len: usize,
+ heading: String,
+}
+
+/// `None` if the header doesn't have the `@@ -a,b +c,d @@` shape (with one
+/// `-` range per parent).
+fn parse_hunk_ranges(header: &str, parents: usize) -> Option<HunkRanges> {
+ let marker = "@".repeat(parents + 1);
+ let rest = header.strip_prefix(&marker)?;
+ let end = rest.find(&format!(" {marker}"))?;
+ let heading = rest[end + 1 + marker.len()..].to_string();
+ let ranges: Vec<&str> = rest[..end].split_whitespace().collect();
+ if ranges.len() != parents + 1 {
+ return None;
+ }
+ // Returns (next line number, line count). A zero-length range names the
+ // line *before* the hunk, except in a combined header, where it names the
+ // next one.
+ let parse = |range: &str, sign: char| -> Option<(usize, usize)> {
+ let body = range.strip_prefix(sign)?;
+ let (start, count) = match body.split_once(',') {
+ Some((s, c)) => (s.parse::<usize>().ok()?, c.parse::<usize>().ok()?),
+ None => (body.parse::<usize>().ok()?, 1),
+ };
+ Some((
+ if count == 0 && parents == 1 {
+ start.checked_add(1)?
+ } else {
+ start
+ },
+ count,
+ ))
+ };
+ let old = ranges[..parents]
+ .iter()
+ .map(|r| parse(r, '-'))
+ .collect::<Option<Vec<_>>>()?;
+ let (new_next, new_len) = parse(ranges[parents], '+')?;
+ Some(HunkRanges {
+ old_next: old.iter().map(|&(n, _)| n).collect(),
+ old_len: old.iter().map(|&(_, c)| c).collect(),
+ new_next,
+ new_len,
+ heading,
+ })
+}
+
+/// Number of leading lines that make up the hunk its header describes.
+fn hunk_body_len(lines: &[String], parents: usize, ranges: &HunkRanges) -> usize {
+ let (mut old, mut new) = (ranges.old_next.clone(), ranges.new_next);
+ let done = |old: &[usize], new: usize| {
+ new - ranges.new_next >= ranges.new_len
+ && old
+ .iter()
+ .zip(&ranges.old_next)
+ .zip(&ranges.old_len)
+ .all(|((o, start), len)| o - start >= *len)
+ };
+ let mut n = 0;
+ while n < lines.len() && !done(&old, new) {
+ advance(&lines[n], parents, &mut old, &mut new);
+ n += 1;
+ }
+ n
+}
+
+/// Step the per-side line numbers over one hunk line.
+fn advance(line: &str, parents: usize, old_next: &mut [usize], new_next: &mut usize) {
+ if line.starts_with('\\') {
+ return;
+ }
+ let cols = line.as_bytes();
+ let col = |j: usize| cols.get(j).copied().unwrap_or(b' ');
+ let deleted = (0..parents).any(|j| col(j) == b'-');
+ // A deleted line exists only in the parents marked `-`; any other line
+ // is in the result and in every parent not marked `+`.
+ for (j, next) in old_next.iter_mut().enumerate() {
+ let in_parent = if deleted {
+ col(j) == b'-'
+ } else {
+ col(j) != b'+'
+ };
+ if in_parent {
+ *next = next.saturating_add(1);
+ }
+ }
+ if !deleted {
+ *new_next = new_next.saturating_add(1);
+ }
+}
+
+/// One side of a hunk header, as git writes it: ` -12,3`, ` -12` for a
+/// single line, and the line before the hunk for an empty range. Combined
+/// headers always carry the count and name the next line for an empty range.
+fn format_range(sign: char, next_line: usize, count: usize, combined: bool) -> String {
+ if combined {
+ return format!(" {sign}{next_line},{count}");
+ }
+ let start = if count == 0 {
+ next_line.saturating_sub(1)
+ } else {
+ next_line
+ };
+ if count == 1 {
+ format!(" {sign}{start}")
+ } else {
+ format!(" {sign}{start},{count}")
}
}
@@ -1834,6 +2050,237 @@ mod tests {
assert_eq!((r.additions, r.deletions), (3, 4));
}
+ /// Trimmed hunks get headers that match their lines. Expected ranges
+ /// are what `git diff -U2` / `-U0` print for the same change.
+ #[test]
+ fn trimmed_hunks_are_renumbered_like_git() {
+ let mut lines = vec![
+ "diff --git a/f b/f".to_string(),
+ "--- a/f".to_string(),
+ "+++ b/f".to_string(),
+ "@@ -7,14 +7,14 @@ l6".to_string(),
+ ];
+ for i in 7..=20 {
+ match i {
+ 10 | 17 => {
+ lines.push(format!("-l{i}"));
+ lines.push(format!("+l{i} x"));
+ }
+ _ => lines.push(format!(" l{i}")),
+ }
+ }
+ lines.push("@@ -23,6 +23,7 @@ l22".to_string());
+ for i in 23..=28 {
+ lines.push(format!(" l{i}"));
+ if i == 25 {
+ lines.push("+new after 25".to_string());
+ }
+ }
+ let input = lines.join("\n") + "\n";
+ let headers = |max_context_lines: usize| -> Vec<String> {
+ let cfg = DiffCompressorConfig {
+ min_lines_for_ccr: 5,
+ max_context_lines,
+ ..Default::default()
+ };
+ let r = DiffCompressor::new(cfg).compress(&input, "");
+ r.compressed
+ .lines()
+ .filter(|l| l.starts_with("@@"))
+ .map(str::to_string)
+ .collect()
+ };
+ assert_eq!(
+ headers(2),
+ [
+ "@@ -8,5 +8,5 @@ l6",
+ "@@ -15,5 +15,5 @@ l6",
+ "@@ -24,4 +24,5 @@ l22"
+ ]
+ );
+ assert_eq!(
+ headers(0),
+ [
+ "@@ -10 +10 @@ l6",
+ "@@ -17 +17 @@ l6",
+ "@@ -25,0 +26 @@ l22"
+ ]
+ );
+ // Nothing to trim: the header is left alone.
+ assert!(headers(3).contains(&"@@ -7,14 +7,14 @@ l6".to_string()));
+ }
+
+ /// Line numbers near `usize::MAX` must not overflow while renumbering.
+ #[test]
+ fn renumbering_huge_line_numbers_does_not_panic() {
+ let mut lines = vec![
+ "diff --git a/f b/f".to_string(),
+ "--- a/f".to_string(),
+ "+++ b/f".to_string(),
+ format!("@@ -{0},0 +{0},5 @@", usize::MAX),
+ ];
+ lines.extend((0..5).map(|i| format!("+added_{i}")));
+ lines.push(format!("@@ -{0},6 +{0},6 @@", usize::MAX - 2));
+ lines.extend((0..5).map(|i| format!(" ctx_{i}")));
+ lines.push("-old".to_string());
+ let cfg = DiffCompressorConfig {
+ min_lines_for_ccr: 5,
+ ..Default::default()
+ };
+ let r = DiffCompressor::new(cfg).compress(&lines.join("\n"), "");
+ assert!(r.compressed.contains("-old"));
+ }
+
+ /// Combined-diff hunks are renumbered per parent.
+ #[test]
+ fn trimmed_combined_hunk_is_renumbered_per_parent() {
+ let input = [
+ "diff --combined f",
+ "--- a/f",
+ "+++ b/f",
+ "@@@ -1,8 -1,8 +1,8 @@@",
+ " c1",
+ " c2",
+ " c3",
+ "- p1_old",
+ " -p2_old",
+ "++merged",
+ " c4",
+ " c5",
+ " c6",
+ " c7",
+ "",
+ ]
+ .join("\n");
+ let cfg = DiffCompressorConfig {
+ min_lines_for_ccr: 5,
+ ..Default::default()
+ };
+ let r = DiffCompressor::new(cfg).compress(&input, "");
+ assert!(
+ r.compressed
+ .contains("@@@ -2,5 -2,5 +2,5 @@@\n c2\n c3\n- p1_old\n"),
+ "{}",
+ r.compressed
+ );
+ }
+
+ /// An empty range in a combined header names the next line, not the one
+ /// before. Inputs and expected headers come from `git show --cc`, and
+ /// `-U0` for the second.
+ #[test]
+ fn empty_combined_ranges_match_git() {
+ let compress = |input: &[&str], max_context_lines| {
+ let cfg = DiffCompressorConfig {
+ min_lines_for_ccr: 5,
+ max_context_lines,
+ ..Default::default()
+ };
+ DiffCompressor::new(cfg)
+ .compress(&input.join("\n"), "")
+ .compressed
+ };
+
+ let empty_first_parent = [
+ "diff --cc f.txt",
+ "--- a/f.txt",
+ "+++ b/f.txt",
+ "@@@ -1,0 -1,4 +1,4 @@@",
+ "+ a",
+ "+ b",
+ "+ c",
+ " -d",
+ "++X",
+ "",
+ ];
+ let r = compress(&empty_first_parent, 0);
+ assert!(r.contains("@@@ -1,0 -1,4 +1,4 @@@\n+ a\n"), "{r}");
+
+ let empty_mid_file = [
+ "diff --cc g.txt",
+ "--- a/g.txt",
+ "+++ b/g.txt",
+ "@@@ -17,6 -17,8 +17,7 @@@ tw",
+ " 17",
+ " 18",
+ " 19",
+ " -two-a",
+ " -two-b",
+ "++x",
+ " 20",
+ " 21",
+ " 22",
+ "",
+ ];
+ let r = compress(&empty_mid_file, 0);
+ assert!(r.contains("@@@ -20,0 -20,2 +20,1 @@@ tw\n -two-a\n"), "{r}");
+ }
+
+ /// Edits past the extent the header declares are malformed input: the
+ /// hunk passes through as it came.
+ #[test]
+ fn edits_past_an_understated_header_are_kept() {
+ let compress = |hunk: &[&str]| {
+ let input = ["diff --git a/f b/f", "--- a/f", "+++ b/f"]
+ .iter()
+ .chain(hunk)
+ .copied()
+ .collect::<Vec<_>>()
+ .join("\n");
+ let cfg = DiffCompressorConfig {
+ min_lines_for_ccr: 5,
+ max_context_lines: 0,
+ ..Default::default()
+ };
+ DiffCompressor::new(cfg).compress(&input, "").compressed
+ };
+
+ let r = compress(&["@@ -1 +1 @@", "-a", "+b", "-c", "+d", ""]);
+ assert!(r.contains("@@ -1 +1 @@\n-a\n+b\n-c\n+d"), "{r}");
+
+ let r = compress(&["@@ -1,2 +1,2 @@", " x", "-a", "+b", "-c", "+d", ""]);
+ assert!(r.contains("@@ -1,2 +1,2 @@\n x\n-a\n+b\n-c\n+d"), "{r}");
+ }
+
+ /// What follows a hunk in `git format-patch` output stays whatever the
+ /// context radius, and doesn't count towards the hunk's line numbers.
+ #[test]
+ fn format_patch_envelope_survives_trimming() {
+ let input = [
+ "diff --git a/f b/f",
+ "--- a/f",
+ "+++ b/f",
+ "@@ -1,5 +1,5 @@",
+ "-a",
+ "+b",
+ " c1",
+ " c2",
+ " c3",
+ " c4",
+ "-- ",
+ "2.43.0",
+ "",
+ "From 0000000 Mon Sep 17 00:00:00 2001",
+ "---",
+ " g | 2 +-",
+ "",
+ ]
+ .join("\n");
+ let cfg = DiffCompressorConfig {
+ min_lines_for_ccr: 5,
+ max_context_lines: 2,
+ ..Default::default()
+ };
+ let r = DiffCompressor::new(cfg).compress(&input, "");
+ assert!(
+ r.compressed.contains(
+ "@@ -1,3 +1,3 @@\n-a\n+b\n c1\n c2\n-- \n2.43.0\n\nFrom 0000000 Mon Sep 17 00:00:00 2001\n---\n g | 2 +-"
+ ),
+ "{}",
+ r.compressed
+ );
+ }
+
/// Bug-fix test: pre-diff content (commit headers, email-style
/// metadata) is preserved verbatim before the diff sections. Before
/// the fix, anything before the first `diff --git` was silently
diff --git a/tests/parity/fixtures/diff_compressor/0cf5e189bd42fab1.json b/tests/parity/fixtures/diff_compressor/0cf5e189bd42fab1.json
index a570067ac..a42c5cc8a 100644
--- a/tests/parity/fixtures/diff_compressor/0cf5e189bd42fab1.json
+++ b/tests/parity/fixtures/diff_compressor/0cf5e189bd42fab1.json
@@ -13,7 +13,7 @@
"output": {
"additions": 40,
"cache_key": "4ced183e23d56ca575d6ff00",
- "compressed": "diff --git a/file_0.py b/file_0.py\n--- a/file_0.py\n+++ b/file_0.py\n@@ -1,10 +1,12 @@\n context_3_0\n context_4_0\n-removed_0_0\n-removed_1_0\n-removed_2_0\n+added_0_0\n+added_1_0\n+added_2_0\n+added_3_0\n+added_4_0\n tail_0_0\n tail_1_0\ndiff --git a/file_1.py b/file_1.py\n--- a/file_1.py\n+++ b/file_1.py\n@@ -1,10 +1,12 @@\n context_3_1\n context_4_1\n-removed_0_1\n-removed_1_1\n-removed_2_1\n+added_0_1\n+added_1_1\n+added_2_1\n+added_3_1\n+added_4_1\n tail_0_1\n tail_1_1\ndiff --git a/file_2.py b/file_2.py\n--- a/file_2.py\n+++ b/file_2.py\n@@ -1,10 +1,12 @@\n context_3_2\n context_4_2\n-removed_0_2\n-removed_1_2\n-removed_2_2\n+added_0_2\n+added_1_2\n+added_2_2\n+added_3_2\n+added_4_2\n tail_0_2\n tail_1_2\ndiff --git a/file_3.py b/file_3.py\n--- a/file_3.py\n+++ b/file_3.py\n@@ -1,10 +1,12 @@\n context_3_3\n context_4_3\n-removed_0_3\n-removed_1_3\n-removed_2_3\n+added_0_3\n+added_1_3\n+added_2_3\n+added_3_3\n+added_4_3\n tail_0_3\n tail_1_3\ndiff --git a/file_4.py b/file_4.py\n--- a/file_4.py\n+++ b/file_4.py\n@@ -1,10 +1,12 @@\n context_3_4\n context_4_4\n-removed_0_4\n-removed_1_4\n-removed_2_4\n+added_0_4\n+added_1_4\n+added_2_4\n+added_3_4\n+added_4_4\n tail_0_4\n tail_1_4\ndiff --git a/file_5.py b/file_5.py\n--- a/file_5.py\n+++ b/file_5.py\n@@ -1,10 +1,12 @@\n context_3_5\n context_4_5\n-removed_0_5\n-removed_1_5\n-removed_2_5\n+added_0_5\n+added_1_5\n+added_2_5\n+added_3_5\n+added_4_5\n tail_0_5\n tail_1_5\ndiff --git a/file_6.py b/file_6.py\n--- a/file_6.py\n+++ b/file_6.py\n@@ -1,10 +1,12 @@\n context_3_6\n context_4_6\n-removed_0_6\n-removed_1_6\n-removed_2_6\n+added_0_6\n+added_1_6\n+added_2_6\n+added_3_6\n+added_4_6\n tail_0_6\n tail_1_6\ndiff --git a/file_7.py b/file_7.py\n--- a/file_7.py\n+++ b/file_7.py\n@@ -1,10 +1,12 @@\n context_3_7\n context_4_7\n-removed_0_7\n-removed_1_7\n-removed_2_7\n+added_0_7\n+added_1_7\n+added_2_7\n+added_3_7\n+added_4_7\n tail_0_7\n tail_1_7\n[8 files changed, +40 -24 lines]\n[177 lines compressed to 129. Retrieve full diff: hash=4ced183e23d56ca575d6ff00]",
+ "compressed": "diff --git a/file_0.py b/file_0.py\n--- a/file_0.py\n+++ b/file_0.py\n@@ -4,7 +4,9 @@\n context_3_0\n context_4_0\n-removed_0_0\n-removed_1_0\n-removed_2_0\n+added_0_0\n+added_1_0\n+added_2_0\n+added_3_0\n+added_4_0\n tail_0_0\n tail_1_0\ndiff --git a/file_1.py b/file_1.py\n--- a/file_1.py\n+++ b/file_1.py\n@@ -4,7 +4,9 @@\n context_3_1\n context_4_1\n-removed_0_1\n-removed_1_1\n-removed_2_1\n+added_0_1\n+added_1_1\n+added_2_1\n+added_3_1\n+added_4_1\n tail_0_1\n tail_1_1\ndiff --git a/file_2.py b/file_2.py\n--- a/file_2.py\n+++ b/file_2.py\n@@ -4,7 +4,9 @@\n context_3_2\n context_4_2\n-removed_0_2\n-removed_1_2\n-removed_2_2\n+added_0_2\n+added_1_2\n+added_2_2\n+added_3_2\n+added_4_2\n tail_0_2\n tail_1_2\ndiff --git a/file_3.py b/file_3.py\n--- a/file_3.py\n+++ b/file_3.py\n@@ -4,7 +4,9 @@\n context_3_3\n context_4_3\n-removed_0_3\n-removed_1_3\n-removed_2_3\n+added_0_3\n+added_1_3\n+added_2_3\n+added_3_3\n+added_4_3\n tail_0_3\n tail_1_3\ndiff --git a/file_4.py b/file_4.py\n--- a/file_4.py\n+++ b/file_4.py\n@@ -4,7 +4,9 @@\n context_3_4\n context_4_4\n-removed_0_4\n-removed_1_4\n-removed_2_4\n+added_0_4\n+added_1_4\n+added_2_4\n+added_3_4\n+added_4_4\n tail_0_4\n tail_1_4\ndiff --git a/file_5.py b/file_5.py\n--- a/file_5.py\n+++ b/file_5.py\n@@ -4,7 +4,9 @@\n context_3_5\n context_4_5\n-removed_0_5\n-removed_1_5\n-removed_2_5\n+added_0_5\n+added_1_5\n+added_2_5\n+added_3_5\n+added_4_5\n tail_0_5\n tail_1_5\ndiff --git a/file_6.py b/file_6.py\n--- a/file_6.py\n+++ b/file_6.py\n@@ -4,7 +4,9 @@\n context_3_6\n context_4_6\n-removed_0_6\n-removed_1_6\n-removed_2_6\n+added_0_6\n+added_1_6\n+added_2_6\n+added_3_6\n+added_4_6\n tail_0_6\n tail_1_6\ndiff --git a/file_7.py b/file_7.py\n--- a/file_7.py\n+++ b/file_7.py\n@@ -4,7 +4,9 @@\n context_3_7\n context_4_7\n-removed_0_7\n-removed_1_7\n-removed_2_7\n+added_0_7\n+added_1_7\n+added_2_7\n+added_3_7\n+added_4_7\n tail_0_7\n tail_1_7\n[8 files changed, +40 -24 lines]\n[177 lines compressed to 129. Retrieve full diff: hash=4ced183e23d56ca575d6ff00]",
"compressed_line_count": 129,
"deletions": 24,
"files_affected": 8,
diff --git a/tests/parity/fixtures/diff_compressor/1a4e35c597c7a001.json b/tests/parity/fixtures/diff_compressor/1a4e35c597c7a001.json
index 6eaf416a9..d504c8c2d 100644
--- a/tests/parity/fixtures/diff_compressor/1a4e35c597c7a001.json
+++ b/tests/parity/fixtures/diff_compressor/1a4e35c597c7a001.json
@@ -13,7 +13,7 @@
"output": {
"additions": 40,
"cache_key": "11ee99638b134ba374157005",
- "compressed": "diff --git a/file_0.py b/file_0.py\n--- a/file_0.py\n+++ b/file_0.py\n@@ -1,10 +1,12 @@\n context_3_0\n context_4_0\n-removed_0_0\n-removed_1_0\n-removed_2_0\n+added_0_0\n+added_1_0\n+added_2_0\n+added_3_0\n+added_4_0\n tail_0_0\n tail_1_0\ndiff --git a/file_1.py b/file_1.py\n--- a/file_1.py\n+++ b/file_1.py\n@@ -1,10 +1,12 @@\n context_3_1\n context_4_1\n-removed_0_1\n-removed_1_1\n-removed_2_1\n+added_0_1\n+added_1_1\n+added_2_1\n+added_3_1\n+added_4_1\n tail_0_1\n tail_1_1\ndiff --git a/file_2.py b/file_2.py\n--- a/file_2.py\n+++ b/file_2.py\n@@ -1,10 +1,12 @@\n context_3_2\n context_4_2\n-removed_0_2\n-removed_1_2\n-removed_2_2\n+added_0_2\n+added_1_2\n+added_2_2\n+added_3_2\n+added_4_2\n tail_0_2\n tail_1_2\ndiff --git a/file_3.py b/file_3.py\n--- a/file_3.py\n+++ b/file_3.py\n@@ -1,10 +1,12 @@\n context_3_3\n context_4_3\n-removed_0_3\n-removed_1_3\n-removed_2_3\n+added_0_3\n+added_1_3\n+added_2_3\n+added_3_3\n+added_4_3\n tail_0_3\n tail_1_3\ndiff --git a/file_4.py b/file_4.py\n--- a/file_4.py\n+++ b/file_4.py\n@@ -1,10 +1,12 @@\n context_3_4\n context_4_4\n-removed_0_4\n-removed_1_4\n-removed_2_4\n+added_0_4\n+added_1_4\n+added_2_4\n+added_3_4\n+added_4_4\n tail_0_4\n tail_1_4\ndiff --git a/file_5.py b/file_5.py\n--- a/file_5.py\n+++ b/file_5.py\n@@ -1,10 +1,12 @@\n context_3_5\n context_4_5\n-removed_0_5\n-removed_1_5\n-removed_2_5\n+added_0_5\n+added_1_5\n+added_2_5\n+added_3_5\n+added_4_5\n tail_0_5\n tail_1_5\ndiff --git a/file_6.py b/file_6.py\n--- a/file_6.py\n+++ b/file_6.py\n@@ -1,10 +1,12 @@\n context_3_6\n context_4_6\n-removed_0_6\n-removed_1_6\n-removed_2_6\n+added_0_6\n+added_1_6\n+added_2_6\n+added_3_6\n+added_4_6\n tail_0_6\n tail_1_6\ndiff --git a/file_7.py b/file_7.py\n--- a/file_7.py\n+++ b/file_7.py\n@@ -1,10 +1,12 @@\n context_3_7\n context_4_7\n-removed_0_7\n-removed_1_7\n-removed_2_7\n+added_0_7\n+added_1_7\n+added_2_7\n+added_3_7\n+added_4_7\n tail_0_7\n tail_1_7\n[8 files changed, +40 -24 lines]\n[177 lines compressed to 129. Retrieve full diff: hash=11ee99638b134ba374157005]",
+ "compressed": "diff --git a/file_0.py b/file_0.py\n--- a/file_0.py\n+++ b/file_0.py\n@@ -4,7 +4,9 @@\n context_3_0\n context_4_0\n-removed_0_0\n-removed_1_0\n-removed_2_0\n+added_0_0\n+added_1_0\n+added_2_0\n+added_3_0\n+added_4_0\n tail_0_0\n tail_1_0\ndiff --git a/file_1.py b/file_1.py\n--- a/file_1.py\n+++ b/file_1.py\n@@ -4,7 +4,9 @@\n context_3_1\n context_4_1\n-removed_0_1\n-removed_1_1\n-removed_2_1\n+added_0_1\n+added_1_1\n+added_2_1\n+added_3_1\n+added_4_1\n tail_0_1\n tail_1_1\ndiff --git a/file_2.py b/file_2.py\n--- a/file_2.py\n+++ b/file_2.py\n@@ -4,7 +4,9 @@\n context_3_2\n context_4_2\n-removed_0_2\n-removed_1_2\n-removed_2_2\n+added_0_2\n+added_1_2\n+added_2_2\n+added_3_2\n+added_4_2\n tail_0_2\n tail_1_2\ndiff --git a/file_3.py b/file_3.py\n--- a/file_3.py\n+++ b/file_3.py\n@@ -4,7 +4,9 @@\n context_3_3\n context_4_3\n-removed_0_3\n-removed_1_3\n-removed_2_3\n+added_0_3\n+added_1_3\n+added_2_3\n+added_3_3\n+added_4_3\n tail_0_3\n tail_1_3\ndiff --git a/file_4.py b/file_4.py\n--- a/file_4.py\n+++ b/file_4.py\n@@ -4,7 +4,9 @@\n context_3_4\n context_4_4\n-removed_0_4\n-removed_1_4\n-removed_2_4\n+added_0_4\n+added_1_4\n+added_2_4\n+added_3_4\n+added_4_4\n tail_0_4\n tail_1_4\ndiff --git a/file_5.py b/file_5.py\n--- a/file_5.py\n+++ b/file_5.py\n@@ -4,7 +4,9 @@\n context_3_5\n context_4_5\n-removed_0_5\n-removed_1_5\n-removed_2_5\n+added_0_5\n+added_1_5\n+added_2_5\n+added_3_5\n+added_4_5\n tail_0_5\n tail_1_5\ndiff --git a/file_6.py b/file_6.py\n--- a/file_6.py\n+++ b/file_6.py\n@@ -4,7 +4,9 @@\n context_3_6\n context_4_6\n-removed_0_6\n-removed_1_6\n-removed_2_6\n+added_0_6\n+added_1_6\n+added_2_6\n+added_3_6\n+added_4_6\n tail_0_6\n tail_1_6\ndiff --git a/file_7.py b/file_7.py\n--- a/file_7.py\n+++ b/file_7.py\n@@ -4,7 +4,9 @@\n context_3_7\n context_4_7\n-removed_0_7\n-removed_1_7\n-removed_2_7\n+added_0_7\n+added_1_7\n+added_2_7\n+added_3_7\n+added_4_7\n tail_0_7\n tail_1_7\n[8 files changed, +40 -24 lines]\n[177 lines compressed to 129. Retrieve full diff: hash=11ee99638b134ba374157005]",
"compressed_line_count": 129,
"deletions": 24,
"files_affected": 8,
diff --git a/tests/parity/fixtures/diff_compressor/5d950a94b8c22480.json b/tests/parity/fixtures/diff_compressor/5d950a94b8c22480.json
index 4b66ba0e7..a706ea219 100644
--- a/tests/parity/fixtures/diff_compressor/5d950a94b8c22480.json
+++ b/tests/parity/fixtures/diff_compressor/5d950a94b8c22480.json
@@ -13,7 +13,7 @@
"output": {
"additions": 1,
"cache_key": null,
- "compressed": "commit 0123456789abcdef\nAuthor: Tester <[email protected]>\nDate: Mon Apr 25 12:00:00 2026\n\n msg line 0\n msg line 1\n msg line 2\n msg line 3\n msg line 4\n msg line 5\n msg line 6\n msg line 7\n msg line 8\n msg line 9\n msg line 10\n msg line 11\n msg line 12\n msg line 13\n msg line 14\n msg line 15\n msg line 16\n msg line 17\n msg line 18\n msg line 19\n msg line 20\n msg line 21\n msg line 22\n msg line 23\n msg line 24\n msg line 25\n msg line 26\n msg line 27\n msg line 28\n msg line 29\n msg line 30\n msg line 31\n msg line 32\n msg line 33\n msg line 34\n msg line 35\n msg line 36\n msg line 37\n msg line 38\n msg line 39\n msg line 40\n msg line 41\n msg line 42\n msg line 43\n msg line 44\n msg line 45\n msg line 46\n msg line 47\n msg line 48\n msg line 49\n msg line 50\n msg line 51\n msg line 52\n msg line 53\n msg line 54\n msg line 55\n msg line 56\n msg line 57\n msg line 58\n msg line 59\n\ndiff --git a/auth/old_handler.py b/auth/new_handler.py\nsimilarity index 92%\nrename from auth/old_handler.py\nrename to auth/new_handler.py\n--- a/auth/old_handler.py\n+++ b/auth/new_handler.py\n@@ -1,8 +1,8 @@\n import os\n import sys\n-from auth import legacy\n+from auth import modern\n\n def authenticate(user):\n[1 files changed, +1 -1 lines]",
+ "compressed": "commit 0123456789abcdef\nAuthor: Tester <[email protected]>\nDate: Mon Apr 25 12:00:00 2026\n\n msg line 0\n msg line 1\n msg line 2\n msg line 3\n msg line 4\n msg line 5\n msg line 6\n msg line 7\n msg line 8\n msg line 9\n msg line 10\n msg line 11\n msg line 12\n msg line 13\n msg line 14\n msg line 15\n msg line 16\n msg line 17\n msg line 18\n msg line 19\n msg line 20\n msg line 21\n msg line 22\n msg line 23\n msg line 24\n msg line 25\n msg line 26\n msg line 27\n msg line 28\n msg line 29\n msg line 30\n msg line 31\n msg line 32\n msg line 33\n msg line 34\n msg line 35\n msg line 36\n msg line 37\n msg line 38\n msg line 39\n msg line 40\n msg line 41\n msg line 42\n msg line 43\n msg line 44\n msg line 45\n msg line 46\n msg line 47\n msg line 48\n msg line 49\n msg line 50\n msg line 51\n msg line 52\n msg line 53\n msg line 54\n msg line 55\n msg line 56\n msg line 57\n msg line 58\n msg line 59\n\ndiff --git a/auth/old_handler.py b/auth/new_handler.py\nsimilarity index 92%\nrename from auth/old_handler.py\nrename to auth/new_handler.py\n--- a/auth/old_handler.py\n+++ b/auth/new_handler.py\n@@ -1,5 +1,5 @@\n import os\n import sys\n-from auth import legacy\n+from auth import modern\n\n def authenticate(user):\n[1 files changed, +1 -1 lines]",
"compressed_line_count": 79,
"deletions": 1,
"files_affected": 1,
diff --git a/tests/parity/fixtures/diff_compressor/d4ed44a6fc667358.json b/tests/parity/fixtures/diff_compressor/d4ed44a6fc667358.json
index c0cd754d5..98f59ac32 100644
--- a/tests/parity/fixtures/diff_compressor/d4ed44a6fc667358.json
+++ b/tests/parity/fixtures/diff_compressor/d4ed44a6fc667358.json
@@ -13,7 +13,7 @@
"output": {
"additions": 40,
"cache_key": "706080f4af877cb632f87e1d",
- "compressed": "diff --git a/file_0.py b/file_0.py\n--- a/file_0.py\n+++ b/file_0.py\n@@ -1,10 +1,12 @@\n context_3_0\n context_4_0\n-removed_0_0\n-removed_1_0\n-removed_2_0\n+added_0_0\n+added_1_0\n+added_2_0\n+added_3_0\n+added_4_0\n tail_0_0\n tail_1_0\ndiff --git a/file_1.py b/file_1.py\n--- a/file_1.py\n+++ b/file_1.py\n@@ -1,10 +1,12 @@\n context_3_1\n context_4_1\n-removed_0_1\n-removed_1_1\n-removed_2_1\n+added_0_1\n+added_1_1\n+added_2_1\n+added_3_1\n+added_4_1\n tail_0_1\n tail_1_1\ndiff --git a/file_2.py b/file_2.py\n--- a/file_2.py\n+++ b/file_2.py\n@@ -1,10 +1,12 @@\n context_3_2\n context_4_2\n-removed_0_2\n-removed_1_2\n-removed_2_2\n+added_0_2\n+added_1_2\n+added_2_2\n+added_3_2\n+added_4_2\n tail_0_2\n tail_1_2\ndiff --git a/file_3.py b/file_3.py\n--- a/file_3.py\n+++ b/file_3.py\n@@ -1,10 +1,12 @@\n context_3_3\n context_4_3\n-removed_0_3\n-removed_1_3\n-removed_2_3\n+added_0_3\n+added_1_3\n+added_2_3\n+added_3_3\n+added_4_3\n tail_0_3\n tail_1_3\ndiff --git a/file_4.py b/file_4.py\n--- a/file_4.py\n+++ b/file_4.py\n@@ -1,10 +1,12 @@\n context_3_4\n context_4_4\n-removed_0_4\n-removed_1_4\n-removed_2_4\n+added_0_4\n+added_1_4\n+added_2_4\n+added_3_4\n+added_4_4\n tail_0_4\n tail_1_4\ndiff --git a/file_5.py b/file_5.py\n--- a/file_5.py\n+++ b/file_5.py\n@@ -1,10 +1,12 @@\n context_3_5\n context_4_5\n-removed_0_5\n-removed_1_5\n-removed_2_5\n+added_0_5\n+added_1_5\n+added_2_5\n+added_3_5\n+added_4_5\n tail_0_5\n tail_1_5\ndiff --git a/file_6.py b/file_6.py\n--- a/file_6.py\n+++ b/file_6.py\n@@ -1,10 +1,12 @@\n context_3_6\n context_4_6\n-removed_0_6\n-removed_1_6\n-removed_2_6\n+added_0_6\n+added_1_6\n+added_2_6\n+added_3_6\n+added_4_6\n tail_0_6\n tail_1_6\ndiff --git a/file_7.py b/file_7.py\n--- a/file_7.py\n+++ b/file_7.py\n@@ -1,10 +1,12 @@\n context_3_7\n context_4_7\n-removed_0_7\n-removed_1_7\n-removed_2_7\n+added_0_7\n+added_1_7\n+added_2_7\n+added_3_7\n+added_4_7\n tail_0_7\n tail_1_7\n[8 files changed, +40 -24 lines]\n[177 lines compressed to 129. Retrieve full diff: hash=706080f4af877cb632f87e1d]",
+ "compressed": "diff --git a/file_0.py b/file_0.py\n--- a/file_0.py\n+++ b/file_0.py\n@@ -4,7 +4,9 @@\n context_3_0\n context_4_0\n-removed_0_0\n-removed_1_0\n-removed_2_0\n+added_0_0\n+added_1_0\n+added_2_0\n+added_3_0\n+added_4_0\n tail_0_0\n tail_1_0\ndiff --git a/file_1.py b/file_1.py\n--- a/file_1.py\n+++ b/file_1.py\n@@ -4,7 +4,9 @@\n context_3_1\n context_4_1\n-removed_0_1\n-removed_1_1\n-removed_2_1\n+added_0_1\n+added_1_1\n+added_2_1\n+added_3_1\n+added_4_1\n tail_0_1\n tail_1_1\ndiff --git a/file_2.py b/file_2.py\n--- a/file_2.py\n+++ b/file_2.py\n@@ -4,7 +4,9 @@\n context_3_2\n context_4_2\n-removed_0_2\n-removed_1_2\n-removed_2_2\n+added_0_2\n+added_1_2\n+added_2_2\n+added_3_2\n+added_4_2\n tail_0_2\n tail_1_2\ndiff --git a/file_3.py b/file_3.py\n--- a/file_3.py\n+++ b/file_3.py\n@@ -4,7 +4,9 @@\n context_3_3\n context_4_3\n-removed_0_3\n-removed_1_3\n-removed_2_3\n+added_0_3\n+added_1_3\n+added_2_3\n+added_3_3\n+added_4_3\n tail_0_3\n tail_1_3\ndiff --git a/file_4.py b/file_4.py\n--- a/file_4.py\n+++ b/file_4.py\n@@ -4,7 +4,9 @@\n context_3_4\n context_4_4\n-removed_0_4\n-removed_1_4\n-removed_2_4\n+added_0_4\n+added_1_4\n+added_2_4\n+added_3_4\n+added_4_4\n tail_0_4\n tail_1_4\ndiff --git a/file_5.py b/file_5.py\n--- a/file_5.py\n+++ b/file_5.py\n@@ -4,7 +4,9 @@\n context_3_5\n context_4_5\n-removed_0_5\n-removed_1_5\n-removed_2_5\n+added_0_5\n+added_1_5\n+added_2_5\n+added_3_5\n+added_4_5\n tail_0_5\n tail_1_5\ndiff --git a/file_6.py b/file_6.py\n--- a/file_6.py\n+++ b/file_6.py\n@@ -4,7 +4,9 @@\n context_3_6\n context_4_6\n-removed_0_6\n-removed_1_6\n-removed_2_6\n+added_0_6\n+added_1_6\n+added_2_6\n+added_3_6\n+added_4_6\n tail_0_6\n tail_1_6\ndiff --git a/file_7.py b/file_7.py\n--- a/file_7.py\n+++ b/file_7.py\n@@ -4,7 +4,9 @@\n context_3_7\n context_4_7\n-removed_0_7\n-removed_1_7\n-removed_2_7\n+added_0_7\n+added_1_7\n+added_2_7\n+added_3_7\n+added_4_7\n tail_0_7\n tail_1_7\n[8 files changed, +40 -24 lines]\n[177 lines compressed to 129. Retrieve full diff: hash=706080f4af877cb632f87e1d]",
"compressed_line_count": 129,
"deletions": 24,
"files_affected": 8,
diff --git a/tests/parity/fixtures/diff_compressor/ea99ab1ea7449acf.json b/tests/parity/fixtures/diff_compressor/ea99ab1ea7449acf.json
index a16dcee73..5e40b8d90 100644
--- a/tests/parity/fixtures/diff_compressor/ea99ab1ea7449acf.json
+++ b/tests/parity/fixtures/diff_compressor/ea99ab1ea7449acf.json
@@ -13,7 +13,7 @@
"output": {
"additions": 40,
"cache_key": "416e7f5d3ae0f718cc2609eb",
- "compressed": "diff --git a/file_0.py b/file_0.py\n--- a/file_0.py\n+++ b/file_0.py\n@@ -1,10 +1,12 @@\n context_3_0\n context_4_0\n-removed_0_0\n-removed_1_0\n-removed_2_0\n+added_0_0\n+added_1_0\n+added_2_0\n+added_3_0\n+added_4_0\n tail_0_0\n tail_1_0\ndiff --git a/file_1.py b/file_1.py\n--- a/file_1.py\n+++ b/file_1.py\n@@ -1,10 +1,12 @@\n context_3_1\n context_4_1\n-removed_0_1\n-removed_1_1\n-removed_2_1\n+added_0_1\n+added_1_1\n+added_2_1\n+added_3_1\n+added_4_1\n tail_0_1\n tail_1_1\ndiff --git a/file_2.py b/file_2.py\n--- a/file_2.py\n+++ b/file_2.py\n@@ -1,10 +1,12 @@\n context_3_2\n context_4_2\n-removed_0_2\n-removed_1_2\n-removed_2_2\n+added_0_2\n+added_1_2\n+added_2_2\n+added_3_2\n+added_4_2\n tail_0_2\n tail_1_2\ndiff --git a/file_3.py b/file_3.py\n--- a/file_3.py\n+++ b/file_3.py\n@@ -1,10 +1,12 @@\n context_3_3\n context_4_3\n-removed_0_3\n-removed_1_3\n-removed_2_3\n+added_0_3\n+added_1_3\n+added_2_3\n+added_3_3\n+added_4_3\n tail_0_3\n tail_1_3\ndiff --git a/file_4.py b/file_4.py\n--- a/file_4.py\n+++ b/file_4.py\n@@ -1,10 +1,12 @@\n context_3_4\n context_4_4\n-removed_0_4\n-removed_1_4\n-removed_2_4\n+added_0_4\n+added_1_4\n+added_2_4\n+added_3_4\n+added_4_4\n tail_0_4\n tail_1_4\ndiff --git a/file_5.py b/file_5.py\n--- a/file_5.py\n+++ b/file_5.py\n@@ -1,10 +1,12 @@\n context_3_5\n context_4_5\n-removed_0_5\n-removed_1_5\n-removed_2_5\n+added_0_5\n+added_1_5\n+added_2_5\n+added_3_5\n+added_4_5\n tail_0_5\n tail_1_5\ndiff --git a/file_6.py b/file_6.py\n--- a/file_6.py\n+++ b/file_6.py\n@@ -1,10 +1,12 @@\n context_3_6\n context_4_6\n-removed_0_6\n-removed_1_6\n-removed_2_6\n+added_0_6\n+added_1_6\n+added_2_6\n+added_3_6\n+added_4_6\n tail_0_6\n tail_1_6\ndiff --git a/file_7.py b/file_7.py\n--- a/file_7.py\n+++ b/file_7.py\n@@ -1,10 +1,12 @@\n context_3_7\n context_4_7\n-removed_0_7\n-removed_1_7\n-removed_2_7\n+added_0_7\n+added_1_7\n+added_2_7\n+added_3_7\n+added_4_7\n tail_0_7\n tail_1_7\n[8 files changed, +40 -24 lines]\n[177 lines compressed to 129. Retrieve full diff: hash=416e7f5d3ae0f718cc2609eb]",
+ "compressed": "diff --git a/file_0.py b/file_0.py\n--- a/file_0.py\n+++ b/file_0.py\n@@ -4,7 +4,9 @@\n context_3_0\n context_4_0\n-removed_0_0\n-removed_1_0\n-removed_2_0\n+added_0_0\n+added_1_0\n+added_2_0\n+added_3_0\n+added_4_0\n tail_0_0\n tail_1_0\ndiff --git a/file_1.py b/file_1.py\n--- a/file_1.py\n+++ b/file_1.py\n@@ -4,7 +4,9 @@\n context_3_1\n context_4_1\n-removed_0_1\n-removed_1_1\n-removed_2_1\n+added_0_1\n+added_1_1\n+added_2_1\n+added_3_1\n+added_4_1\n tail_0_1\n tail_1_1\ndiff --git a/file_2.py b/file_2.py\n--- a/file_2.py\n+++ b/file_2.py\n@@ -4,7 +4,9 @@\n context_3_2\n context_4_2\n-removed_0_2\n-removed_1_2\n-removed_2_2\n+added_0_2\n+added_1_2\n+added_2_2\n+added_3_2\n+added_4_2\n tail_0_2\n tail_1_2\ndiff --git a/file_3.py b/file_3.py\n--- a/file_3.py\n+++ b/file_3.py\n@@ -4,7 +4,9 @@\n context_3_3\n context_4_3\n-removed_0_3\n-removed_1_3\n-removed_2_3\n+added_0_3\n+added_1_3\n+added_2_3\n+added_3_3\n+added_4_3\n tail_0_3\n tail_1_3\ndiff --git a/file_4.py b/file_4.py\n--- a/file_4.py\n+++ b/file_4.py\n@@ -4,7 +4,9 @@\n context_3_4\n context_4_4\n-removed_0_4\n-removed_1_4\n-removed_2_4\n+added_0_4\n+added_1_4\n+added_2_4\n+added_3_4\n+added_4_4\n tail_0_4\n tail_1_4\ndiff --git a/file_5.py b/file_5.py\n--- a/file_5.py\n+++ b/file_5.py\n@@ -4,7 +4,9 @@\n context_3_5\n context_4_5\n-removed_0_5\n-removed_1_5\n-removed_2_5\n+added_0_5\n+added_1_5\n+added_2_5\n+added_3_5\n+added_4_5\n tail_0_5\n tail_1_5\ndiff --git a/file_6.py b/file_6.py\n--- a/file_6.py\n+++ b/file_6.py\n@@ -4,7 +4,9 @@\n context_3_6\n context_4_6\n-removed_0_6\n-removed_1_6\n-removed_2_6\n+added_0_6\n+added_1_6\n+added_2_6\n+added_3_6\n+added_4_6\n tail_0_6\n tail_1_6\ndiff --git a/file_7.py b/file_7.py\n--- a/file_7.py\n+++ b/file_7.py\n@@ -4,7 +4,9 @@\n context_3_7\n context_4_7\n-removed_0_7\n-removed_1_7\n-removed_2_7\n+added_0_7\n+added_1_7\n+added_2_7\n+added_3_7\n+added_4_7\n tail_0_7\n tail_1_7\n[8 files changed, +40 -24 lines]\n[177 lines compressed to 129. Retrieve full diff: hash=416e7f5d3ae0f718cc2609eb]",
"compressed_line_count": 129,
"deletions": 24,
"files_affected": 8,