docs: log the PR #84 postmortem test-coverage audit to TODO#85
Merged
Conversation
PR #84's review caught a real bug (catalog `loadColumns` leaked the trailing `INVISIBLE` token into `Column.OnUpdate` when both attributes sat on the same EXTRA row) that the original test suite missed because every existing test exercised attributes in isolation. The bug class — composed-state parsers where multiple branches read/write the same shared string — has more potential sites in the codebase. Audit those now so the next contributor working in the area can pick them up. Adds a "Medium — test coverage audit" section between the existing "Medium — silent diffs / fidelity gaps" (data-model fidelity) and "Low — tests / docs / release" (process), with six prioritised items: - Composed-state EXTRA / option parsing matrix tests for `catalog/loadColumns` and `loadIndexes`. - `parseCreateTable` column-loop interactions (inline PK / UNIQUE / REFERENCES × column attributes). - Index-comparison emitter ordering pins for `columnDefSQL`, `indexInlineSQL`, `constraintInlineSQL` (PR #84 pinned only INVISIBLE's slot). - Diff cross-cutting / order-sensitivity (column rename + drop with same name, index rename + DROP INDEX same plan, etc.). - Directive-composition pins for inline directives in one CREATE TABLE. - One "kitchen-sink" round-trip YAML fixture exercising every supported attribute together. Each item lists the surface, the missing combination, and a realistic-harm sketch so the work scope is clear without re-deriving context. Combined estimate: 2.5–3 days; recommended order is catalog matrix → kitchen-sink fixture → emitter ordering → diff → directive composition. 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 #85 +/- ##
=======================================
Coverage 86.62% 86.62%
=======================================
Files 30 30
Lines 3268 3268
=======================================
Hits 2831 2831
Misses 269 269
Partials 168 168 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a new TODO section capturing a postmortem-driven audit checklist for improving test coverage around “composed-state” parsing/emission interactions (motivated by the PR #84 review’s discovered bug class), so future contributors have a concrete, prioritized set of high-ROI test gaps to tackle.
Changes:
- Add “Medium — test coverage audit” section with prioritized, scoped test gap items across catalog parsing, parser interactions, emit ordering, diff order-sensitivity, and directive composition.
- Include rough effort estimates and a recommended execution order for the audit work.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+108
to
+116
| - **Emitter ordering tests (`columnDefSQL`, `indexInlineSQL`, | ||
| `constraintInlineSQL`).** PR #84 added an index-comparison | ||
| ordering pin for `INVISIBLE`'s position. The other emitters | ||
| still rely on `Contains` (order-blind). Add index-comparison | ||
| pins for: | ||
| - `columnDefSQL` with all attributes set: `CHARSET → COLLATE → | ||
| GENERATED → NOT NULL → DEFAULT → ON UPDATE → AUTO_INCREMENT → | ||
| INVISIBLE → COMMENT` | ||
| - `indexInlineSQL` / `Index.SQL()`: `UNIQUE → KEY_BLOCK_SIZE → |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #84's review caught a real bug (catalog
loadColumnsleaked the trailingINVISIBLEtoken intoColumn.OnUpdatewhen both attributes sat on the sameEXTRArow) that the original test suite missed because every existing test exercised attributes in isolation. The bug class — composed-state parsers where multiple branches read/write the same shared string — has more potential sites in the codebase. Audit those now so the next contributor working in the area can pick them up.Adds a "Medium — test coverage audit" section to
TODO.mdwith six prioritised items:catalog/loadColumnsandloadIndexes. Highest payoff — directly targets the same bug class as PR parser: support column-level INVISIBLE (MySQL 8.0+) #84.parseCreateTablecolumn-loop interactions — inline PK / UNIQUE / REFERENCES combined with NOT NULL / DEFAULT / ON UPDATE / CHECK.columnDefSQL,indexInlineSQL,constraintInlineSQL(PR parser: support column-level INVISIBLE (MySQL 8.0+) #84 pinned only INVISIBLE's slot; the other slots stayContains-only).-- myschema:renamed-fromacross columns × indexes × constraints in one CREATE TABLE.verify_no_drift: true. Highest single-test ROI.Each item lists the surface, the missing combination, and a realistic-harm sketch so the work scope is clear without re-deriving context. Combined estimate: 2.5–3 days; recommended order is catalog matrix → kitchen-sink fixture → emitter ordering → diff → directive composition.
Test plan
🤖 Generated with Claude Code