pub fn write_stage_context( run_id: &str, stage_idx: usize, snap: &ContextSnapshot, ) -> Result<()>
Atomically write a context snapshot for a specific stage.