KB-27BF

dot-iu-cutter v0.5 — Constitution source_document Seed Restart: Verification Plan (NOT executed)

8 min read Revision 1
dot-iu-cutterv0.5constitution-fixturesource-document-seed-restartverification-planpre-post-negativecatalog-levelb6-closednot-executeddieu442026-05-18

dot-iu-cutter v0.5 — Constitution source_document Seed Restart: Verification Plan

Phase: v0_5_constitution_source_document_seed_authoring_restart · Date: 2026-05-18 · doc 4 of 5

nature: PLAN ONLY — nothing executed ; dml: none ; dry_run: none
applies_to: the future, separately-gated execution of the doc-2 atomic seed
method: catalog/codepoint assertions, never rendered-string equality (C-07 lesson)
decision_authority: GPT / User ONLY ; self_advance: PROHIBITED

1. Pre-checks (read-only, BEFORE any seed write)

PRE-1  system_identifier = 7611578671664259111                              MUST match
PRE-2  cutter_governance.source_document_registry exists (relkind 'r')       MUST exist
PRE-2  cutter_governance.source_document_version_registry exists             MUST exist
PRE-3  source_family_registry has row source_family='internal_incomex_constitution'  =1
PRE-4  grammar binding: that source_family row resolves grammar_profile
       'incomex-architecture-constitution-v4'                                MUST match
PRE-5  grammar_profile_status_marker rows for
       incomex-architecture-constitution-v4 = 4                              =4 (B1 closed)
       codepoint-exact: U+2705->enacted, U+1F4CB->controlled_draft,
       U+1F4DD->draft, U+26D4->obsolete                                      exact set
PRE-6  source_document_registry rows = 0                                     =0 (else STOP)
PRE-6  source_document_version_registry rows = 0                             =0 (else STOP)
PRE-7  no source_document_ref='incomex-constitution' present                 =0
PRE-7  no address_docprefix='ICX-CONST' present                              =0
PRE-8  constraints present: fk_source_document_registry_family,
       fk_sdvr_source_document, uq_source_document_registry_docprefix,
       uq_sdvr_doc_checksum                                                  all present
PRE-9  B6 = CLOSED (GPT ruling 2026-05-18) AND canonical checksum
       f9d22d05…d1689 / len 17791 / profile nuxt-incomex-portal-constitution-v1
       are the ratified inputs                                              MUST hold

PRE-6/PRE-7 mismatch handling: if any Constitution source_document/version row already exists (live facts say 0/0), STOP and report — do not UPSERT, do not assume. Deviation = production-state mismatch → halt per governance.

2. Post-checks (read-only, immediately after COMMIT)

POST-1  source_document_registry rows = 1                                    =1
POST-2  the row exactly: source_document_ref='incomex-constitution'
        AND address_docprefix='ICX-CONST'
        AND source_url='https://vps.incomexsaigoncorp.vn/knowledge/dev/laws/constitution'
        AND source_family='internal_incomex_constitution'
        AND authority_class='authoritative'
        AND lifecycle='active'
        AND registered_by='constitution-source-seed'                         exact
POST-3  source_document_version_registry rows = 1                            =1
POST-4  version row exactly:
        source_document_ref='incomex-constitution'
        AND content_checksum='f9d22d0571fa296cbc8e308c46acde93804ffcfb4a19a2e7f55dabd8657d1689'
        AND document_version_id='icxconst-f4ce1f63bd768838f26b4f0ccdb615e4'
        AND document_version_id = 'icxconst-'||left(encode(sha256(
              (content_checksum||'|'||source_document_ref)::bytea),'hex'),32)  self-consistent
        AND source_format='html/nuxt'
        AND authoritative_version='v4.6.3 BAN HÀNH'
        AND version_status='fetched'                                         exact
POST-5  provenance->>'parser_profile_ref' = 'nuxt-incomex-portal-constitution-v1'
        AND (provenance->>'normalized_content_length')::int = 17791
        AND (provenance->>'changelog_included')::bool = true                 exact
POST-6  FK integrity (catalog anti-join):
        version.source_document_ref with no matching source_document = 0     =0
POST-7  UNIQUE holds: exactly 1 (source_document_ref, content_checksum)      =1
POST-7  exactly 1 address_docprefix='ICX-CONST'                              =1
POST-8  no extra documents: distinct source_document_ref count = 1 ;
        no row with source_family != 'internal_incomex_constitution' ;
        no row with registered_by != 'constitution-source-seed'              PASS
POST-9  source_url codepoint-exact (not rendered-string compare)             exact
POST-10 enacted_only scope UNCHANGED: source_family_registry.status_policy
        for internal_incomex_constitution still 'enacted_only' ;
        grammar_profile_status_marker still 4 rows codepoint-exact ;
        no marker promoted; 📋 still controlled_draft (Điều 44 still deferred) unchanged
POST-11 system_identifier 7611578671664259111 (pre == post)                  match
POST-12 no dry-run / CUT / VERIFY artifact rows created (manifest_envelope,
        manifest_unit_block, IU/iu_provenance unchanged from pre)            unchanged

3. Negative checks (any TRUE ⇒ FAIL ⇒ rollback per doc 3)

NEG-1  >1 source_document OR >1 version row created                          MUST be FALSE
NEG-2  any non-Constitution document/family seeded                           MUST be FALSE
NEG-3  any UPDATE/DELETE on grammar_profile / status_marker /
       source_family_registry / address_template                            MUST be FALSE
NEG-4  content_checksum NULL/empty, != ratified f9d22d05…d1689, OR equal to
       a raw fetch hash (raw used as identity)                               MUST be FALSE
NEG-5  status marker rows changed (count != 4 or codepoint drift)            MUST be FALSE
NEG-6  schema change / GRANT / REVOKE / index DDL / Directus mutation        MUST be FALSE
NEG-7  ON CONFLICT / upsert used to mask a pre-existing row                  MUST be FALSE
NEG-8  system_identifier changed                                            MUST be FALSE
NEG-9  document_version_id != deterministic icxconst-f4ce1f63bd768838f26b4f0ccdb615e4
       (i.e. identity dependent on a timestamp or wrong inputs)              MUST be FALSE

4. Checksum / parser-profile verification (B6 CLOSED — confirm, not re-prove)

CK-1  content_checksum stored == GPT-ratified canonical
      f9d22d0571fa296cbc8e308c46acde93804ffcfb4a19a2e7f55dabd8657d1689       MUST hold
CK-2  provenance->>'parser_profile_ref' = nuxt-incomex-portal-constitution-v1 MUST hold
CK-3  provenance raw_checksum is forensic-only (NOT equal to content_checksum;
      may be null until the single controlled GET at execution)              MUST hold
CK-4  document_version_id derivation reproducible from stored content_checksum
      + source_document_ref (recompute == stored)                            MUST reproduce
note: B6 determinism was already CLOSED by GPT (6 fetches / 2 sessions). This
      phase does NOT re-run the cross-interval proof; it asserts the ratified
      value was persisted unchanged.

5. Dry-run readiness implications

this_package_alone: does NOT make the first Constitution dry-run ready.
gating_chain:
  B1 marker coverage: CLOSED (live, 4 markers)
  B6 Nuxt parser/checksum determinism: CLOSED (GPT 2026-05-18)
  B5 source_document/version seed: OPEN -> needs THIS seed command-reviewed + EXECUTED + verified
first_constitution_dry_run_ready_when:
  - this seed command-reviewed + executed + post/negative/CK verified  (closes B5)
  - scope remains enacted_only (GPT R2) ; Điều 44 📋 deferred (GPT R3)
  THEN: first Constitution dry-run package may be authored (separate phase)

6. Statement

  • Pre / post / negative / checksum verification authored complete (QG7), catalog/codepoint method (C-07 lesson). enacted_only scope and Điều 44 deferral asserted unchanged (POST-10, QG6). Nothing executed (QG4).
  • doc 4 of 5; STOP after package → route GPT/User. Self-advance PROHIBITED.

Companion: operational-framing, DML-draft, rollback-draft, report.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.5-constitution-source-document-seed-authoring-restart/dot-iu-cutter-v0.5-constitution-source-document-seed-restart-verification-plan-2026-05-18.md