docs: mark unmodelled SQL skip as out of scope (no --strict in v1)#44
Conversation
The Cleanup TODO entry asked us to make `applyAlterTable` reject the ALTER clauses it doesn't model instead of silently skipping them. Prototyped that as a `--strict` opt-in flag (covering both applyAlterTable AND the symmetric top-level skip path), then decided the whole feature is out of scope for v1 — the silently-skipped behaviour is intentionally permissive so raw mysqldump output keeps parsing without manual editing, and the strict-mode plumbing wasn't worth shipping for the use cases we have today. Drop the TODO entry and document the actual behaviour as a deliberate design choice instead of a future fix: - TODO.md: removed the Cleanup section's only entry. Section itself goes too — `Cleanup` was a one-line bin and is now empty. - AGENTS.md: the existing `applyAlterTable` paragraph now spells out that every other ALTER clause is skipped, and that the symmetric top-level skip exists for the same reason (mysqldump-output compatibility). Mentions the `--strict` prototype + v1 decision and points to CAVEATS.md. - CAVEATS.md: new "Unmodelled SQL in desired-side files is silently skipped" section with the full inventory (which top-level statements skip, which ALTER clauses skip), the rationale (mysqldump compatibility), the impact (footgun for users who expected `ALTER TABLE t ADD COLUMN c INT` to land), and the workaround (express schema state via CREATE TABLE; out-of-band for DML). No code changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #44 +/- ##
=======================================
Coverage 73.64% 73.64%
=======================================
Files 28 28
Lines 2345 2345
=======================================
Hits 1727 1727
Misses 452 452
Partials 166 166 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Updates repository documentation to explicitly mark “unmodelled desired-side SQL is skipped” as an intentional v1 design choice (rather than a future TODO), primarily to preserve permissive parsing of mysqldump-style inputs.
Changes:
- Removed the TODO item proposing a strict rejection of unmodelled
ALTER TABLEclauses. - Documented the current “silently skipped” behavior (top-level statements and unmodelled
ALTER TABLEoptions) and the v1 rationale inCAVEATS.md. - Expanded
AGENTS.mdparser notes to reference the skip behavior and the out-of-scope--strictprototype.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| TODO.md | Removes the (now-declared out-of-scope) Cleanup TODO about rejecting unmodelled ALTER clauses. |
| CAVEATS.md | Adds a new section documenting silent skipping of unmodelled desired-side SQL, rationale, impact, and workaround. |
| AGENTS.md | Updates parser “quirks” documentation to describe silent skipping + links to the new caveat. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Two valid nits: #1 The CAVEATS.md "top-level statements skip" bullet listed the three statement types that ARE handled (CREATE TABLE / CREATE VIEW / ALTER TABLE) but didn't call out that user-written `CREATE INDEX` rides on the ALTER TABLE AST shape and IS supported. Reword so a reader doesn't conclude `CREATE INDEX` is one of the skipped types. #2 The "Impact" paragraph claimed "you'll only notice when the next plan re-emits the underlying CREATE TABLE without the column". That's wrong — `plan` emits diff DDL, not the desired-side CREATE TABLE. The actual symptom is "no observable plan output for that column": the diff is silent because the column never made it into the desired model, so the next `plan` either reports `-- No changes` or just shows the other diffs in the file, and `dump` over the live DB shows the table without the column. Rewrite the paragraph with the accurate observable symptoms. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…nal intro exception Reviewer noted the new section reads as contradicting the file intro's "be explicit, fail loudly" stance. Add a one-sentence call-out at the top of the "Why this isn't an error" paragraph so the contrast is explicit instead of implicit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…re validated Reviewer noted the "comments — all parse successfully" wording reads as if every `--`-prefixed line is silently skipped, but `-- myschema:<name>` directive comments go through ValidateDirectives and unknown/malformed shapes error out. Tighten "comments" to "non-directive comments" in both CAVEATS.md and AGENTS.md and add a parenthetical noting the directive exception. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… + IS typo Three nits: - Both CAVEATS.md and AGENTS.md described unhandled `ALTER TABLE` clauses as "silently skipped" without distinguishing the two paths: known target table → unhandled clause is silent; unknown target table → applyAlterTable fails fast with `ALTER TABLE on unknown table …`. Spell out both. - "CREATE INDEX IS supported" → "is supported" (capitalised mid- sentence reads as a typo). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Closes the Cleanup TODO entry by declaring it out of scope instead of implementing it. The original TODO asked for
applyAlterTableto reject the ALTER clauses it doesn't model, instead of silently skipping them. I prototyped that as a--strictopt-in flag (covering bothapplyAlterTableand the symmetric top-level skip path) and decided the whole feature isn't worth shipping for v1 — the silently-skipped behaviour is intentionally permissive so rawmysqldumpoutput keeps parsing without manual editing.This PR drops the TODO entry and documents the actual current behaviour as a deliberate design choice instead of a future fix.
Changes (docs only, no code)
TODO.md: removed the Cleanup section's only entry. The section itself goes too —Cleanupwas a one-line bin and is now empty.AGENTS.md: the existingapplyAlterTableparagraph now spells out that every other ALTER clause is silently skipped, and that the symmetric top-level skip exists for the samemysqldump-compatibility reason. Mentions the--strictprototype + v1 decision and points to CAVEATS.md.CAVEATS.md: new "Unmodelled SQL in desired-side files is silently skipped" section with:ALTER TABLE t ADD COLUMN c INTin desired SQL silently does nothing)CREATE TABLE; out-of-band for DML)--strictmode is out of scope for v1Test plan
make lintmake test-unit🤖 Generated with Claude Code