Skip to main content

repair_phi_pair

Function repair_phi_pair 

Source
pub fn repair_phi_pair(
    before: &mut [f64],
    after: &mut [f64],
    names: &[String],
) -> usize
Expand description

The same repair for the implicit-event stream’s stored phi_before / phi_after pairs — the fourth carrier of raw φ in a saved session, after the pool, the log and the HELD tray, and the one that is easiest to forget because nothing reads it yet.

That is exactly why it has to be repaired: the stream exists so a later model can be fitted on hand edits, and a corpus that is quietly wrong on the day it is first used is worse than one that is missing.

Matched positionally against the live φ names, which the log’s repair refuses to do — the difference is that an event carries no names of its own, so position is the only interpretation it has, and the length guard is what makes that safe.

A row of a different width is left exactly alone, and that is a decision rather than a gap. φ has been 12 + n_struct, 13 + n_struct and now 15 + 25 columns wide; a 38-wide row is either 13 audio over today’s 25 structural coordinates or 15 audio over the 23 that predate wave 3, and nothing in the row says which. Aligning it to the live names would clamp a coordinate — just not necessarily the one that is out of range. So a stale row keeps its bad cell, which costs nothing (no consumer reads this stream yet, and every consumer that ever does will have to reconcile widths before it can) and is the only reading that cannot invent evidence.