mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-08-27 14:17:10 -04:00
Ports `headroom.transforms.log_compressor` to Rust. The biggest-by- impact remaining compressor port: build/test logs are where the 10-50x compression wins live. * Stack-trace state machine: per-flavor dispatcher (Python Traceback, JS, Java, Rust error, Go); each flavor has its own termination rule. Python terminated on any blank line, dropping mid-trace lines from chained-exception traces. * Conservative dedupe: preserves message prefix (everything before first `:` or `=`); only trailing region is tokenised. Python's blanket normalisation collapsed segfaults at different addresses. * Loud CCR failures: `tracing::warn!` + `logger.warning` instead of bare `except: pass`. * `LogLevel::FAIL` documented as cosmetic-equivalent to ERROR. Same shape as search_compressor port. Rust `LogCompressor` orchestrates format detect -> classify -> score -> select -> format -> CCR. Inline static-table format detector (YAGNI), aho-corasick level classifier with word-boundary post-filter (`signals::keyword_detector` technique), hand-rolled per-flavor stack-trace state machine. `signals::LineImportanceDetector` NOT consumed -- log levels are structural, not prose-style importance. `headroom.transforms.log_compressor` becomes a thin shim: `compress()` delegates to Rust end-to-end; internal helpers preserved for the existing 50-test surface. Two existing tests updated for new dedupe semantics + new compress orchestration. * 17 Rust unit tests * 50 Python tests pass * `make ci-precheck` clean |
||
|---|---|---|
| .. | ||
| headroom-agent-hooks | ||
| openclaw | ||