KB-38AB

IU Core 500x — 01 Precheck, survey, backup, gates

4 min read Revision 1
dieu44iu-core-mvp500xprechecksurveybackup-gatev0.62026-05-22

01 — Precheck, live survey, backup, gates

  • Macro: IU_CORE_500X_DOT_ONE_COMMAND_COMPOSER_PRODUCTION_CLOSEOUT_OPEN_GOAL
  • Date: 2026-05-22
  • Host: MacBook/dev /Users/nmhuyen/iu-cutter-build/repo/iu-cutter
  • Production: VPS vmi3080463 (ssh contabo), container postgres (postgres:16, server 16.13), DB directus, role directus.

1. Host + tools

The blocker the 480x macro recorded — "no pg_dump / DDL-execution tool" — is resolved this session. The MacBook host has git, python3, psql 16, pg_dump 16, and SSH access to the VPS. SQL is applied by piping each self-transacted file through ssh contabo 'docker exec -i postgres psql -U directus -d directus -v ON_ERROR_STOP=1'. Gate 1 PASS.

2. Production identity

docker exec postgres psql -U directus -d directus returns current_database = directus, information_unit count 158, server PostgreSQL 16.13 — matches the 480x final report exactly. Gate 2 PASS.

3. 480x state verification

Production was surveyed read-only before any change:

  • 480x objects absentfn_iu_emit_collection_event 0, fn_iu_collection_checkpoint 0, v_iu_composer_event_backlog 0, v_iu_collection_export_status 0.
  • 240x surface intact — iu_piece_collection 1, iu_piece_membership 3, iu_metadata_tag 330, information_unit 158.
  • runtime/110 DOT scan: 84/84, every D9 class ok, D8 drift guard 0 rows. (config 6 / event_type 7 / function 34 / route 8 / table 14 / trigger 3 / view 12.)
  • 843 tests pass locally (480x baseline).
  • The 7 480x AgentData reports verified present via list_documents.

Production was exactly at the 240x surface, the 480x package authored but not applied — as the 480x handoff stated. No repair needed.

4. Package integrity

016 (+rollback), runtime/260 (+rollback), runtime/270 (+rollback), sandbox/110 — all present, all self-transacted, all additive / idempotent. Inspected: migration 016 is CREATE OR REPLACE only (no ALTER/DROP/data); runtime/260 is ON CONFLICT DO NOTHING; runtime/270 is idempotent on the collection_key. Gate 5 PASS.

5. Backup — Gate 3 PASS

pg_dump -Fc of the directus DB:

  • Path: /opt/incomex/backups/directus-pre-iucore-500x-20260522T083543Z.dump
  • Size: 75,979,656 bytes
  • sha256: d800f6d539970b10b4e58066092318892ae6871303222c4a91c85448544ee5db
  • Verified: pg_restore -l reads a valid PGDMP archive — 3113 TOC entries, dbname: directus, gzip compression.

6. Gate summary

All 14 mandatory gates PASS before the first production mutation: correct host+tools, target identity, fresh verified backup, DOT/no-hardcode baseline clean, package integrity, bounded+reversible operation, rollback files present, registry-backed vocabulary, governed birth gate, tree consistency, worker dry-run-only, fail-closed import, known disable path, AgentData report path. The 480x deferral is closed: a host with pg_dump + DDL exec was the only thing missing, and this session has it.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.6-iu-core-500x-dot-one-command-composer-production-closeout-open-goal/01-precheck-survey-backup.md