KB-4AC5

dot-iu-cutter v0.5 Constitution Source Document Seed Restart — Command Review and Execution Approval

8 min read Revision 1
dot-iu-cutterv0.5constitution-fixturesource-document-seedcommand-reviewexecution-approvalb5b6-closeddieu442026-05-18

dot-iu-cutter v0.5 Constitution Source Document Seed Restart — Command Review and Execution Approval

Date: 2026-05-18 Reviewer / decision authority: GPT Reviewed package: knowledge/dev/laws/dieu44-trien-khai/v0.5-constitution-source-document-seed-authoring-restart/

Reviewed files:

files:
  - dot-iu-cutter-v0.5-constitution-source-document-seed-restart-operational-framing-2026-05-18.md
  - dot-iu-cutter-v0.5-constitution-source-document-seed-restart-DML-draft-2026-05-18.sql.md
  - dot-iu-cutter-v0.5-constitution-source-document-seed-restart-rollback-draft-2026-05-18.sql.md
  - dot-iu-cutter-v0.5-constitution-source-document-seed-restart-verification-plan-2026-05-18.md
  - dot-iu-cutter-v0.5-constitution-source-document-seed-restart-report-2026-05-18.md

Verdict

constitution_source_document_seed_restart_package: PASS_FOR_CONTROLLED_EXECUTION
agent_behavior: PASS_CORRECT
operations_first_framing: PASS
forbidden_respected: true
DML_executed_yet: false
execution_authorized: true
scope: seed_constitution_source_document_and_one_version_atomically

The package correctly replaces the prior NO-DML-DRAFT after B6 closure. It is approved for controlled production execution, subject to the mandatory prechecks and stop conditions below.


Approved DML scope

Approved rows:

approved_rows:
  source_document_registry: 1
  source_document_version_registry: 1

Approved source document:

source_document:
  source_document_ref: incomex-constitution
  address_docprefix: ICX-CONST
  source_url: https://vps.incomexsaigoncorp.vn/knowledge/dev/laws/constitution
  source_family: internal_incomex_constitution
  authority_class: authoritative
  lifecycle: active

Approved source version:

source_document_version:
  document_version_id: icxconst-f4ce1f63bd768838f26b4f0ccdb615e4
  source_document_ref: incomex-constitution
  content_checksum: f9d22d0571fa296cbc8e308c46acde93804ffcfb4a19a2e7f55dabd8657d1689
  source_format: html/nuxt
  authoritative_version: v4.6.3 BAN HÀNH
  version_status: fetched
  parser_profile_ref: nuxt-incomex-portal-constitution-v1
  normalized_content_length: 17791
  changelog_included: true

No other documents, versions, grammar rows, marker rows, source families, or schema objects are approved.


Command-review notes

accepted:
  - source_document and source_document_version are atomic in one transaction
  - no ON CONFLICT, so collision fails loud
  - design-only fields are routed to provenance jsonb
  - document_version_id is deterministic and timestamp-independent
  - enacted_only scope and Điều 44 deferral are unchanged

Important execution precondition:

fresh_source_checksum_precheck_required: true

Before inserting, Agent must re-fetch the source read-only and apply nuxt-incomex-portal-constitution-v1. If the normalized checksum or length differs from the approved canonical values, Agent must STOP_AND_ESCALATE. Do not silently seed stale version identity.


Mandatory pre-execution checks

Before DML execution, Agent must verify and record:

P1_target:
  - production system_identifier equals 7611578671664259111
  - cutter_governance schema exists
  - source_document_registry exists
  - source_document_version_registry exists

P2_supporting_registry_state:
  - source_family internal_incomex_constitution exists
  - grammar_profile incomex-architecture-constitution-v4 exists
  - grammar_profile_status_marker has exactly:
      ✅: enacted
      📋: controlled_draft
      📝: draft
      ⛔: obsolete

P3_existing_source_rows:
  - source_document_ref incomex-constitution absent
  - address_docprefix ICX-CONST absent
  - document_version_id icxconst-f4ce1f63bd768838f26b4f0ccdb615e4 absent
  - no existing source_document_version for incomex-constitution

P4_fresh_source_checksum:
  - fetch source URL read-only
  - apply parser profile nuxt-incomex-portal-constitution-v1
  - normalized checksum equals f9d22d0571fa296cbc8e308c46acde93804ffcfb4a19a2e7f55dabd8657d1689
  - normalized length equals 17791
  - marker counts equal 19/1/1/1
  - if mismatch: STOP_AND_ESCALATE, no DML

P5_command_integrity:
  - DML matches approved package
  - INSERT-only
  - one BEGIN/COMMIT transaction
  - no UPDATE
  - no DELETE in apply command
  - no ON CONFLICT
  - no dry-run/CUT/VERIFY
  - no schema/GRANT/index/Directus changes

Mandatory fresh backup:

backup:
  required: true
  type: pg_dump or approved equivalent
  must_record:
    - safe backup path / identifier
    - timestamp
    - sha256 or integrity marker if available
    - no secrets

If any precheck fails, Agent must stop and upload a BLOCKED report.


Authorized execution procedure

procedure:
  1: run mandatory pre-execution checks
  2: take fresh backup
  3: execute approved DML as workflow_admin in one transaction with ON_ERROR_STOP=1
  4: verify source_document row
  5: verify source_document_version row
  6: verify FK/checksum/docprefix/source_url/provenance
  7: report and stop

Expected post-state:

expected_post_state:
  source_document_registry:
    incomex-constitution: exactly_once
    address_docprefix_ICX_CONST: exactly_once
  source_document_version_registry:
    icxconst-f4ce1f63bd768838f26b4f0ccdb615e4: exactly_once
  FK_integrity: pass
  enacted_only_scope: unchanged
  dieu44: still_deferred
  dryrun_executed: false
  cut_executed: false
  verify_executed: false

Rollback / failure handling

if_apply_fails_before_commit:
  - transaction rollback expected
  - verify no source_document/source_version rows
  - report FAIL/BLOCKED

if_apply_commits_but_verification_fails:
  - rollback may execute only if rows exactly match the 2 approved inserted rows
  - delete child version row first, then parent document row
  - no CASCADE
  - if downstream references or unexpected rows exist, STOP_AND_ESCALATE

if_rows_already_exist_before_apply:
  - STOP_AND_ESCALATE
  - do not treat as idempotent success silently

Still forbidden

forbidden:
  - source_document seed for any other document
  - source_document_version seed for any other version
  - update existing source rows
  - ON CONFLICT masking
  - Constitution dry-run
  - CUT
  - VERIFY
  - schema change
  - GRANT/REVOKE
  - index DDL execution
  - Directus mutation
  - vector/NoSQL integration
  - deploy/restart
  - git commit
  - self-advance to dry-run

Required output

Agent must upload execution results under:

knowledge/dev/laws/dieu44-trien-khai/v0.5-constitution-source-document-seed-production-execution/

Required files:

files:
  - dot-iu-cutter-v0.5-constitution-source-document-seed-production-execution-log-2026-05-18.md
  - dot-iu-cutter-v0.5-constitution-source-document-seed-production-verification-result-2026-05-18.md
  - dot-iu-cutter-v0.5-constitution-source-document-seed-production-report-2026-05-18.md

Report must state:

required_report_fields:
  - execution_status: PASS | FAIL | BLOCKED | ROLLED_BACK
  - backup_status
  - pre_execution_checks
  - fresh_source_checksum_result
  - inserted_rows
  - source_document_verification_summary
  - source_document_version_verification_summary
  - rollback_status_if_any
  - downstream_not_executed
  - next recommended cycle

Final status

status: CONSTITUTION_SOURCE_DOCUMENT_SEED_APPROVED_FOR_CONTROLLED_EXECUTION
next_action: run_prechecks_backup_execute_verify_stop
Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reviews/dot-iu-cutter-v0.5-constitution-source-document-seed-restart-command-review-and-execution-approval-2026-05-18.md