Nick
|
b5228ace36
|
feat(inference_trace): port to FULL Rust — dichotomy wave
DICHOTOMY VERDICT: RUST (deterministic decision core; file IO stays
Python-side by design, not by omission — append/rotate/replace, directory
creation, file reads, argv/print are the Python strangler seams).
Replaces the stale W6 stub (wrong struct shape, price_for only).
Ported (name-preserving, src/rust/inference_trace/src/lib.rs):
- price_for (empty map: None for ALL models), trace_dir/trace_path
(explicit-arg wins else <rune_home>/state)
- serialize (sort_keys + compact separators; recursive BTreeMap key sort)
- rotate_plan (ordered shift pairs BACKUPS..1, I1 source-guard semantics)
+ should_rotate (strict >), read_select (limit trims last N pre-parse,
blank lines skipped), cli_tail + format_record (indent=2 sorted shape)
- it_loader.py: 6 doc-envelope symbols, freed via capability_scoring
cs_free_string (never re-exported); facade delegation in
inference_trace.py with RUNE_IT_CORE=python pin; python fallbacks
byte-identical.
Truth: scripts/gen_inference_trace_truth.py freezes 24 cases from the live
oracle (RUNE_IT_CORE=python pinned, isolated RUNE_HOME, every public
function, all branches) into frozen_it_truth.json; battery replays it
VERBATIM (6 tests green). Live parity 100% (24/24 byte-identical vs the
freshly built .so). 129 consumer tests green.
Contract BUILDER-2026-10-12T13:55:29Z-148b8f-factory-wave.
|
2026-10-12 16:55:24 +01:00 |
|