KB-77DF

IU Core 2400x — Next macro package + handoff state

6 min read Revision 1
iu-core2400xdieu44next-macrohandoffverification-gate

07 — Next macro package

1. State at handoff

  • Code commit 1c652d2 on main (parent a71d225).
  • 1114 tests (+21 net over 2000x).
  • Production directus DB: migrations 001-022 + runtime 010-320.
  • DOT 132 / 132 (table 20, view 21, function 49, trigger 3, config 8, event_type 15, route 16).
  • information_unit 163 (60 enacted / 91 draft / 12 deprecated).
  • iu_three_axis_envelope (new managed read table) populated with 163 rows, in_sync=true.
  • Qdrant iu_core_iu_chunks 61 points (60 unique IUs, KT-B split into 2 chunks under the per-IU boundary rule). All payloads carry unit_id + chunk_index + chunk_count + source_kind='iu' + source_axis_ref + semantic_axis_ref + hierarchy_axis_ref.
  • iu_vector_sync_point 64 rows total: 3 dryrun grandfather + 61 indexed (last_actor='iu_core_2400x_full_reindex').
  • Directus: iu_three_axis_envelope collection registered (managed table, 18 fields visible — 16 IU + 2 provenance), Administrator READ permission active, GET /items/... serves real rows.
  • iu_qdrant_collection_registry 1 row (iu_core_iu_chunks, status='active').
  • All write gates closed at end: composer / delivery / operator_runtime / structure_ops / vector_sync = false; routes_master / route_worker = true (live + dry-run-only).

2. No unsafe state

  • Backup directus-pre-iucore-2400x-20260523T061016Z.dump sha 4e83efe...185218e0 is the rollback anchor.
  • Vector-sync gate is false; future writes refused at the DB-fn layer until reopened.
  • All 61 Qdrant points addressable by deterministic UUIDv5 via the rollback driver (DELETE /collections/iu_core_iu_chunks/points/<uuid>).
  • The promoted table is a refreshable derived cache, not a source of truth — DELETE FROM iu_three_axis_envelope is safe and the next refresh repopulates from the view.

3. Open gaps carried forward

  1. Nuxt env flip + redeploy. The Directus collection name changed from v_ui_iu_three_axis_envelope to iu_three_axis_envelope. Operator action: set IU_CORE_DIRECTUS_COLLECTION in the Nuxt runtime config and redeploy incomex-nuxt. The 1500x assembly contract already supports the override.

  2. Auto-refresh hook (optional). iu_three_axis_envelope is currently a manual-refresh cache (re-call fn_iu_three_axis_envelope_refresh after IU mutations). A future macro can wire the refresh to the iu.lifecycle.enacted event so the cache stays in sync without operator intervention. The drift check already provides the safety net.

  3. Summary / collection-level vectors (iu_core_summary). The binding boundary rule says per-IU and summary vectors must live in separate collections. The registry supports this via purpose; iu_core_summary is not yet registered. A future macro can add it if a retrieval use case requires document-level retrieval.

IU_CORE_3000X_NUXT_REDEPLOY_AND_AUTO_REFRESH_HOOK — two slices:

Slice A — Nuxt env + redeploy verification

  1. Set IU_CORE_DIRECTUS_COLLECTION=iu_three_axis_envelope in the Nuxt runtime config (operator-supervised).
  2. Trigger incomex-nuxt rebuild + restart.
  3. Smoke-test the IU admin screen against live Directus reads (the three axes should render without any code change).

Slice B — Auto-refresh hook (optional, additive)

  1. Add migration 023: a trigger on unit_version (or on iu_metadata_tag) that calls fn_iu_three_axis_envelope_refresh after enacted_at IS NOT NULL flips. Lighter alternative: an event-driven worker on iu.version_applied.
  2. Add a healthcheck CLI that runs the drift check + reports minutes-since-last-refresh.

Either slice can ship independently.

5. Alternative smaller slices

  • IU_CORE_2500X_REFRESH_HEALTHCHECK_ONLY — register a dot_iu_three_axis_envelope_drift_check operator command + a cron policy (operator-gated cron, not by IU Core). No DDL.
  • IU_CORE_2600X_SUMMARY_COLLECTION_REGISTRATION — register iu_core_summary (dim 1536, Cosine, purpose='iu_core_summary') via fn_iu_qdrant_collection_register. No vectors written.

6. Is IU Core ready to ship?

Yes — externally integrated. Every layer the IU Core code owns is complete and proven against the live VPS:

  • migration spine 001-022 + runtime 010-320 on prod;
  • DOT 132/132;
  • 1114 tests;
  • Qdrant per-IU collection live with 60/60 IU coverage and 3-layer boundary enforcement;
  • Directus managed collection with REST reads working;
  • internal delivery / text-as-code / operator runtime gates inert and reversible.

What remains is operator deploy (Nuxt env flip + redeploy) — not an IU Core code gap.

7. Verification gate before the next macro

The next macro should start only after GPT/User has verified via AgentData list_documents + search_knowledge that the 7 reports in this directory are present and searchable, AND that production reports:

  • Qdrant iu_core_iu_chunks carries 61 points (unique_unit_ids = 60; KT-B split into 2 chunks);
  • PG iu_vector_sync_point carries 61 rows with sync_status='indexed' and last_actor='iu_core_2400x_full_reindex';
  • dot_config.iu_core.vector_sync_enabled = false;
  • Directus /items/iu_three_axis_envelope?limit=2 returns HTTP 200 with axis_a / axis_b / axis_c fields populated;
  • DOT scan returns 132/132;
  • 1114 tests passing on commit 1c652d2.
Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.6-iu-core-2400x-directus-promotion-full-qdrant-reindex-open-goal/07-next-macro-package.md