KB-476E

IU Core Controlled Route — 10 Next macro package

3 min read Revision 1
dieu44iu-core-mvpcontrolled-routenext-macroapproval-packagev0.62026-05-21

IU Core Controlled Route — 10 Next macro package

IU Core is now in controlled dry-run live runtime: master gate open, outbound route enabled=true, dry_run=true, structure tree bootstrapped. The two behaviour-changing steps that remain are gated.

The blocker for dry_run=false is not a flag — it is a missing consumer. event_outbox is an unconsumed append-only log (doc 06). Before any dry_run=false:

  1. Design + build a route worker that reads event_outbox (filtered to event_domain='iu'), resolves iu_outbound_route by event type, and — while the route is dry_run=truelogs a delivery decision without delivering, writing an outbound iu_route_attempt row (route_kind='outbound', status='dry_run').
    • Note: the outbound path currently writes no iu_route_attempt row (only the inbound trigger does). The worker is what closes the outbound audit loop.
    • The worker needs an offset/cursor (own table) since event_outbox has no delivery-state columns.
  2. Observe real outbound iu_route_attempt dry-run rows from organic unit_version inserts (version_seq > 1).
  3. Only then a further macro flips dry_run=false for live delivery, with the worker honouring the flag.

Alternative next macros

  • Structure-ops production enablement — exercise add/split/merge/ deprecate/reparent against the real 158-IU tree under the gateway guard, writing iu_structure_operation + iu_relation lineage and maintaining iu_tree_path. The substrate (004/006) and the bootstrap (050) are ready.
  • Defer — the controlled dry-run live state is stable and safe to leave as-is; organic unit_version inserts (version_seq > 1) will enqueue event_outbox rows that harmlessly accumulate undelivered.

Mandatory pre-work for the dry_run=false macro

  • Fresh pg_dump -Fc backup.
  • A working, verified route worker (item 1 above).
  • A decision on event_outbox retention/cursoring, since the table is a shared append-only log (92k+ rows) with no delivery-state columns.

Forbidden until then

dry_run=false, downstream workflow delivery, external worker activation, lifecycle mutation of existing IUs.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.6-iu-core-controlled-route-mastergate-structure-observability-open-goal/10-next-macro-package.md