headroom/tests/parity
chopratejas 21989e3640 fix(rust): port MessageScorer to Rust + parity harness (PR-A)
Direct port of `headroom.transforms.scoring.MessageScorer` (459 LOC).
Foundation piece for the IntelligentContext port (PR-B onward).

What's wired:
- Deterministic factors fully ported: recency (exp-decay), forward
  references (tool_call_id graph), token density (unique/total).
- External-dep factors gated behind traits: `EmbeddingProvider` and
  `ToinProvider`. No concrete impls yet — both default to neutral
  values matching Python's `embedding_provider=None` / `toin=None`.
  PR-A1 wires fastembed; PR-A2 plugs in a PyO3 ToinProvider.
- ScoringWeights + MessageScore with serde + BTreeMap-ordered
  breakdown for stable JSON.

Parity:
- 13 fixtures recorded from Python, byte-equal under the comparator.
- Floats rounded to 5 decimals on both sides — absorbs f32-vs-f64
  drift in the weighted sum without masking real bugs.

Drive-by: re-fix three pre-existing clippy errors in
smart_crusher/crusher.rs that re-emerged with new test additions
(field_reassign_with_default + dead hash_array_for_ccr).
2026-05-01 10:06:56 -07:00
..
fixtures fix(rust): port MessageScorer to Rust + parity harness (PR-A) 2026-05-01 10:06:56 -07:00
record_message_scorer.py fix(rust): port MessageScorer to Rust + parity harness (PR-A) 2026-05-01 10:06:56 -07:00
record_smart_crusher.py parity(smart_crusher): byte-equal harness — 17 fixtures green 2026-04-27 00:01:26 -07:00
recorder.py chore(rust): port ContentDetector to Rust + parity harness + PyO3 bridge 2026-04-27 23:57:39 -07:00