KB-36C5

DOT Wrapper — 06 Process Event Handling Plan

3 min read Revision 1

06 — Process Event Handling Plan (Workstream E/H-events)

The 7 process.* event types (LIVE, all active=false)

event_type stream lane severity
process.run.started update delayed info
process.run.completed update delayed info
process.run.failed alert immediate warning
process.step.started update delayed info
process.step.completed update delayed info
process.correlation.missing alert immediate warning
process.evidence.missing alert immediate warning

Decision: do NOT activate any event type this macro

Default per macro = do not activate. Activation is an operator/owner action, and emitting from an inactive type would be faking activation. The harness references event types by code in process_component_observation.event_code (a text column, no FK enforcement to active) — so a dry-run can name the event it would emit without the event being live. This is the honest middle ground: the observation records intent; no event_outbox row is produced while the type is inactive.

Can dry-run reference inactive event types? YES — safely

event_code is recorded as evidence of what would fire. The wrapper only writes an actual event_outbox row when the referenced type is active=true. Today all are inactive ⇒ 0 event_outbox rows produced. No activation, no faked emission.

Event payload contract (when activated later)

{
  "process_run_id": "<uuid>",
  "correlation_id": "<text>",
  "component_run_id": "<uuid>",
  "dot_code": "DOT_KG_EXPLAIN",
  "status": "step_completed",
  "evidence_type": "DRY_RUN",
  "input_ref": "...",
  "output_ref": "..."
}

Activation packet (NOT applied — owner/operator gated)

To activate the update-stream types for dry-run visibility: UPDATE event_type_registry SET active=true WHERE event_type IN ('process.run.started','process.run.completed','process.step.started','process.step.completed') — leave the two *.missing alert types and process.run.failed for a later decision (they page on immediate lane). Requires owner sign-off + an emit path that respects process_dot_runtime.dry_run_only. Mirror precedent: piece_event_runtime.emit_enabled=false keeps emission off even when types exist.

Completion

Event integration is exact: payload defined, reference-without-emit semantics defined, activation packet staged but not applied, 0 events activated this macro.

Back to Knowledge Hub knowledge/dev/reports/architecture/dot-execution-wrapper-correlation-patch-kg-dryrun-harness-2026-06-04/06-process-event-handling-plan.md