headroom/tests/parity/fixtures
Ruben A. e530de5ad2
feat(rust): port CodeCompressor AST compressor to Rust (parity-only) (#1154)
Adds crates/headroom-core/src/transforms/code_compressor.rs (1,882 lines): the
AST-aware CodeCompressor ported to Rust on tree-sitter, with grammars for
Python, JavaScript, TypeScript, Go, Rust, Java, C and C++.

Parity-only, like #1153. Nothing calls it: the only references outside the
module are the pub mod / pub use declarations in transforms/mod.rs, and
live_zone.rs still routes SourceCode to a no-op. The pyo3 bridge is untouched
and no Python source changes, so the engine is unreachable from the shipped
package. #1155 wires it into live-zone dispatch.

Every grammar is pinned with '=' to the exact version of the corresponding
Python tree-sitter-<lang> PyPI wheel. Same version on crates.io and PyPI means
the same grammar.js, hence the same generated parser.c, hence node-for-node
identical ASTs — the precondition for byte-parity. A canary over 9 samples x 8
languages confirmed identical node-type and line-span trees at these pins;
bumping any pin requires re-running it and re-recording the fixtures.

Ships 30 recorded parity fixtures, a CodeCompressorComparator in
headroom-parity, and scripts/record_code_compressor_fixtures.py.

Verified byte-identical to the recorded Python output:

  [code_aware_compressor] total=30 matched=30 skipped=0 diffed=0

Full harness on the merge result: 227 fixtures, 182 matched, 45 skipped
(cache_aligner + ccr stubs), 0 diffed, exit 0 — with kompress at 21/21 under
ONNX Runtime 1.24.4 (see #2591).

Also verified cargo check -p headroom-core --no-default-features passes, so the
static-musl path stays intact.
2026-07-27 09:21:57 -07:00
..
cache_aligner feat(rust): scaffold workspace + parity harness (phase-0) 2026-04-24 13:39:48 -07:00
ccr feat(rust): scaffold workspace + parity harness (phase-0) 2026-04-24 13:39:48 -07:00
code_aware_compressor feat(rust): port CodeCompressor AST compressor to Rust (parity-only) (#1154) 2026-07-27 09:21:57 -07:00
codex_openai_contracts fix(proxy): restore Codex usage headers on WS and streaming SSE transports (#577) (#794) 2026-06-09 15:55:53 -05:00
content_detector chore(rust): port ContentDetector to Rust + parity harness + PyO3 bridge 2026-04-27 23:57:39 -07:00
diff_compressor fix(diff): close ContentRouter routing gaps for merge diffs and long preambles 2026-04-26 09:13:08 -07:00
kompress feat(rust): port Kompress ML prose compressor to Rust (parity-only) (#1153) 2026-07-27 08:17:53 -07:00
log_compressor feat(rust): scaffold workspace + parity harness (phase-0) 2026-04-24 13:39:48 -07:00
smart_crusher chore(rust): SmartCrusher CCR marker injection + walker unification 2026-04-27 20:25:22 -07:00
text_crusher feat(text-crusher): CJK-aware segmentation + relevance via ICU (#1504) 2026-07-15 19:58:48 +00:00
tokenizer feat(rust): scaffold workspace + parity harness (phase-0) 2026-04-24 13:39:48 -07:00