KB-6AFC
IU Core Structure-Event/Tree Scale — 01 Precheck, survey, backup, gates
3 min read Revision 1
dieu44iu-core-mvpstructure-eventprecheckbackupgatesv0.62026-05-22
01 — Precheck, Survey, Backup, Gates
Macro
IU_CORE_STRUCTURE_EVENT_TREE_AUTOCUT_WORKER_SCALE_OPEN_GOAL — 2026-05-22.
Host + repo
| Check | Value |
|---|---|
| Host | MacBook/dev /Users/nmhuyen/iu-cutter-build/repo/iu-cutter |
| Branch | main |
| HEAD before | 48ec2aa |
| Tree | clean, no remote |
Previous KB report repair
The previous macro (IU_CORE_FIRST_DURABLE_STRUCTURE_OP_SCALE_PASS) reports existed locally but were never uploaded to AgentData — the gap GPT reported. All 5 files repaired (uploaded to AgentData KB): 01-production-survey.md, 02-execution-layer-package.md, 07-structure-op-apply-result.md, 08-final-report.md, 09-next-macro-package.md under .../v0.6-iu-core-first-durable-structure-op-autocut-worker-scale-open-goal/.
Production identity (positive)
| Check | Value |
|---|---|
| Host | VPS vmi3080463 (ssh contabo) |
| Container | postgres (image postgres:16, up 4 weeks, healthy) |
| Role / DB | directus / directus |
| Version | PostgreSQL 16.13 |
| Directus marker | directus_collections = 164 |
| IU surface | information_unit 158, unit_version 165, iu_tree_path 158 |
Pre-macro state survey
- information_unit 158 live, 1 nested (the runtime/140 first reparent), 157 flat.
- iu_structure_operation 1 (enacted), iu_relation 1 (active contains).
- event_outbox iu-domain = 0 (no organic IU event yet — the gap).
- iu_route_attempt 0, iu_route_dead_letter open 0.
- Gates: iu_core.routes_master_enabled=true, iu_core.route_worker_enabled=true, iu_core.structure_ops_enabled=false.
- Gateway: iu_create.gateway.allowed_marker_values includes fn_iu_structure_op; marker_key=app.canonical_writer.
Backup
pg_dump -Fc -> /opt/incomex/backups/directus-pre-iucore-structevent-20260522T015648Z.dump — 75 452 212 bytes — sha256 602e3e7d62179a9e2af0109ce7431f7950ccc5f6b61278a7e7d7195102054383. Verified: pg_restore --list reports 279 TABLE DATA entries (valid archive).
Mandatory gates — all PASS before any production mutation
- Host correct (MacBook repo, clean tree). 2. Target identity positive (DB directus, PG 16.13, 164 collections). 3. Fresh backup + sha verified.
- Previous KB report gap repaired (5 files uploaded). 5. DOT baseline runtime/110 41/41 PASS, no-hardcode SQL scan clean, 637 tests pass.
- Candidate batch selected by live discovery (see 03). 7. Batch bounded + reversible (18 single-row reparents, one document). 8. Rollback/compensation authored before apply (runtime/rollback/170). 9. Gateway write-guard path legitimate (fn_iu_structure_op registered). 10. Worker dry-run-safe (delivery seam RAISES). 11. Disable path known (close gates / rollback/170).
- runtime/110 verifies post-change visibility (43/43 PASS).