KB-1082

IU Core 240x Composer — 05 DOT, no-hardcode, five-layer

3 min read Revision 1
dieu44iu-core-mvp240xdotno-hardcodefive-layerv0.62026-05-22

05 — DOT / no-hardcode / five-layer

DOT — PASS, 84/84

Migration 015 adds 2 tables + 3 views + 10 functions + 1 config gate. runtime/110's SSOT inventory _iu_core_expect and the D9 verdict counts were bumped in the SAME commit: table 12→14, view 9→12, function 24→34, config 5→6. The D8 drift-guard table shape gained iu\_piece%.

runtime/110 live scan after all changes — D9 conformance:

class expected found ok
table 14 14 t
view 12 12 t
function 34 34 t
trigger 3 3 t
config 6 6 t
event_type 7 7 t
route 8 8 t

84/84 PASS, D8 drift guard 0 rows.

No-hardcode — PASS

  • 015_piece_native_composer.sql — 0 uuid literal, 0 secret/api-key/DSN/IP. The collection_kind / piece_role / source_axis_kind / lifecycle_status sets are CHECK-constrained domain vocabulary.
  • runtime/250 discovers its document + pieces by live query (GROUP BY doc_code ORDER BY count(*), ORDER BY sort_order) — nothing baked.
  • sandbox/100 uses gen_random_uuid() for probe addresses.
  • composer.pyCOMPOSER_COMMANDS / vocabulary frozensets are contract constants; no DSN/host/secret.
  • Repo-wide scan of the new files: 0 secret / DSN / api-key / private-key / IP; 0 uuid literals in 015 / runtime/250 / composer.py / text_as_code.py.

Five-layer sync

Layer Impact
PG Real additive change: migration 015 (2 tables / 3 views / 10 functions / 1 config); runtime/250 (+1 collection, +3 memberships). No information_unit / tree / metadata / route change.
Directus No collection/field DDL — iu_piece_collection / iu_piece_membership are IU-core sidecar tables. No Directus-collection data change.
Nuxt Render-only — the composer read surfaces (v_iu_collection_manifest / _envelope / _health, fn_iu_collection_render) can power a future file-builder UI. No component contract change.
AgentData / KB This macro's 7 reports under v0.6-iu-core-240x-piece-native-authoring-composer-textcode-autocut-delivery-open-goal/, uploaded + list/read/search-verified.
Qdrant / vector No impact. A composition's manifest_digest + ordered piece set is a natural future vector-indexing unit; deferred.

Reversibility

  • Migration 015 → rollback/015 (drops all 16 objects + the gate; refuses a non-empty table).
  • The runtime/250 pilot → runtime/rollback/250 (deletes the 3 memberships + 1 collection; information_unit untouched).
  • Gate dot_config 'iu_core.composer_enabled'false by default; closing it makes every mutating composer function refuse.
  • iu_piece_membership removals reversible; iu_piece_collection rows can be deprecated/retired.
Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.6-iu-core-240x-piece-native-authoring-composer-textcode-autocut-delivery-open-goal/05-dot-nohardcode-fivelayer.md