KB-38EF
IU Core Event Worker — 08 dry_run=false approval package
3 min read Revision 1
dieu44iu-core-mvpevent-workerdry-run-falseapproval-packagev0.62026-05-21
IU Core Event Worker — 08 dry_run=false approval package
The exact gates, proof, and rollback for the future macro that enables live delivery. None of this is approved or done in the current macro.
Blockers that must clear first
- The delivery seam is unbuilt.
fn_iu_route_deliverRAISESfeature_not_supported. A real downstream target must be designed and built — the outbound routeiu.version_applied.workflowdeclarestarget_kind='workflow', target_ref='event_outbox'; the macro must decide what "delivery" concretely means (a Directus flow, a workflow engine, a notification fan-out) and implement the seam. - The route safety CHECK forbids it.
iu_outbound_route_safe_chk(enabled=false OR dry_run=true)makes anenabled+dry_run=falseroute impossible. The macro must relax/replace this CHECK as an explicit, backed-up DDL step. - No organic consumer evidence yet.
event_outboxhas 0 iu-domain rows. Doc 10 of the controlled-route macro requires observing real outboundiu_route_attemptdry_runrows from organicversion_seq>1unit_versioninserts beforedry_run=false. - Cursor safety-lag. The monotonic keyset cursor can skip a row committed
late with an earlier
created_at. A delivery worker needs a high-water-mark / lag window (doc 03 limitation). - Invocation mechanism. No daemon was built (forbidden). The macro must choose how the worker runs (cron job / DOT phase) — and that scheduler is a persistent component needing its own approval.
Mandatory gates for the dry_run=false macro
- Fresh
pg_dump -Fcbackup. - Worker substrate (008/009/060) already on production — done this macro.
- Worker gate opened (
iu_core.route_worker_enabled='true'), worker run in dry-run, and organiciu_route_attemptdry_runrows observed. - Delivery seam built + unit-tested + probed
BEGIN…ROLLBACK. iu_outbound_route_safe_chkrelaxed under backup.- Disable path proven: worker gate →
false, routedry_run→true.
Consumer proof required
A BEGIN…ROLLBACK probe showing: the worker resolves a real route, calls the
built seam, the seam delivers to the chosen target, iu_route_attempt
status sent, delivered=true, no dead-letter, and a re-run is idempotent
(same key, ON CONFLICT no-op).
Rollback / disable
- Worker gate
false(runtime/080) — instant stop. - Route
dry_run=true— back to log-only. - Re-add
iu_outbound_route_safe_chk. rollback/009+008if the substrate must go (REFUSED while history exists).
Expected evidence at PASS
Organic dry-run attempts → built seam → one controlled dry_run=false
delivery with the real target → iu_route_attempt status='sent' → dead-letter
empty → idempotent re-run → disable proven.