KB-7DE1

01 — Live Preflight (Hard Gate 0) & Backup (Phase-1 Test-Mode Build, 2026-06-02)

4 min read Revision 1
one-roof-governancephase1test-mode-buildpreflightbackup2026-06-02

01 — Live Preflight (Hard Gate 0) & Backup

READ-ONLY preflight via MCP query_pg. All values 2026-06-02.

1.1 DB / host / channel

  • Host vmi3080463 (contabo 38.242.240.89); container postgres PG 16.13; DB directus; write role workflow_admin.
  • 9 production containers up (postgres, directus, qdrant, nuxt, nginx, agent-data, claude-mcp, claude-kb, uptime-kuma).

1.2 Backup / rollback paths

  • Pre-build schema-only dump: /opt/incomex/backups/directus-pre-phase1-testmode-20260602T062711Z.schema.sql (1.6M) — captures all trigger/function defs (the only objects SB-1 modifies).
  • Most recent full VPS backup: /opt/incomex/backups/.../vps-backup-20260601_203701.tar.gz (176M, 2026-06-01).
  • Per-step rollback scripts: sql/{sb0,sb1,sb12_sb13,sb11,sb2,sb10}_rollback.sql (doc 10).

1.3 Target object state (pre-build) — all ABSENT, no conflict

governance_build_authorization, v_build_auth_valid, fn_build_commit_allowed, quorum_passed, valid_sovereign_esign, governance_ruleset, gov_worker_cursor, governance_candidate_state, governance_responsibility_scope, governance_object_ownership, v_object_effective_ownerNULL/absent. axis_registry/axis_assignment → absent (preflight-only, not built). SB-1 action rows absent (the 8 codes not in apr_action_types).

1.4 Counts (R0 baseline)

surface value
approval_requests 211
apr_approvals 42
apr_action_types 6 (create_item,update_item,add_field,patch_ops_code,amend_law,enact_nrm)
os_proposal_approvals 0
event_type_registry 40 (governance domain: 0)
event_outbox 188,847
dot_tools 309
birth_registry 1,074,440 (organic)
governance_relations 8
trigger_guard_alerts 128
idle-in-transaction 0

1.5 apr_action_types birth trigger (F-83-1 confirmed)

trg_birth_apr_action_types AFTER INSERT → argless fn_birth_registry_auto(). apr_action_types has no id column (PK=action_code); the argless path builds entity_code = TG_TABLE_NAME || '::' || NULL = NULLbirth_registry NOT-NULL violation. The shared fn_birth_registry_auto() already supports TG_ARGV[0] as a code-field. Fix = re-point this one trigger to pass 'action_code' (doc 08). Other INSERT triggers analysed: fn_description_birth_guard (warns only — description_policy unclassified; needs ≥30-char description, satisfied), fn_auto_label_provenance (reads code/key; absent on apr_action_types → fail-safe skip, no entity_labels write).

1.6 No production worker consumes the new substrate

The SB-0/12/13/10/2 object names are greenfield (no prior references). SB-1 vocab rows carry handler_ref='unimplemented'fn_apr_block_unimplemented_handler fail-closes any apply. SB-11 rows are active=false ⇒ no emit possible. No worker reads gov_worker_cursor/governance_candidate_state (no scanner running; mission forbids). DDL event-triggers evt_trigger_guard_ddl/_drop log trigger DDL to inert trigger_guard_alerts (no downstream emit).

1.7 Preflight verdict

Baseline is exactly the prior packages' stated state (nothing built, gate red, os_proposal_approvals=0). Author-mode channel write-capable; read-only channel confirms state. Cleared to build under test-mode authorization.

Back to Knowledge Hub knowledge/dev/reports/architecture/one-roof-phase1-test-mode-build-2026-06-02/01-live-preflight-and-backup.md