dot-iu-cutter v0.5 WS-Q5 Registry Substrate — AD-4 Correction Note
dot-iu-cutter v0.5 WS-Q5 Registry Substrate — AD-4 Correction Note
Phase:
v0_5_WS_Q5_registry_substrate_DDL_correction_and_isolated_dry_run· Nature:correction_plus_isolated_dry_run_only· Date: 2026-05-18 Authority: GPT command-review…WS-Q5-registry-substrate-DDL-command-review-2026-05-18—AD-4: CONDITION_BEFORE_DRY_RUN,canonical_counts: foreign_keys=8, unique_constraints=4.⚠️ GATING BANNER
sql_execution_before_correction: false # QG1 — correction recorded BEFORE any apply executable_sql_changed: false # only summary/comment text corrected production_touched: false self_advance: PROHIBITED
1. AD-4 correction
defect_class: documentation/summary undercount — NOT a SQL error
canonical_foreign_key_count: 8
canonical_unique_constraint_count: 4
root_cause: the authoring DDL-draft's §3 inventory header line wrote
"foreign_keys: 7" and "unique_constraints: 3", and the end-of-block comment
wrote "12 PK, 7 FK, 3 UNIQUE". The enumerated FK/UNIQUE name lists in the
same artifact, the design-delta, and the verification-plan already used the
CORRECT 8 / 4. GPT confirmed: "The SQL itself appears correct."
executable_sql_impact: NONE — the 12 CREATE TABLE statements always declared
8 FOREIGN KEY + 4 UNIQUE constraints. No DDL statement was added, removed,
or altered to fix AD-4.
The 8 foreign keys (canonical): fk_grammar_profile_address_template_ref, fk_grammar_profile_level_profile, fk_grammar_profile_level_matcher, fk_gpsm_profile, fk_source_family_registry_grammar_profile, fk_source_document_registry_family, fk_sdvr_source_document, fk_entity_reference_registry_kind.
The 4 unique constraints (canonical): uq_grammar_profile_level_name, uq_source_document_registry_docprefix, uq_sdvr_doc_checksum, uq_entity_reference_registry_natural.
2. Corrected artifact used for the dry-run
revised_ddl_artifact: embedded canonical SQL (this note is self-sufficient)
local_dry_run_file: /tmp/wsq5dr/wsq5_ddl_corrected.sql (ephemeral, not committed)
ddl_sha256: 1cf31237bd9cf8fcb30bb1134db57d857df67db8db0a296f481cb8aa105c1996
rollback_sha256: f48353266efe3ae4a1fa1248592c4a3f35974e24637ec2651a0a4b0f30199f96
corrected_summary_line: "-- END WS-Q5 ... (12 tables, 12 PK, 8 FK, 4 UNIQUE;
no CASCADE/CHECK/trigger/DEFAULT/DML)"
Why a correction note (not a full re-upload of the authoring package) is sufficient for dry-run: GPT explicitly allowed "create a revision/correction note or updated DDL artifact" and "do not change executable SQL unless needed". The executable SQL is unchanged; only counts in prose/comment were wrong. This note records the canonical 8/4 counts and the exact byte-stable SQL (sha-pinned) that the dry-run executed, so the command artifact is internally clean. The original authoring-package files remain as-is; this note is the authoritative count correction superseding their summary lines.
3. Disclosed dry-run scaffold delta (transparency)
scaffold_line_added_FOR_DRY_RUN_ONLY: "CREATE SCHEMA IF NOT EXISTS cutter_governance;"
reason: the isolated fresh cluster has no cutter_governance schema; production
already has it (created v0.1). This single line lets the self-contained DDL
run on an empty cluster.
production_artifact_MUST_NOT_create_schema: true # flagged for prod command-review
table/constraint_DDL: byte-identical to the authoring artifact (12 tables,
8 FK, 4 UNIQUE) — the scaffold line creates NO table/constraint and is
excluded from the production command artifact.
4. Statements
- QG1: AD-4 correction recorded before any SQL execution;
sql_execution_before_correction: false. - Executable table/constraint SQL NOT changed (AD-4 was a text undercount only). Scaffold
CREATE SCHEMA IF NOT EXISTSdisclosed as dry-run-only, flagged out of the production artifact. - No repo/VPS access in this session; no git commit. Production not touched.
- Self-advance PROHIBITED — doc 1 of 4; STOP after package complete → route GPT/User.
Companion files: isolated-dryrun-execution-log, isolated-dryrun-verification-result, isolated-dryrun-report.