KB-F3A6

IU Core 120x Three-Axis — 07 Final report (PASS)

7 min read Revision 1
dieu44iu-core-mvp120xfinal-reportiu-core-120x-three-axis-metadata-scale-passv0.62026-05-22

IU Core — 120x Three-Axis Metadata / Delivery / Auto-cut / Text-as-Code — Final Report

  • Macro: IU_CORE_120X_THREE_AXIS_METADATA_DELIVERY_AUTOCUT_TEXTCODE_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_120X_THREE_AXIS_METADATA_SCALE_PASS

1. Final status

IU Core advanced from "operational substrate + delivery seam" to a metadata layer rich enough to filter / group / thread the IU corpus along three axes — original-text reconstruction, semantic content, and hierarchy — plus the non-reparent rollout completed and the text-as-code layer kicked off. No external delivery; no production CUT; no execution_enabled flip.

2. What changed

Repo — commit bf05cc5 (parent e789bff), +1408/-18, 12 files

  • 014_three_axis_metadata.sql (+ rollback) — 2 tables, 3 views, 3 functions: the three-axis metadata layer.
  • runtime/230_metadata_enrichment_populate.sql (+ rollback) — derived-tag population over the whole corpus.
  • runtime/240_durable_deprecate_scratch_batch.sql — the non-reparent rollout (11 scratch IUs).
  • sandbox/090_three_axis_metadata_probe.sqlBEGIN…ROLLBACK 7-probe proof.
  • runtime/110 — DOT SSOT inventory 60 → 68.
  • text_as_code.py — the text-as-code export/diff/import contract.
  • test_iu_core_120x_three_axis.py + 3 updated test files — 712 → 740.

Production directus DB (durable)

  • Migration 014 applied — the three-axis layer built.
  • runtime/230 — 17 classifier vocabulary keys + 330 derived tags over all 158 IUs.
  • runtime/240 — 11 durable deprecate_piece ops (the remaining stale scratch IUs); deprecate_piece total 1→12.
  • runtime/150 — 11 dry_run worker attempts on the new structure events.
  • Result: iu_structure_operation 46→57, event_outbox iu 45→56, iu_route_attempt 45→56 (55 dry_run + 1 sent), iu_metadata_tag 330, iu_metadata_tag_registry 17, lifecycle 12 deprecated/86 draft/60 enacted, iu_route_dead_letter 0.

3. Repo / branch / HEAD

Branch main; HEAD e789bffbf05cc5 (code) → 95c4913 (KB reports). No push/merge/tag.

4. Production backup + gates

Backup pg_dump -Fc/opt/incomex/backups/directus-pre-iucore-120x-20260522T065235Z.dump — 75 747 731 bytes — sha256 38ba6ffdb2792d9e82722019cb0f703dd2abc51f3ceafc4ad0fe82d6b4cc6900 (280 TABLE DATA entries verified). All 14 mandatory gates PASS before any mutation.

5. 60x state verification / repair

The 60x durable state was re-verified intact (iu_structure_operation 46, iu_tree_change_log 1, 1 sent attempt, 0 dead-letter, DOT 60/60, 712 tests). The 60x KB reports are present in AgentData. No repair needed.

6. No-hardcode / DOT / five-layer

  • No-hardcode: PASS — 0 secret/IP, 0 uuid literals in 014/230/240; vocabulary discovered, not baked.
  • DOT: PASS — runtime/110 live scan 68/68, D8 0 drift.
  • Five-layer: classified (doc 06) — PG real change; Directus data-only; Nuxt render-only; AgentData/KB reports; Qdrant no impact (the inferred lane is the future vector bridge).

7. Three-axis metadata model result

Built (migration 014): 2 tables + 3 views + 3 functions. No second source of truth — axis A is a pure projection, axis C reads existing tables, only axis B (semantic tags) stores new FK-guarded rows. DOT-visible (68/68). See doc 02.

8. Original-text reconstruction evidence (axis A)

fn_iu_reconstruct_source('DIEU-35') returned 36 pieces in original sort_order order, 0 gaps. The whole 3-document corpus reconstructs gap-free and duplicate-free. See doc 03 M1.

9. Semantic / content axis evidence (axis B)

v_iu_content_group group doc:DIEU-35 = 36 members, 3 tag_kinds, 0 unregistered tags. 330 derived tags over 158 IUs from 17 registry-backed vocabulary keys; enrichment_source separates derived from inferred. See doc 03 M2.

10. Hierarchy axis evidence (axis C)

fn_iu_subtree('D38-DIEU35-S6') = 8 units (self + 7 descendants); tree globally acyclic; v_iu_metadata_envelope carries parent/depth/root/child count for all 158 IUs. See doc 03 M3.

11. Metadata populate / refresh result

runtime/230 populated 330 derived tags (additive, idempotent — ON CONFLICT re-derives). sandbox/090 M6 proved idempotency (330 → 330 on re-refresh). Reversible via runtime/rollback/230. See doc 03.

12. Non-reparent rollout result

runtime/240 durably deprecated the 11 remaining stale scratch IUs; deprecate_piece total now 12; 0 scratch IU remains draft. runtime/150 captured 11 durable dry_run worker attempts — first durable worker dry-run evidence for the non-reparent event family. See doc 04.

13. Delivery seam / internal delivery result

Unchanged and inert — fn_iu_route_deliver delivers ONLY to the internal fn_iu_structure_consumer, triple-gated; iu_core.delivery_enabled=false. External delivery blocked. Broader durable internal delivery is proven safe (sandbox/080 D7) but deliberately not exercised durably here. See doc 04.

14. Auto-cut bridge result

sandbox/090 M7 proved an auto-cut-mapped add_new_piece applies, is metadata-refreshed, and enters all three axes (envelope + content group), BEGIN…ROLLBACK. No production CUT. See doc 05.

15. Text-as-code kickoff result

text_as_code.py — deterministic export layout, diff contract, fail-closed non-destructive import-validate contract. Read-only export proof: the full 158-IU corpus exported to 158 collision-free deterministic files, self-diff empty, import validation ok, import executes=False. See doc 05.

16. Rollback / disable readiness

rollback/014, runtime/rollback/230; per-op fn_iu_structure_op_rollback for the 11 deprecate ops; iu_metadata_tag truncatable + rebuildable; all gates closable. See doc 06.

17. Tests

740 passed (was 712; +28 in test_iu_core_120x_three_axis.py; 3 DOT-count tests updated for the 60→68 inventory).

18. KB / AgentData reports

8 reports under v0.6-iu-core-120x-three-axis-metadata-delivery-autocut- textcode-open-goal/, uploaded to AgentData and verified by list_documents (count 8) + search_knowledge (final report retrievable).

19. Exact blockers

None. Every objective branch completed durably or with proof.

20. No forbidden action

No external downstream delivery; no production CUT; no broad lifecycle mutation; no ungoverned IU created durably; no destructive cleanup; 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-120x-three-axis-metadata-delivery-autocut-textcode-open-goal/07-final-report.md