Repository navigation
fix: guard gen-i18n against dropping namespaces; correct alembic branch-label docs - #403
Conversation
…s are not per-module rollback gen_i18n now fails (exit 1) when regenerating would delete a namespace present in the checked-in files (module not installed), unless --allow-removals. The dev-boot path warns and skips writing instead of crashing. CI gains a drift check. Docs, CLAUDE.md and the migrations skill no longer claim downgrade <module>@base is a per-module rollback. Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
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. |
Deploying simple-module-python with
|
| Latest commit: |
37dd985
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a531f661.simple-module-python.pages.dev |
| Branch Preview URL: | https://fix-gen-i18n-guard-and-alemb.simple-module-python.pages.dev |
/ship resultsReview: 2 passes (sonnet, built-in code-review). Pass 1: 5 findings, 3 fixed (pushed as aa5170a: QA (no browser surface; behaviour exercised directly), with
Local checks: Commit pushed: aa5170a. |
Fixes #329
Fixes #333
Summary
make gen-i18nsilently deletes keys for modules that aren't installed in the current venv #329:scripts/gen_i18n.pycompares top-level namespaces in the existinggenerated-resources.tswith the new emission. If any would disappear it exits 1 naming each namespace and key count and pointing atuv sync --all-packages;--allow-removalsoverrides (deleted module, or a deliberateSM_MODULES_ENABLEDsubset; subsetting behaviour is otherwise unchanged). The dev-boot path (emit_frontend_types, non-strict) logs a warning and skips writing instead of raising. Tests added inscripts/tests/test_gen_i18n.py. New CI step in thepython-lintjob (fulluv sync --all-packages) runs the generator thengit diff --exit-code packages/i18n/src/. Generator output is deterministic and was clean on main. The generated-file header now mentionsmake gen-i18n(hence the 1-line diff in both generated files).alembic downgrade <module>@basewalks the whole revision chain — the per-module rollback promised in module-authoring.md does not hold #333 (docs only, option 1): branch labels are a named target, not an isolated branch;downgrade <module>@basewalks the whole chain beneath it. Documented the safe removal recipe (downgrade to the first revision'sdown_revisiononly when the module is latest, otherwise a dedicated migration). Fixeddocs/module-authoring.md,CLAUDE.md,docs/database/migrations.md,docs/guide/{quickstart,first-module,project-structure}.md,docs/reference/make-commands.md, andskills/simple-module-migrations/SKILL.md. No scaffold template carried the claim. Historical specs/plans underdocs/superpowers/left untouched.Verification
make lintpasses.make test-py: 3574 passed, 1 failure (an existing gen_i18n test that tripped the new guard); fixed and re-run targeted (21 passed). The full suite was not re-run after that one-line test fix.https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4