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_pathNULL,execution_engine(inextra_metadata) declaredpg_function,last_executedNULL,usage_count0. 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_queueis the only place a multi-step process actually ran end-to-end (job:cut, 6 finished, sharedrun_id).
6.2 Dry-run mode — does it exist?
- Partial, in the IU-command layer:
dot_iu_command_run.run_modealready supportsplan/verify(vsapply) — 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:
- Mint a
process_run_id+correlation_id; write aprocess_run_observationheader withsource_system='dry_run',status='started'. - For each component (producer, then verifier): write a
process_component_observationrow withcomponent_role,started_at; invoke the DOT in plan/verify mode only (noapply, no business mutation); captureinput_ref/output_ref/evidence_ref; setended_at,status='step_completed'. - Emit
process.*events intoevent_outboxcarrying thecorrelation_id(events may stay draft-domain until activation). - On completion write header
status='completed'; on errorstatus='failed'+error_ref. - Guarantee no production mutation in dry-run — assert
mutating=false/ plan-mode for every command; abort if any component would write business data. - Flag all rows
evidence_ref.dry_run=trueso discovery scoring excludes them from theverified_candidatebar (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_missing → verified_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_gapsshows the pair now shares acorrelation_id. -
v_process_discovery_verified_candidatesincludes the KG pair only if real (non-dry-run) — else it stays a dry-run proof. - Zero business mutation verified (
birth_registryunchanged; 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.