KB-4E48

Phase 3 — Điều 37 CUT + VERIFY CUT result (17 IUs, verdict=verified)

6 min read Revision 1
dieu45phase3cutverify-cutdieu37fn-iu-op-cutfn-iu-op-verify-cutaxis-aaxis-baxis-cno-vector2026-05-26

Phase 3 — Điều 37 CUT + VERIFY CUT

1. CUT invocation

SELECT fn_iu_op_cut(
  p_staging_record_id => '258c715c-6f49-4e12-b62a-a64a6907f435'::uuid,
  p_apply             => true,
  p_actor             => 'dieu45-phase3-pilot-2026-05-26',
  p_open_composer     => true
);

Result: cut_run_id = a64340fe-96ea-428a-a860-32e8b471b496.

The composer gate (dot_config.iu_core.composer_enabled) was opened by the alias (p_open_composer=true) and closed explicitly by the pilot post-CUT — exit state false.

2. Mid-flight section_type incident + recovery

First call raised:

ERROR:  section_type: Not in vocab. Available: appendix, article, changelog, checklist,
        definition, governance_process, heading, instruction_block, paragraph, principle,
        process, section, technical_spec
CONTEXT:  PL/pgSQL function fn_iu_create(...) line 27 at RAISE
          fn_iu_cut_from_manifest(...) line 129
          fn_iu_op_cut(...) line 34

Recovery: 3 in-place jsonb_set patches on iu_core.iu_staging_payload.payload_json (the cut_manifest row, where CUT actually reads pieces from — not the metadata copy):

UPDATE iu_core.iu_staging_payload
SET payload_json = jsonb_set(
    jsonb_set(
      jsonb_set(payload_json, '{pieces,10,section_type}', '"technical_spec"'::jsonb),
      '{pieces,12,section_type}', '"section"'::jsonb),
    '{pieces,14,section_type}', '"section"'::jsonb)
WHERE staging_record_id='258c715c-…' AND part_name='cut_manifest';

Same lease, no fn_job_fail_or_retry, no retry counter advanced. Re-invocation succeeded.

3. VERIFY CUT result

SELECT fn_iu_op_verify_cut(
  p_run_id => 'a64340fe-…'::uuid,
  p_actor  => 'dieu45-phase3-pilot-2026-05-26'
);
{
  "alias": "fn_iu_op_verify_cut",
  "run_id": "a64340fe-96ea-428a-a860-32e8b471b496",
  "verdict": "verified",
  "inner_result": {
    "ok": true,
    "verdict": "verified",
    "problems": [],
    "axis_a_ok": true,      -- sort_order populated 1..17
    "axis_b_ok": true,      -- section_type populated
    "axis_c_ok": true,      -- parent_or_container_ref / canonical_address coherence
    "no_vector_ok": true,   -- iu_vector_sync_point untouched, vector_excluded=true on staging
    "pieces_count": 17
  }
}

All four invariants honored.

4. The 17 DIEU-37 IUs (durable, post-CUT)

sort_order section_code section_type parent (truncated) canonical_address
1 title heading (root) DIEU-37-v3.3#title
2 ops-note paragraph bc79ab1c… DIEU-37-v3.3#ops-note
3 goal paragraph bc79ab1c… DIEU-37-v3.3#goal
4 missions paragraph bc79ab1c… DIEU-37-v3.3#missions
5 terms definition bc79ab1c… DIEU-37-v3.3#terms
6 core principle bc79ab1c… DIEU-37-v3.3#core
7 scope paragraph bc79ab1c… DIEU-37-v3.3#scope
8 principles principle bc79ab1c… DIEU-37-v3.3#principles
9 schema technical_spec bc79ab1c… DIEU-37-v3.3#schema
10 dot governance_process bc79ab1c… DIEU-37-v3.3#dot
11 matrix technical_spec bc79ab1c… DIEU-37-v3.3#matrix
12 pg-catalog instruction_block bc79ab1c… DIEU-37-v3.3#pg-catalog
13 law-links section bc79ab1c… DIEU-37-v3.3#law-links
14 seed process bc79ab1c… DIEU-37-v3.3#seed
15 debt section bc79ab1c… DIEU-37-v3.3#debt
16 triggers technical_spec bc79ab1c… DIEU-37-v3.3#triggers
17 changelog changelog bc79ab1c… DIEU-37-v3.3#changelog

doc_code is set to the source_ref verbatim (knowledge/dev/laws/dieu37-governance-organization-law.md) — matches the documented behaviour that fn_iu_cut_from_manifest's post-create UPDATE writes p_source_ref to doc_code (not a canonical short-code).

5. Reconstruct check

SELECT count(*) FROM fn_iu_reconstruct_source(
  'knowledge/dev/laws/dieu37-governance-organization-law.md'
);
-- 17

The source can be reconstructed by source_ref (matches dieu37_iu_count and pieces_count).

6. piece_membership note

iu_piece_membership rows for these 17 IUs: 0. The cut links children to parent via information_unit.parent_or_container_ref (axis C). iu_piece_membership carries collection-level membership, which is not populated by a plain MARK→CUT in this design; all 17 IUs are independent rows whose tree is asserted by parent_or_container_refcanonical_address chain. Axis C verified true against this structure.

7. Birth-gate warnings (non-blocking, pilot-only)

The cut emitted ~32 + ~30 warnings of the form:

WARNING:  Birth gate L1 PILOT-ONLY: P-pub1 missing — production sẽ BLOCK
WARNING:  Birth gate L1 PILOT-ONLY: P-pub2 missing — production sẽ BLOCK

These are Điều 0-G pilot-mode warnings (publication gates P-pub1 / P-pub2). They are non-blocking in pilot mode and do not affect the cut result. Production mode would block — a tighter publication wiring is a future Điều 0-G item, not a Phase 3 deliverable.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.6-dieu45-phase-3-mark-cut-queue-pilot-dieu37-write-channel/05-dieu37-cut-verify-result.md