Repository navigation
feat: module data-compatibility checks and smpy migrations prepare (#711) - #721
Merged
Merged
Conversation
Setup wizard answers 409 on a required data upgrade; token check samples rows and accepts any column wide enough for a digest; doctor skips a SQLite file that doesn't exist and warns when the DB is unreachable; docs and CLI skill. Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
…e token probe Token probe checks the whole table (LIMIT 1) so plaintext rows behind hashed ones are found; smpy doctor errors clearly without the framework installed; shared alembic_host fixture; recipe ids tied to module constants; docs. Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
Defer the boot check on a partly migrated first run; doctor fails on a crashing module check and warns only when the DB is unreachable; modules without the hook open no session. Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
Deploying simple-module-python with
|
| Latest commit: |
cf8ae56
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7c0389e7.simple-module-python.pages.dev |
| Branch Preview URL: | https://feat-b34-data-compat.simple-module-python.pages.dev |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
7 tasks
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.
Scaffolded hosts own their Alembic history, so data migrations shipped with framework modules never reached them. Hosts are now told when an upgrade is missing, and the CLI writes the revision for them.
Closes #711
What changed
ModuleBase.check_data_compatibility(db), returningDataCompatibilityIssue(upgrade_id, message, severity)(a frozen dataclass, so core gains no dependency). Checks are keyed by stable ids, not revision ids, so a host with its own equivalent port passes.users.hashed_bearer_tokens_v1(error): a token column too short for a SHA-256 digest, or any stored token that isn't a 64-character hex digest. This is oneSELECT … LIMIT 1over the whole table. An earlier version sampled rows, and the automated security review pointed out that plaintext rows behind hashed ones could slip through.mail.settings_namespace_v1(warning): system-scopeusers.mailer/SMTP keys that were never moved tomail.*.errorrefuses boot outside development; awarningonly logs.make doctor, newsmpy doctor) reportsSM033.app.db).smpy doctorwithout the framework installed prints a clear error.smpy migrations prepare <upgrade-id> --head <label>@headwrites a self-contained revision into the host's ownmigrations/versionsfrom frozen recipes in the CLI package, and never applies it.docs/guide/upgrading.md, plus lifecycle, migrations, diagnostic codes (SM033), CLAUDE.md (hook list, what fails a production boot), the shippedsimple-module-cliskill and the scaffold README.a626b1c8d023is not data-only. It deletes credentials and changes column types, which is why its recipe orders those steps.Verification
make lint✓ ·make test-js✓ ·make test-py✓ (6681 passed, 43 skipped) ·make doctor✓ (0 errors, 0 warnings)--headhandling, refusal to overwrite.test_cli_prepare_data_postgres.py) runs in the Postgres workflow; I didn't run it locally.https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4