diff --git a/docs/superpowers/plans/2026-07-16-context-compaction-overhaul.md b/docs/superpowers/plans/2026-07-16-context-compaction-overhaul.md index d3474a8..8a99fd3 100644 --- a/docs/superpowers/plans/2026-07-16-context-compaction-overhaul.md +++ b/docs/superpowers/plans/2026-07-16-context-compaction-overhaul.md @@ -672,16 +672,28 @@ mod tests { #[test] fn log_like_output_keeps_error_lines_and_marks_omissions() { + // `looks_log_shaped` requires >= 3 lines matching error/warn/fail/ + // panic/stack-frame patterns before routing to `squash_log` at + // all — a single error line isn't enough and would silently fall + // through to `squash_generic` instead, so this fixture needs at + // least 3 such lines, spread apart, to actually exercise + // squash_log's scoring/windowing logic (not just its fallback). let mut lines = vec!["build started".to_string()]; for i in 0..200 { lines.push(format!("info: compiling module {i}")); } + lines.push("error: something failed early in the build".to_string()); + for i in 0..200 { + lines.push(format!("info: compiling module {}", i + 200)); + } + lines.push("warning: deprecated api used somewhere".to_string()); lines.push("error: something failed at the end".to_string()); let text = lines.join("\n"); assert!(text.len() > SQUASH_FLOOR_BYTES); let result = apply("bash", &text); + assert!(result.contains("error: something failed early in the build")); assert!(result.contains("error: something failed at the end")); assert!(result.contains("lines omitted")); assert!(result.len() < text.len());