KB-3023
01 Hard Gate + Baseline + Backup
4 min read Revision 1
dieu44baselinebackuphard-gate2026-05-27
01 — HARD GATE 0 + Baseline + Backup
Channel proof (LIVE APPLY)
local Claude Code CLI
→ ssh contabo
→ docker exec -i postgres
→ psql -U workflow_admin -d directus
select now(), current_user, current_database(); returned:
ts | current_user | current_database
2026-05-27 04:30:02.959355+00 | workflow_admin | directus
BEGIN/ROLLBACK DDL probe: CREATE TEMP TABLE+ROLLBACK succeeded.
Backup (pg_dump format=c)
| step | path | bytes | md5 |
|---|---|---|---|
| pre-mig 055 | /tmp/pg_dump_pre_mig055_20260527T043033Z.dump |
84,298,333 | 1ddadb0b6b0916b5d7784b9eb737c1fd |
| post-mig 055 + Phase F | /tmp/pg_dump_post_mig055_20260527T044228Z.dump |
84,306,773 | 0227a249fd96391f03e555f8d111a186 |
Delta = +8,440 B, matches 2 new function definitions (1 NEW fn_iu_cut_preflight_validate, 1 CREATE-OR-REPLACE fn_iu_verify_mark).
Pre-fix baseline (proven LIVE)
Target objects exist
public.cut_request.cut_request_id = 146f1520-aaa2-4bda-af2c-06a8f76cd36a
public.cut_request.status = mark_verified
public.cut_request.source_ref = knowledge/dev/laws/dieu39-knowledge-graph-law.md
public.cut_request.cut_run_id = NULL
iu_core.iu_staging_record(9fa4685e-…) lifecycle_status = approved
iu_core.iu_staging_record(9fa4685e-…) staging_kind = mark_manifest
iu_core.iu_staging_record(9fa4685e-…) payload_type = application/json
iu_core.iu_staging_record(9fa4685e-…) content_hash = 4b17287e17242ffbfc34bc8a58f7fa29
iu_core.iu_staging_record(9fa4685e-…) byte_len = 29693
iu_core.iu_staging_record(9fa4685e-…) part_count = 3
iu_core.iu_staging_record(9fa4685e-…) created_at = 2026-05-27 02:51:13.561188+00
(Note: the iu_staging_record PK column is staging_record_id, not iu_staging_record_id; the table lives in iu_core schema, not public — corrects an early memory transcription.)
Manifest 9fa4685e unit_kind distribution
unit_kind | n
------------+----
law_section | 16
All 16 pieces use unit_kind=law_section, which is NOT in dot_config vocab.unit_kind.*.
Live vocabularies
vocab.unit_kind.* = { design_doc_section, law_unit } (2 keys)
vocab.section_type.* = 18 keys
vocab.publication_type.* = { design_doc, law } (2 keys)
vocab.piece_role.* = (empty — not enforced anywhere)
Function md5 baseline (pre-mig 055)
fn_cut_mark_staged_file | e85065acb9996623e0ef1f654d991df6
fn_cut_request_transition | b6845f31889e701cea2d009b12cd823f
fn_iu_create | dcade99af1ef096892748c9f14082e11
fn_iu_cut_from_manifest | c5d556bc22cc2d255c0484b5a969ebc5
fn_iu_op_cut | 66b813e50205448eb01170aebec614df
fn_iu_op_mark_file | ffaa47fff7a906d93060141661080cd4
fn_iu_op_verify_cut | ac61dade6519694310cbfd75d8b549fb
fn_iu_op_verify_mark | bf20bd1929998073865808d17b1dd648
fn_iu_verify_mark | 1db15847b1c48e3b86568b712a15cfd6 ← will change
fn_iu_cut_preflight_validate | <absent — to be created>
Counts & gates
iu_count | 200
vsp_count | 152
staging_count | 10
prod_docs_present | false
pg_cron_present | false
gate.job_substrate.enabled | false
gate.composer.enabled | false
gate.heartbeat.enabled | true
gate.dlq.replay_enabled | false
runtime.phase | <missing key>
All checks green — HARD GATE 0 PASS, write channel confirmed, backup taken, mission can proceed.