KB-6C5F

91000x · 01 — Baseline + Backup (Phase A PASS)

5 min read Revision 1
iu-core91000xbaselinebackuppg-dump2026-05-26

91000x · 01 — Baseline + Backup

Phase: A
Status: PASS
Date: 2026-05-26

Apply channel preflight (re-verified)

ssh contabo "docker exec postgres psql -U workflow_admin -d directus -At -c 'SELECT current_user, current_database(), now();'"
→ workflow_admin|directus|2026-05-26 01:04:31.396501+00

Channel held: workflow_admin via Docker container postgres (uptime 5 weeks, healthy), database directus, Unix socket trust per pg_hba ([[feedback-pg-hba-local-trust-unblocks-role-channel]]).

Docker landscape (verified live)

10 containers Up + healthy: incomex-agent-data, incomex-claude-kb, incomex-claude-mcp, incomex-directus, incomex-nginx, incomex-nuxt, incomex-qdrant, pg-restore-test-…, postgres, uptime-kuma.

Database landscape

postgres / workflow / directus / incomex_metadata

Mission scope = directus. Memory drift NOTE: report 07 of 90000x referenced directus.production_documents — that table does not exist in directus DB (nor in workflow DB). No production_documents anywhere reachable from this channel ⇒ the "do not touch production_documents" rule is honored by structural absence.

NVSZ live state (Phase A read-only)

Object Live state
iu_core schema exists
iu_core.iu_staging_record table exists with 9 CHECK/UNIQUE/PK constraints, 23 columns, 3 rows pre-apply
iu_core.iu_staging_payload table exists with 6 constraints, 11 columns, 4 rows pre-apply
entity_species SPE-NVS id=51 (column is code, NOT entity_code — memory drift)
collection_registry COL-IUS-001 id=190
collection_registry COL-IUS-002 id=191
v_collection_vector_eligibility[190] vector_eligible=false, semantic_search_eligible=false, has_explicit_policy=true
v_collection_vector_eligibility[191] vector_eligible=false, semantic_search_eligible=false, has_explicit_policy=true
iu_vector_sync_point rows 152 (none reference staging — structurally impossible, no staging_record_id col)
public.information_unit rows 175
dot_iu_command_catalog rows 30
iu_core_retention_policy rows 6 (D36 Macro A pre-existed; memory said 4 but live had 6)

Existing staging rows (D36 Macro A carry-forward, all created 2026-05-25 12:51 UTC)

staging_record_id kind lifecycle created_at expires_at age
ad475013-fa4c-4b95-972c-19ae9db8c3e7 sql_snapshot pending 2026-05-25 12:51 2026-06-24 12:51 12h13m
c3f3f073-24a4-4ed2-b9e9-88f45a11b322 mark_manifest consumed 2026-05-25 12:51 2026-06-01 12:51 12h13m
9574a239-11df-4fe2-bf5d-93c92c60abd7 nosql_payload rejected 2026-05-25 12:51 2026-06-01 12:51 12h13m

All within 15-day window ⇒ cleanup dry-run expected to return 0 eligible (confirmed post-apply).

Live fn_iu_* signature inventory (Phase A)

Function Live signature Used in 040/041?
fn_iu_create (p_canonical_address text, p_title text, p_body text, p_actor text, p_unit_kind text DEFAULT NULL, p_section_type text DEFAULT NULL, p_owner_ref text DEFAULT NULL, p_publication_type text DEFAULT NULL, p_parent_ref uuid DEFAULT NULL) RETURNS jsonb Yes (040) — DRIFT
fn_iu_collection_add_piece (p_collection_id uuid, p_iu_id uuid, p_piece_order integer, p_piece_role text, p_actor text) RETURNS jsonb Yes (040) — DRIFT
fn_iu_composer_enabled () RETURNS boolean Yes (040) — match
fn_iu_subtree (p_root uuid) RETURNS TABLE(iu_id uuid, canonical_address text, depth integer, parent_id uuid, relative_depth integer) Yes (041) — match
fn_iu_reconstruct_source (p_doc_code text) RETURNS TABLE(source_position bigint, …) Documentation only in 041
fn_iu_staging_healthcheck () RETURNS jsonb No
fn_iu_core_retention_cleanup (p_actor text, p_dry_run boolean) No (replaced by fn_iu_staging_cleanup)

Backup

docker exec postgres pg_dump -U workflow_admin -Fc -d directus -f /tmp/pre-91000x-20260526T010854Z.dump
→ -rw-r--r-- 1 root root 79M  /tmp/pre-91000x-20260526T010854Z.dump (82,096,758 bytes)

Backup is custom-format (-Fc); restore via pg_restore -d directus /tmp/pre-91000x-20260526T010854Z.dump.

Rollback per migration is also documented in 90000x reports 02-04 and 06-rollback-package.md of this pack.

Verdict

Phase A is PASS. Baseline captured, backup taken, channel held, NVSZ base present, no production_documents in reachable DBs.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.6-iu-core-91000x-apply-mark-to-cut-pipeline-and-proof/01-baseline-and-backup.md