pub fn record_cadence_event(
data_dir: &Path,
session_id: Option<String>,
tokens_before: usize,
tokens_after: usize,
context_window: usize,
duration_ms: u64,
rounds: usize,
)Expand description
Build and emit the SURFACE_TCODE_CADENCE telemetry record for one
AgentLoop::maybe_cadence_compress call whose outcome.rounds > 0
(issue #3867).
Why: same file-size rationale as record_threshold_event.
What: compaction_event is always false (cadence fires are never the
Slice B alarm signal). Caller must only invoke this when
outcome.rounds > 0 — see the issue’s “only emit when something
actually happened” note.
Test: tests::record_cadence_event_writes_jsonl.