<!-- normative -->

# Event Catalogue

One table per event: event, source, admitted by, affected machine(s), payload. All events are replayable.
Executor-sourced observations are not authoritative until admitted by the controller. Every event in this
catalogue is an authoritative, controller-admitted event.

## Node lifecycle events

| Event | Source | Admitted by | Affected machine | Payload |
|---|---|---|---|---|
| `NODE_PROPOSED` | Controller | Controller | Node state machine | node_id, contract, cause (`ROOT`, `DECOMPOSITION`, `REPLAN`, or `ROOT_REPLACEMENT`) |
| `NODE_ADMITTED` | Controller | Controller | Node state machine | node_id, contract, authority |
| `NODE_REJECTED` | Controller | Controller | Node state machine | node_id, reason |
| `READINESS_ESTABLISHED` | Scheduler | Controller | Node state machine | node_id, action |
| `READINESS_REVOKED` | Controller | Controller | Node state machine | node_id, reason |
| `DECOMPOSITION_ADMITTED` | Controller | Controller | Node state machine | proposal_id, node_id |
| `VALIDATION_STARTED` | Controller | Controller | Node state machine | node_id |
| `VALIDATION_PASSED` | Controller | Controller | Node state machine | node_id, evidence |
| `VALIDATION_FAILED` | Controller | Controller | Node state machine | node_id, evidence |
| `ACCEPTANCE_AUTHORISED` | Controller | Controller | Node state machine + freshness | node_id, bindings |
| `ACCEPTANCE_DEFERRED` | Controller | Controller | Node state machine | node_id, reason |
| `VALIDATION_INVALIDATED` | Controller | Controller | Node state machine | node_id, invalidation |
| `CONFLICT_RECORDED` | Controller | Controller | Node state machine | node_id, conflict |
| `CONFLICT_RESOLVED` | Controller | Controller | Node state machine | node_id |
| `REPLAN_REQUESTED` | Controller | Controller | Node state machine | node_id, reason |
| `VERSION_CONFLICT_RECORDED` | Controller | Controller | — (side-effect only) | node_id, entity |
| `PLAN_ADMITTED` | Controller | Controller | Node state machine | plan_id |
| `NODE_MARKED_INFEASIBLE` | Controller | Controller | Node state machine | node_id |
| `NODE_CANCELLED` | Controller | Controller | Node state machine | node_id |
| `BUDGET_EXHAUSTION_RECORDED` | Controller | Controller | Node state machine | node_id |
| `NODE_SUPERSEDED` | Controller | Controller | Node state machine | node_id, replacement |
| `ROOT_REPLACED` | Controller | Controller | Node state machine | old_root, new_root |

## Attempt lifecycle events

| Event | Source | Admitted by | Affected machine | Payload |
|---|---|---|---|---|
| `ATTEMPT_PLANNED` | Controller | Controller | Attempt state machine | attempt_id, cause (`INITIAL` or `RETRY`) |
| `ACTION_RESERVED` | Scheduler | Controller | Attempt state machine | attempt_id, commitment |
| `ACTION_DISPATCHED` | Controller | Controller | Attempt state machine | attempt_id, executor |
| `DISPATCH_ACKNOWLEDGED` | Executor | Controller | Attempt state machine | attempt_id, token |
| `DISPATCH_FAILED` | Controller | Controller | Attempt state machine | attempt_id |
| `EXECUTOR_OBSERVATION_ADMITTED` | Executor | Controller | Attempt state machine | attempt_id, observation |
| `RESULT_ADMITTED` | Controller | Controller | Attempt + freshness | attempt_id, result |
| `RESULT_REJECTED` | Controller | Controller | Attempt state machine | attempt_id, reason |
| `TIMER_FIRED` | Timer | Controller | Attempt state machine | timer_id, attempt_id |
| `CANCELLATION_CONFIRMED` | Controller | Controller | Attempt state machine | attempt_id |
| `EXECUTOR_FAILED` | Executor | Controller | Attempt state machine | attempt_id, failure |
| `ATTEMPT_FAILED_ON_RECOVERY` | Controller | Controller | Attempt state machine | attempt_id |
| `SANDBOX_VIOLATION_RECORDED` | Sandbox | Controller | Attempt state machine | attempt_id, evidence |

## Artefact lifecycle events

| Event | Source | Admitted by | Affected machine | Payload |
|---|---|---|---|---|
| `ARTEFACT_ADMITTED` | Controller | Controller | Artefact state machine | artefact_id, type, hash |
| `ARTEFACT_INTEGRATED` | Controller | Controller | Artefact state machine | artefact_id, merge_info |
| `ARTEFACT_VALIDATED` | Controller | Controller | Artefact state machine | artefact_id, validator |
| `ARTEFACT_PUBLISHED` | Controller | Controller | Artefact state machine | artefact_id, version |
| `ARTEFACT_REJECTED` | Controller | Controller | Artefact state machine | artefact_id, reason |
| `ARTEFACT_SUPERSEDED` | Controller | Controller | Artefact state machine | artefact_id, replacement |

## Result and accounting events

| Event | Source | Admitted by | Affected machine | Payload |
|---|---|---|---|---|
| `ATTEMPT_COMMITMENT_OPENED` | Controller | Controller | Accounting | attempt_id, commitment |
| `ATTEMPT_EXECUTION_ENDED_UNRECONCILED` | Controller | Controller | Accounting | attempt_id |
| `ATTEMPT_COST_RECONCILED` | Controller | Controller | Accounting | attempt_id, actual, reclamation |
| `ATTEMPT_COST_SETTLED_CONSERVATIVELY` | Controller | Controller | Accounting | attempt_id, commitment |

## Scheduling and executor events

| Event | Source | Admitted by | Affected machine | Payload |
|---|---|---|---|---|
| `EXECUTOR_REGISTERED` | Executor | Controller | Scheduler | executor_id, capacity |
| `EXECUTOR_LOST` | Scheduler | Controller | Scheduler | executor_id |
| `CAPACITY_GRANTED` | Controller | Controller | Scheduler | executor_id, capacity |
| `CAPACITY_RELEASED` | Controller | Controller | Scheduler | executor_id, capacity |
| `TIMER_SCHEDULED` | Controller | Controller | Timer | timer_id, attempt_id, deadline |
| `CANCELLATION_REQUESTED` | Controller | Controller | — (flag only) | node_id, reason |

## Result freshness events

| Event | Source | Admitted by | Affected machine | Payload |
|---|---|---|---|---|
| `RESULT_MARKED_STALE` | Controller | Controller | Freshness state machine | result_id, reason |
| `RESULT_MARKED_INVALID` | Controller | Controller | Freshness state machine | result_id, reason |
| `RESULT_MARKED_REVALIDATION_REQUIRED` | Controller | Controller | Freshness state machine | result_id, reason |
| `RESULT_MARKED_COMPATIBLE` | Controller | Controller | Freshness state machine | result_id, reason |
| `RESULT_REVALIDATED` | Controller | Controller | Freshness state machine | result_id, reason |