KB-11CB

dot-iu-cutter v0.5 — Canonical CUT Execution · Path Preflight (G0/G1/G2 PASS) (doc 1 of 7)

5 min read Revision 1
dot-iu-cutterv0.5first-controlled-cut-canonical-production-executioncanonical-path-preflightg0-passg1-passg2-passa4-publication-type-law-patchtests-122-122-passdieu442026-05-20

dot-iu-cutter v0.5 — Canonical CUT Execution · Path Preflight

doc 1 of 7 · 2026-05-20 · execution under GPT ruling …/reviews/dot-iu-cutter-v0.5-fn-iu-create-canonical-path-redesign-gpt-ruling-2026-05-20.md (A-1..A-4 ALL APPROVED).

phase                : G0 + G1 + G2
outcome              : G0 PASS · G1 PASS · G2 PASS
production_mutation  : NONE this phase (catalog reads + 1 code patch)

1. G0 — SSOT + repo precheck — PASS

date                 : 2026-05-20
operator             : Agent (Claude Code / Opus 4.7 / 1M ctx)
repo                 : /Users/nmhuyen/iu-cutter-build/repo/iu-cutter
branch               : feature/constitution-snapshot-mark-dryrun
HEAD                 : f20c79c (== ratified post_commit_HEAD ; unchanged)
working_tree         : 3 untracked canonical files (matches prior survey/redesign macro)
canonical_files (this phase, after A-4 publication_type='law' defensive patch) :
  cutter_agent/prod_iu_adapter_canonical.py  sha 2d65dee29579d81b3c67baf7fad34c8792643531fb5cc59208e4a417491f87f4
                                              (was 84db8be9… before A-4 patch)
  cutter_agent/cutprod_canonical.py          sha 3a7ab605776bc793429fc677355ab8beb3a4c3bdff3d502a007a75da9402c220
  tests/test_prod_iu_adapter_canonical.py    sha 6545c30d148fb22b8dbe09aea88915c7afdb1dc6f12844eefd4ce83e19d4e270
targeted_tests_rerun :
  python3 -m unittest tests.test_prod_iu_adapter tests.test_cutwrite_snapshot
                     tests.test_dryrun_snapshot_mark tests.test_cutplan_snapshot
                     tests.test_prod_iu_adapter_canonical
  Ran 122 tests in 0.142s · OK
KB_read              : confirmed (GPT ruling + survey package + prior reports)
KB_upload            : confirmed (this 7-doc report set)

1.1 A-4 defensive patch summary

Per GPT ruling A-4 (ADD_P_PUBLICATION_TYPE_LAW_DEFENSIVELY), patched prod_iu_adapter_canonical.py leg_a_in_txn_canonical to pass publication_type='law' (single-value change in the 60-row loop). The patch is:

# BEFORE
publication_type = None
# AFTER (A-4 defensive ; live L1 PILOT-MODE warned about P-pub1/P-pub2)
publication_type = "law"

Tests 122/122 PASS after patch ; no regression.

2. G1 — live canonical path survey re-check — PASS

db                          : directus
iu_cols                     : 19           == PIN_IU_COLS
uv_cols                     : 16           == PIN_UV_COLS
L1 md5                      : f38c94d0…    == PIN_L1_MD5
L2 md5                      : 078ba005…    == PIN_L2_MD5
fn_iu_create md5            : dcade99af1ef096892748c9f14082e11   (unchanged from prior survey)
fn_iu_gateway_write_guard md5: 6e716a808c3825cde0adc32605185ec3  (unchanged)
ICX-CONST existing rows     : 0            (G-CUT-ONCE precondition met)
public.information_unit rows: 98
public.unit_version    rows : 105
vocab keys (6/6)            : ALL PRESENT (incl vocab.publication_type.law — A-4)
gateway_mode                : enforced
gateway_allowed_marker_values: fn_iu_create,fn_iu_apply_edit_draft
trigger_layer               : same 7 triggers cataloged in prior survey
                              (trg_aa_iu_gateway_write_guard, L1, L2,
                               birth_information_unit, iu_updated_at,
                               trg_aa_uv_gateway_write_guard, trg_aa_iu_notif_version)

3. G2 — live drift + row + grant precheck — PASS

production_db_identity      : confirmed (current_database = directus)
schema_shape                : compatible with fn_iu_create (function INSERTs
                              a subset of cols ; remaining cols take column
                              DEFAULTs ; cf. doc 2 §8 of the prior survey)
ICX-CONST_preexisting       : 0
vocab                       : 6/6
legacy_GRANT_state (recorded as of this phase) :
  cutter_exec  SELECT on IU        : YES
  cutter_exec  INSERT on IU        : YES   ← still in place from rerun macro G5
  cutter_exec  UPDATE(v_anchor_ref,
                       c_anchor_ref) on IU : YES   ← still in place
  cutter_exec  SELECT on UV        : YES
  cutter_exec  INSERT on UV        : YES   ← still in place
  cutter_exec  SELECT on dot_config: YES
  cutter_exec  EXECUTE on fn_iu_create : NO   ← MUST be granted in G4
  cutter_verify SELECT on IU + UV  : YES
note                        : the direct-write grants are INERT under the
                              gateway trigger ; G4 will REVOKE them and
                              GRANT the canonical EXECUTE in their place
                              (per the survey package doc 4 delta).

4. Disposition

G0 (SSOT + repo)            : PASS
G1 (live canonical path)    : PASS
G2 (drift + row + grant)    : PASS
proceed_to_G3               : YES
production_mutation_this_phase : NONE (read-only catalog + 1 code patch on
                                       untracked file)

doc 1 of 7.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.5-first-controlled-cut-canonical-production-execution/dot-iu-cutter-v0.5-01-canonical-path-preflight-2026-05-20.md