In Memory Collector Trace Store
A thread-safe, in-process CollectorTraceStore that keeps everything in concurrent maps keyed by run id. Good for tests and single-node setups that don't need the trace to survive a restart; a graph-backed store can implement the same interface for durability.
The record calls don't carry a context id, but deleteTracesForContext needs one to know what to erase. recordRunContext closes that gap — callers tell it once which context a run belongs to, and deletion looks up every run for that context and clears its rows. A run never registered with recordRunContext is unreachable from deleteTracesForContext.
Functions
Erasure hook: deleting a context's data must cascade to its trace rows.
Scans every recorded decision for one where propositionId survived or was folded away.
Walks the recording order backwards, so the newest decision that retired propositionId wins.
The undo-record for one retired member of a collapse: its prior status and exactly the grounding/provenance/source ids a merging sweep folded onto its survivor from it. Looks up the CollectorDecision that retired retiredId via findDecisionRetiring and picks out its entry.
Registers which context a run belongs to, so deleteTracesForContext can find and clear that run's rows later. Call this once per run, e.g. before recording its first edge.