KB-437E

IU Core 240x Composer — 06 Final report (PASS)

6 min read Revision 1
dieu44iu-core-mvp240xfinal-reportiu-core-240x-piece-native-authoring-composer-passv0.62026-05-22

IU Core — 240x Piece-Native Authoring / Composer — Final Report

  • Macro: IU_CORE_240X_PIECE_NATIVE_AUTHORING_COMPOSER_TEXTCODE_AUTOCUT_DELIVERY_OPEN_GOAL
  • Date: 2026-05-22
  • Host: MacBook/dev /Users/nmhuyen/iu-cutter-build/repo/iu-cutter
  • Production: VPS vmi3080463, container postgres (postgres:16), DB directus
  • Outcome: IU_CORE_240X_PIECE_NATIVE_AUTHORING_COMPOSER_PASS

1. Final status

IU Core advanced from "metadata + structure ops + text-as-code kickoff" to a piece-native production platform: a file/document/workflow is now a first-class ordered collection of IU pieces, authorable directly from scratch, renderable/validatable by one command, with the auto-cut and text-as-code paths mapped into the same composition model. No external delivery; no production CUT; no execution_enabled flip.

2. What changed

015_piece_native_composer.sql (+rollback) — composer substrate: 2 tables, 3 views, 10 functions, 1 fail-closed gate. runtime/250 (+rollback) — first durable composer pilot. sandbox/100BEGIN…ROLLBACK 12-probe proof. runtime/110 — DOT 68→84. composer.py — the authoring contract + dot_iu_* one-command registry. text_as_code.py — composition-manifest contract. autocut_bridge.pymap_cut_to_compose_request. test_iu_core_240x_composer .py + 4 DOT-count test files updated — 740→792 tests.

3. Repo / branch / HEAD

Branch main; HEAD e8571789e7fbbf (code). KB commit follows. No push/merge/tag.

4. Production backup + gates

Backup /opt/incomex/backups/directus-pre-iucore-240x-20260522T072323Z.dump — 75 919 722 bytes — sha256 1c77d96e831b8b252a0fe892610031baf418325b688a2ddc5a9874edfa4092dd (282 TABLE DATA). All 14 mandatory gates PASS before any mutation.

5. 120x state verification

Re-verified intact (158 IU, iu_structure_operation 57, iu_metadata_tag 330, DOT 68/68, 740 tests, 8 AgentData reports present). No repair needed.

6. No-hardcode / DOT / five-layer

No-hardcode PASS (0 secret/IP/DSN, 0 uuid literal in new code). DOT PASS — runtime/110 84/84, D8 0 drift. Five-layer classified — PG additive; Directus no DDL; Nuxt render-only; AgentData/KB 7 reports; Qdrant no impact.

7-8. Piece-native authoring + composer/collection model

Built (migration 015): a composition references pieces by FK and stores only order + role — no second source of truth. iu_piece_collection + iu_piece_membership + 3 views model a file/document/workflow orthogonal to the cut tree. add/remove/reorder governed, reversible, contiguous.

9. Create file / workflow from pieces

fn_iu_compose is the one-command engine. sandbox/100 proved a file composed from scratch (3 IUs minted via the birth gate) + a workflow from steps + add/ reorder/remove, BEGIN…ROLLBACK. runtime/250 durably composed a pilot document from 3 existing pieces (0 minted).

10. One-command package

10 composer SQL functions = the executable one-command ops; composer.COMPOSER_COMMANDS maps all 11 dot_iu_* names to their SQL function. Each has a verify + rollback/disable path.

11. Three-axis for composed pieces

A composed-from-scratch piece is a real information_unit row — axis A/C automatic, axis B via fn_iu_compose calling fn_iu_metadata_refresh. sandbox/100 M12 proved it enters v_iu_metadata_envelope AND v_iu_content_group. A composition's axis-A source identity is its deterministic manifest_digest + ordered v_iu_collection_manifest.

12. Text-as-code

CollectionManifest — deterministic manifest path/serialization + validate_collection_manifest (fail-closed). Digest proven byte-identical across SQL/composer.py/text_as_code.py. Import non-destructive.

13. Auto-cut bridge

map_cut_to_compose_request maps a CutResult into a composer.ComposeRequest — auto-cut output and a created-from-scratch file converge into the same iu_piece_collection model. Pure mapper, no CUT executed.

14. Delivery seam

Unchanged and inert — delivery_enabled=false, dead letter 0. Composer emits no events this macro. External delivery structurally impossible.

15. Observability

v_iu_collection_health (per-collection flags); fn_iu_collection_healthcheck (corpus); fn_iu_collection_validate (per-collection fail-closed). All proven in sandbox/100.

16. Rollback / disable readiness

rollback/015; runtime/rollback/250; the composer gate closable; membership removals reversible.

17. Tests

792 passed (was 740; +52 in test_iu_core_240x_composer.py; 4 DOT-count test files updated for the 68→84 inventory).

18. KB / AgentData reports

7 reports under v0.6-iu-core-240x-piece-native-authoring-composer-textcode- autocut-delivery-open-goal/, uploaded to AgentData + verified by list_documents + search_knowledge.

19. Exact blockers

None. Two deliberate documented deferrals (not blockers): axis-B inferred-lane semantic inference, and a real text-as-code importer — carried to doc 07.

20. No forbidden action

No external downstream delivery; no production CUT; no broad lifecycle mutation; no ungoverned IU created (the pilot minted 0 IUs); no destructive cleanup; no destructive import; no deploy/restart; no daemon; no cron; no execution_enabled flip; no secret logged; no push/merge/tag. GPT handoff not used as task input.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.6-iu-core-240x-piece-native-authoring-composer-textcode-autocut-delivery-open-goal/06-final-report.md