Skip to content

docs: mark unmodelled SQL skip as out of scope (no --strict in v1)#44

Merged
winebarrel merged 5 commits into
mainfrom
out-of-scope-unmodelled-sql-skip
May 3, 2026
Merged

docs: mark unmodelled SQL skip as out of scope (no --strict in v1)#44
winebarrel merged 5 commits into
mainfrom
out-of-scope-unmodelled-sql-skip

Conversation

@winebarrel

Copy link
Copy Markdown
Owner

Summary

Closes the Cleanup TODO entry by declaring it out of scope instead of implementing it. The original TODO asked for applyAlterTable to reject the ALTER clauses it doesn't model, instead of silently skipping them. I prototyped that as a --strict opt-in flag (covering both applyAlterTable and 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 raw mysqldump output 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 — 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 silently skipped, and that the symmetric top-level skip exists for the same mysqldump-compatibility reason. 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:
    • Full inventory of what gets skipped (top-level: CREATE TRIGGER / SET / DROP TABLE / INSERT / etc.; ALTER: ADD COLUMN / MODIFY COLUMN / partition ops / etc.)
    • Rationale (mysqldump-output compatibility)
    • Impact (footgun: ALTER TABLE t ADD COLUMN c INT in desired SQL silently does nothing)
    • Workaround (express schema state via CREATE TABLE; out-of-band for DML)
    • Note that --strict mode is out of scope for v1

Test plan

  • make lint
  • make test-unit

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings May 3, 2026 06:35
@codecov

codecov Bot commented May 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.64%. Comparing base (aee61ae) to head (b968b38).
⚠️ Report is 8 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 TABLE clauses.
  • Documented the current “silently skipped” behavior (top-level statements and unmodelled ALTER TABLE options) and the v1 rationale in CAVEATS.md.
  • Expanded AGENTS.md parser notes to reference the skip behavior and the out-of-scope --strict prototype.

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.

Comment thread CAVEATS.md Outdated
Comment thread CAVEATS.md Outdated
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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread CAVEATS.md Outdated
…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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread CAVEATS.md Outdated
Comment thread AGENTS.md Outdated
…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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread CAVEATS.md Outdated
Comment thread CAVEATS.md Outdated
Comment thread AGENTS.md
… + 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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@winebarrel winebarrel merged commit acfce26 into main May 3, 2026
9 checks passed
@winebarrel winebarrel deleted the out-of-scope-unmodelled-sql-skip branch May 3, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants