# execution_evidence

Reads stored execution tables and returns their schema-versioned evidence projection.

Canonical HTML: <https://determica.com/docs/functions/execution_evidence>

- Kind: scalar function
- Category: [Simulation](/docs/category/simulation.md)
- Tags: Program Compiler, Simulate

Reads stored execution tables and returns their schema-versioned evidence projection.

## Overload 1: execution_evidence(UUID)

```sql
execution_evidence(UUID)
```

Projects one locally stored execution and its related rows without running or authoring a PROGRAM.

- Kind: scalar
- Execution context: Existing simulation
- Behavior: Transform
- Execution modes: Offline
- Input shape: Scalar Arguments
- Planning contract: Runtime
- Cardinality: One Per Input
- Determinism: Local Catalog State
- Return shape: Scalar
- Schema stability: Fixed
- Stability: Stable
- Side effects: None documented

### Requirements

- existing_simulation

### Inputs

- `execution_id` (UUID; required; positional) — UUID of the stored execution to project. An unknown ID produces NULL.

### Returns

Stored execution evidence

Returns an EXECUTION_EVIDENCE object with schema_version 1, or NULL when evm.executions has no matching row. Missing collection sections are empty JSON arrays; a missing effect_summary is JSON null.

- `execution_evidence` (EXECUTION_EVIDENCE)

Stored execution evidence. Returns an EXECUTION_EVIDENCE object with schema_version 1, or NULL when evm.executions has no matching row. Missing collection sections are empty JSON arrays; a missing effect_summary is JSON null.

### Examples

_Named parameters · Needs run_

```sql
SELECT execution_evidence($execution_id) AS evidence;
```

## Guidance

### Local data dependency

Results depend on the current contents of the local execution tables and can change when those tables change.

### Section defaults

observation_facts, steps, assumptions, observations, asset_claims, and frames default to empty arrays; effect_summary defaults to null.
