IU Core Runtime Activation — 05 Runtime layer apply (010/020/030/040)
IU Core Runtime Activation E2E — 05 Runtime layer apply
All applied via docker exec -i 22540b78de8f psql -U directus -d directus -v ON_ERROR_STOP=1 -f -. Each file is self-transacted (BEGIN…COMMIT).
runtime/010 — event-type seed
INSERT 0 1 — registered (iu, version_applied, event_stream='update', delivery_lane='immediate', active=true) in event_type_registry.
ON CONFLICT (event_domain,event_type) DO NOTHING → idempotent.
runtime/020 — route seed (inert)
INSERT 0 1 ×2 — seeded:
- outbound
iu.version_applied.workflow—enabled=false, dry_run=true, fail_closed=true - inbound
iu_sql.iu_sql_link.insert—enabled=false, dry_run=true, fail_closed=true
The (enabled = false OR dry_run = true) CHECK makes an enabled+live route
impossible to seed.
runtime/030 — trigger attach
Both CREATE TRIGGER succeeded:
trg_iu_out_versionAFTER INSERTonpublic.unit_version→fn_iu_outbound_on_version()trg_iu_sql_in_iu_sql_linkAFTER INSERTonpublic.iu_sql_link→fn_iu_sql_link_inbound_capture()
evt_trigger_guard_ddl fired (log-only) — 2 [TRIGGER-GUARD] WARNINGs and 2
audit rows added to trigger_guard_alerts (keyed by full object identity,
e.g. trg_iu_out_version on public.unit_version). Harmless audit side-effect.
No name collision: neither target name pre-existed; public.iu_sql_link had 0
triggers; public.unit_version had 4 (none named trg_iu_out_version).
Note: a separate sandbox_tac.unit_version table exists with its own
trg_sbx_uv_before_insert — unrelated to public.unit_version.
runtime/040 — verification (read-only, BEGIN…ROLLBACK)
| Check | Result |
|---|---|
| V1 event type | (iu, version_applied, update, immediate, active=t) |
| V2 routes | both enabled=f, dry_run=t, fail_closed=t |
| V3 triggers | trg_iu_out_version, trg_iu_sql_in_iu_sql_link attached, tgenabled=O |
| V4 master gate | <absent>, fn_iu_core_routes_enabled()=f |
| V5 H3 fix | uses_registry_stream, no_hardcoded_workflow, uses_safe_metadata all true |
| V6 route attempts | 0 rows |
Steps 0–3 of runtime/README.md complete. Behaviour change occurs only at
the (separate, not-yet-run) route-enable and master-gate-open steps.