Skip to content

docs(review): record the unbumped catalog-schema-version pattern - #1197

Merged
ako merged 1 commit into
mainfrom
docs/review-findings-row-33
Sep 25, 2026
Merged

ako merged 1 commit into
mainfrom
docs/review-findings-row-33

Conversation

@ako

@ako ako commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

What

One row in the /mxcli-dev:review Recurring 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 createTables without bumping CatalogSchemaVersion. The version guard only drops tables when the version changes, and CREATE TABLE IF NOT EXISTS never adds a column to a table that already exists — so every user with a cached catalog keeps a table the new SELECT cannot read.

Measured on #1181, one project, one catalog file, two binaries:

activities_for yields exit
main 302 activities 0
the branch 0 activities 1
SQL logic error: no such column: UseRequestTimeout (1)

mxcli lint at least fails loudly. mxcli report runs the same rules through the same LintContext and never calls QueryErrors(), 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:

  • the cache has to actually be reused — building it with one -p spelling and running the new binary with another invalidates on Cache invalid: MPR path changed and rebuilds;
  • a default lint run 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

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>
@github-actions

Copy link
Copy Markdown

AI Code Review

Critical Issues

None

Moderate Issues

None

Minor Issues

None

What Looks Good

  • The PR adds a new pattern (row 33) to the recurring findings table in .claude/commands/mxcli-dev/review.md, documenting the unbumped catalog-schema-version bug discovered in feat(lint): expose the Call REST service activity's timeout #1181.
  • The pattern description is clear, concise, and follows the existing format: problem explanation → measurement/evidence → category → fix recommendation.
  • The fix recommendation ("Bump the constant in the same commit") is actionable and aligns with the precedent mentioned (commit 62913741).
  • The reproduction instructions are thorough, specifying the need to reuse the cache with identical -p spelling and verify the "Loading cached catalog … (from cache)" message.
  • The change is strictly documentation (no code changes), scoped to a single concern (recording a bug pattern), and maintains consistency with the table's structure.
  • No overlap with existing patterns (row 32 covers a different issue), and the PR correctly notes it follows the already-merged fix in docs(review): record the dead-code-beside-a-new-diagnostic pattern #1194.

Recommendation

Approve 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

@ako
ako merged commit e5c4f2c into main Sep 25, 2026
15 checks passed
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.

1 participant