KB-58A8

Process Discovery — 06 DOT Execution Readiness Without Execution

4 min read Revision 1
process-discoverydot-executiondry-runreadiness2026-06-04

06 — DOT Execution Readiness Without Execution (Workstream E)

No production DOT was executed. This is the readiness design so the next macro can run a dry-run without rediscovery.

6.1 How DOTs are executed today

  • All 36 KG DOTs: status=active, script_path/file_path NULL, execution_engine (in extra_metadata) declared pg_function, last_executed NULL, usage_count 0. They are declared but never invoked — there is no live runner that picks a DOT and runs it.
  • The only real run ledger that exists is dot_iu_command_run (IU-command layer, plan/apply/verify) — a different layer that governs IU mutation commands, not DOT tool execution.
  • job_queue is the only place a multi-step process actually ran end-to-end (job:cut, 6 finished, shared run_id).

6.2 Dry-run mode — does it exist?

  • Partial, in the IU-command layer: dot_iu_command_run.run_mode already supports plan / verify (vs apply) — a real dry-run convention, but for IU commands, not DOT tools.
  • For DOT_* tools: no dry-run runner exists. There is no wrapper that takes a DOT, runs it in plan mode, and logs an observation. Default: no execution.

6.3 Wrapper requirements (for the next macro)

A safe DOT dry-run wrapper must:

  1. Mint a process_run_id + correlation_id; write a process_run_observation header with source_system='dry_run', status='started'.
  2. For each component (producer, then verifier): write a process_component_observation row with component_role, started_at; invoke the DOT in plan/verify mode only (no apply, no business mutation); capture input_ref/output_ref/evidence_ref; set ended_at, status='step_completed'.
  3. Emit process.* events into event_outbox carrying the correlation_id (events may stay draft-domain until activation).
  4. On completion write header status='completed'; on error status='failed' + error_ref.
  5. Guarantee no production mutation in dry-run — assert mutating=false / plan-mode for every command; abort if any component would write business data.
  6. Flag all rows evidence_ref.dry_run=true so discovery scoring excludes them from the verified_candidate bar (a dry-run proves wiring, not the process).

6.4 Best pilot pair

KG producer/verifier pair, because the KG family is the only one with 18/18 complete pairs (v_process_discovery_dot_family_pairs: family='kg', all pair_complete), clean structural start+end, and published D1/D2 docs. Recommended concrete pair: the first KG producer + its paired_dot verifier (a single pair_group from v_process_discovery_dot_family_pairs). One pair is enough to prove the correlation flips a candidate from runtime_missingverified_candidate.

6.5 Execution-readiness checklist (one pair)

  • Apply 02_observation_substrate.sql (operator).
  • Confirm the chosen KG DOT supports plan/verify mode (inspect pg_function + extra_metadata).
  • Wrapper mints process_run_id/correlation_id, writes header.
  • Producer step runs plan-only, logs component row, emits process.run.started/process.step.completed.
  • Verifier step runs verify-only, logs component row, emits process.step.completed/process.run.completed.
  • v_process_discovery_correlation_gaps shows the pair now shares a correlation_id.
  • v_process_discovery_verified_candidates includes the KG pair only if real (non-dry-run) — else it stays a dry-run proof.
  • Zero business mutation verified (birth_registry unchanged; no IU/edge change).

6.6 Default

Until the wrapper exists and a dry-run is proven safe in scope, do not execute. This macro executed nothing.

Back to Knowledge Hub knowledge/dev/reports/architecture/process-discovery-correlation-runtime-inventory-fix-2026-06-04/06-dot-execution-readiness-no-execution.md