docs(review): record the unbumped catalog-schema-version pattern - #1197
Merged
Merged
Conversation
From the review of #1181. A column added to createTables without bumping CatalogSchemaVersion: the version guard only drops tables when the version CHANGES, and CREATE TABLE IF NOT EXISTS never adds a column, so every user with a cached catalog keeps a table the new SELECT cannot read. Measured: activities_for yielded 302 activities on main and 0 on the branch against the same cache file, with `no such column: UseRequestTimeout` and `mxcli lint` exiting 1. `mxcli report` runs the same rules through the same LintContext and never calls QueryErrors(), so there the same stale cache scores the project silently. The canonical fix carries the reproduction, because the obvious attempt does not reproduce it: the cache has to actually be REUSED. Building it with one `-p` spelling and running the new binary with another invalidates on "MPR path changed" and rebuilds, and a default lint run builds a fast catalog with zero activities — either way the run is green and the bug invisible. Confirm the output says "Loading cached catalog … (from cache)" first. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
AI Code ReviewCritical IssuesNone Moderate IssuesNone Minor IssuesNone What Looks Good
RecommendationApprove the PR. The change is a valuable addition to the contributor checklist that will help prevent similar caching-related schema version bugs in the future. The documentation is accurate, well-formatted, and ready for use. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
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.
What
One row in the
/mxcli-dev:reviewRecurring Findings table, from the review of #1181. Contributor-only file; nothing shipped changes. Follows #1194 (row 32), which is already merged.The pattern
A column added to
createTableswithout bumpingCatalogSchemaVersion. The version guard only drops tables when the version changes, andCREATE TABLE IF NOT EXISTSnever adds a column to a table that already exists — so every user with a cached catalog keeps a table the newSELECTcannot read.Measured on #1181, one project, one catalog file, two binaries:
activities_foryieldsmainmxcli lintat least fails loudly.mxcli reportruns the same rules through the sameLintContextand never callsQueryErrors(), so there the same stale cache scores the project silently.Why the canonical fix carries a reproduction
Because the obvious attempt does not reproduce it, and comes back green:
-pspelling and running the new binary with another invalidates onCache invalid: MPR path changedand rebuilds;lintrun builds a fast catalog with zero activities, which never exercises the path.Either way the run is green and the bug invisible. Confirm the output says
Loading cached catalog … ✓ Catalog ready (from cache)before believing it. Both of those wasted a pass of mine before the failure showed up.🤖 Generated with Claude Code