pub fn load_trace_view(
db_path: impl AsRef<Path>,
tenant: &str,
trace_id: &str,
) -> Result<Option<Trace>, StoreError>Expand description
Load a single trace by id scoped to tenant, with its deferred verdicts merged into
deferred — the view for display/inspection (ADR 0004 §D3). A trace owned by another
tenant returns None, exactly like a missing one, so an inspecting agent can never read across
tenants. This is deliberately separate from load_all_traces: merging deferred verdicts
changes the record, so a merged trace must NOT be fed to verify_chain (chain verification
always runs on the sealed bodies from load_all_traces).
§Errors
Returns StoreError::Sqlite / StoreError::Json on database or decode errors.