Skip to content

fix(db): warn only about expression indexes a SQLite revision misses; quieter smpy new (#917) - #925

Merged
antosubash merged 5 commits into
mainfrom
fix/issue-917-expression-index-warning
Nov 12, 2026
Merged

antosubash merged 5 commits into
mainfrom
fix/issue-917-expression-index-warning

Conversation

@antosubash

Copy link
Copy Markdown
Owner

Summary

  • The SQLite expression-index warning now names only expression indexes that the database does not have and the revision does not create. The revision hook first re-emits the indexes of new tables, then checks index names in sqlite_master, which SQLite records even though it cannot reflect their definitions.
    • Silent: a fresh app's initial schema, which creates ix_users_user_email_lower, and any unrelated revision.
    • Still warned: an expression index added to an existing table (the case Codex caught during review).
  • The advice in the hook warning, in SM026 and in the migrate note comes from one helper, expression_index_advice.
    • It names make migrations-roundtrip-pg only where the Makefile defines that target.
    • Elsewhere it says to run make migrate, then alembic check, against a PostgreSQL SM_DATABASE_URL, and links the docs.
  • smpy new changes:
    • It captures uv sync, npm install and alembic output and shows it only when a step fails.
    • It stops after a failed step.
    • It prints "Next steps" once, at the end, listing only the steps still to run.

Closes #917

Verification

  • Ran a real autogenerate in this repo against a fully migrated SQLite database: no framework banner.
  • Ran a real smpy new demo --yes: short output, next steps at the end, initial schema created.
  • Local CI: make lint, make test-py (8481 passed), make test-js (909 passed) all green.
  • Review: two Sonnet reviewers (correctness and maintainability, 3 passes) and Codex. Codex raised one P2, which is fixed and covered by a test; its final pass was clean.
  • Verification report: https://claude.ai/artifact/L6JvGSQ1chmAYxiqE73C7Z · /ship report: https://claude.ai/artifact/VKhW7xc8RCKJnax866oxQQ

Report links are Claude Artifacts and start private — the author can share them
from claude.ai/code/artifacts if reviewers need access.

Test plan

  • make migration on a migrated SQLite dev DB prints no expression-index banner
  • CI is green

https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Deploying simple-module-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: c0baefd
Status: ✅  Deploy successful!
Preview URL: https://58e6a3b8.simple-module-python.pages.dev
Branch Preview URL: https://fix-issue-917-expression-ind.simple-module-python.pages.dev

View logs

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-11-12T16:06:46.248601Z c0baefd PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@antosubash
antosubash merged commit 9380550 into main Nov 12, 2026
17 checks passed
@antosubash
antosubash deleted the fix/issue-917-expression-index-warning branch November 12, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant