RFC-0054 DDL execution contract proposal
Versioned draft snapshot
RFCs, reference catalogs, and evidence reflect Spec 3b2e3e7a114fb826b1445d39a48756b8fff629cd. Counts and pending/status notes belong to that snapshot. Read the dated project update for later progress.
Source repositories are private during staging. Links marked “repository access required” need access to the linked repository.
This is a trace and gap record from the pinned draft specification. It does not establish proof or implementation conformance.
Status: proposed first-release contract. Owners: Storage, Compiler, Runtime.
Source evidence and eight mismatched claim nodes are recorded in
RFC0054_CLAIM_REVIEW.md. No deployed Gnomon state requires migration.
Transaction boundary
Recommend one outer PostgreSQL transaction per module, as §3.3 and §10.6 already require. Per-file batching and optional per-statement processing operate inside that transaction; savepoints may isolate diagnostics but do not commit part of a module. Any failed operation rolls back the entire module. Successful earlier modules remain committed, consistent with a per-module rather than whole-install-plan boundary.
Replace §7.1’s independent per-file/per-statement transaction language with batching and savepoints. A module requiring operations that cannot run inside a PostgreSQL transaction is rejected as unsupported in this first-release pipeline; do not silently weaken atomicity. The actual diagnostic identity must be selected through the diagnostic ownership process before publication.
Alternative: allow committed file-level partial progress and abandon the module-wide atomicity guarantee. This requires explicit resumability and installed-state reconciliation after partial failure, plus changes to RFC-0041’s install contract wherever it assumes module atomicity.
Destructive-operation acknowledgment
Recommend separate reporting, risk classification, and destructive gating. Every DROP or unsafe ALTER can appear in the operation report. Mandatory acknowledgment applies only to operations classified destructive by §5.2; DROP INDEX and DROP VIEW therefore do not require it merely because they are DROP statements. Security regression and caller breakage must be evaluated for the conditional categories already listed in §5.2.
Deprecation eligibility does not replace acknowledgment. A user-facing object
must complete the two-phase lifecycle before physical removal and still needs
object-level allow-destructive: true or the explicit CLI override if the
operation is destructive. CI labeling and explicit reviewer signoff remain
required for intentional destructive plans. This makes §5.3 mandatory for
user-facing removals and corrects §10.10’s weaker recommendation wording.
Alternative: a completed deprecation lifecycle authorizes destructive removal without separate acknowledgment. It needs a precise, auditable eligibility record and consistent changes to §5.1, §10.3, Lean, and M54010 conditions.
Backward-compatibility risk
Recommend a total bcRisk classification separate from destructive status:
| Operation | BC_SAFE | BC_BREAKING |
|---|---|---|
| CREATE | Additive and nonconstraining | Introduces constraints on existing consumers or data |
| ALTER | Proven compatible with existing consumers and values | Incompatible or compatibility cannot be established |
| DROP | None by default | Every DROP, including a nondestructive DROP INDEX or DROP VIEW |
The DROP default follows authored §3.2. A nondestructive operation can still break consumers or performance assumptions; its risk label alone does not require a destructive acknowledgment. Unknown ALTER compatibility is classified breaking so the planner never emits an unclassified entry. A future extension can add finer compatibility evidence without conflating it with data loss.
Acceptance
- Record owner decisions for these three boundaries. Align RFC-0054 §3.2, §3.3, §5.1, §5.3, §7.1, §10, Lean evidence/invariants, and RDF claims.
- Check RFC-0041 and RFC-0005 integration assumptions and document any remaining conflict rather than claiming transaction compatibility.
- Test failure in a later file after earlier statements execute: no module changes may survive. Verify earlier completed modules remain installed.
- Test DROP INDEX and DROP VIEW without destructive override, DROP TABLE denial without acknowledgment, deprecation eligibility with and without acknowledgment, and every CREATE/ALTER/DROP risk classification.
- Reject nontransactional operations explicitly. Verify the selected diagnostic and installed-state snapshot behavior. Regenerate Lean, projections, references, and review bindings; run consumer and site gates.