KB-5F91

IU Core 480x — 07 Next macro package

4 min read Revision 1
dieu44iu-core-mvp480xnext-macroproduction-applyintegrated-autocutv0.62026-05-22

07 — Next Macro Package

State at handoff

  • Code commit 9025911 on main (parent bdf6559); KB commit f1349b3. 843 tests.
  • Production directus DB is at migrations 001–015 + the runtime layer through 250DOT 84/84, unchanged this macro.
  • Authored, not yet applied: migration 016, runtime/260, runtime/270 (post-apply DOT 104/104).
  • Durable iu-tree/ text-as-code export committed (corpus 158 IUs + pilot collection manifest).

The one blocker (exact)

The 480x durable production apply is blocked on tooling, not safety. This session's MCP surface has no pg_dump (mandatory gate 3) and no DDL-execution path (query_pg is read-only). The apply must run from a host with psql + pg_dump access to the production directus DB.

Apply runbook — the FIRST next macro (IU_CORE_480X_PRODUCTION_APPLY)

Run from a host with production DB access; all files are self-transacted:

  1. Backuppg_dump -Fc the directus DB; record bytes + sha256; pg_restore -l must list a valid PGDMP header. (Mandatory gate 3.)
  2. Apply sql/iu-core/016_composer_event_wiring.sql.
  3. Apply sql/iu-core/runtime/260_composer_event_family_register.sql — verify R1 (8 event types active) + R2 (8 routes enabled+dry_run).
  4. Run sql/iu-core/sandbox/110_composer_event_workflow_probe.sqlBEGIN...ROLLBACK, every _probe row pass=true, SANDBOX_110_VERDICT all_pass=true.
  5. Apply sql/iu-core/runtime/270_composed_from_scratch_collection.sql — verify R270: collection present, 2 pieces, 2 IUs minted, composer events emitted (1 collection_created + 2 piece_added + 1 collection _rendered), gate closed.
  6. Run sql/iu-core/runtime/110_iu_core_dot_conformance_scan.sql — D9 must report 104/104, D8 drift guard 0 rows.
  7. Disable path if needed: rollback/016, runtime/rollback/260, runtime/rollback/270.

Open gaps carried forward

  1. Durable apply — the runbook above (the immediate next macro).
  2. First integrated production auto-cut run — drive a real orchestrator CutResult through build_autocut_compose_approval_package -> fn_iu_compose durably; the approval package (doc 04) is the contract.
  3. External delivery gate — every composer route is dry_run=true; a dry_run=false delivery into the internal seam is a separate sovereign macro (fn_iu_route_deliver is still the controlled internal-only path).
  4. Text-as-code controlled import/applypropose_collection_import is fail-closed and non-destructive; a real durable importer (parse -> propose -> gated apply) is a separate macro. IMPORT_IS_DESTRUCTIVE stays False until then.
  5. Axis-B inferred lane — still 0 rows; needs a deterministic classifier (carried from 120x/240x).
  6. UI / Directus / Nuxt surfacev_iu_composer_event_backlog / v_iu_collection_export_status / v_iu_collection_manifest are ready to power a composition observability + file-builder UI.
  7. Qdrant / vector synciu-tree/_corpus/corpus-manifest.md + the per-collection manifests are natural deterministic units to vector-index.

IU_CORE_960X_PRODUCTION_APPLY_AND_INTEGRATED_AUTOCUT — combine the apply runbook (gap #1) with the first integrated production auto-cut run (gap #2): back up, apply 016 + 260 + 270, prove DOT 104/104, then drive one real orchestrator cut through the approval package into fn_iu_compose durably, with the composer event family observing it on the bus. Both halves are additive, reversible, and already designed by this macro — 960x = the 480x apply slice + the integrated-autocut slice.

Alternatives if production access stays unavailable: the text-as-code controlled importer (gap #4) and the axis-B inference pass (gap #5) are both fully repo-side and need no production mutation.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.6-iu-core-480x-composer-event-textcode-roundtrip-production-readiness-open-goal/07-next-macro-package.md