pub fn apply_compaction(
ctx: &mut ContextState,
req: &CompactionRequest,
verdict: &Value,
) -> Result<CompactionOutcome, String>Expand description
Fold the summarizer’s verdict into the context: absorb the summary, drop
the folded messages, bump the version, evict unreferenced skill bodies
(names stay — the caller drops the bodies from its cache), recount.
Refuses when the context’s version has moved since the plan was made, or
when the plan’s fold exceeds the messages actually present.