Repository navigation
fix(cli,db): scaffold secrets, compose hardening, workspace add, UTCDateTime render (#440–#445) - #446
Merged
Merged
Conversation
…ateTime render - db: render sqlmodel UTCDateTime as sa.DateTime(timezone=True) and import sqlmodel for any other sqlmodel type (#440) - cli: generated secrets go to gitignored .env, .env.example keeps placeholders (#441) - cli: smpy add writes { workspace = true } for uv workspace members; cwd fallback for relative paths; create-module prints the add command (#442) - cli: smpy (not sm) in templates, commit uv.lock, snake_case DB name (#443) - cli: compose Postgres password from POSTGRES_PASSWORD, Postgres/Redis bound to 127.0.0.1 (#444) - cli: floor playwright>=1.45 in scaffold dev groups (#445) Closes #440, #441, #442, #443, #444, #445 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: |
9962a3e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c3a5e8c0.simple-module-python.pages.dev |
| Branch Preview URL: | https://fix-issue-batch-440-445.simple-module-python.pages.dev |
…rs, fold test helpers Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
This was referenced Oct 13, 2026
Closed
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.
Fixes the six issues filed from scaffolding a real app with
simple_module_cli0.0.35.Changes
render_itemand sqlmodel 0.0.48.UTCDateTimenow renders assa.DateTime(timezone=True), the same as thee5f2a8c1d7b3timestamptz migration. Any othersqlmodel.*type addsimport sqlmodelto the migration, so autogenerate no longer emits a file that fails withNameError..env.example.smpy newwritesSM_SECRET_KEYand the users token secrets to.env, which is gitignored. If.envalready exists, only keys it doesn't define yet are added. The committed.env.examplekeeps# KEY=placeholders. The template no longer shipsSM_SECRET_KEY=change-me-in-production: when the key is unset, one is generated at first boot.smpy addfor workspace members.smpy adddetects that a module path is a member of the enclosing uv workspace. It checksmembersglobs minusexclude. For a member it writes{ workspace = true }and an unpinned dependency, matching the scaffold's sample module. A relative path that doesn't exist under--pathfalls back to the cwd, and the error message names both bases. Inside a workspace,create-moduleprints the exactsmpy addcommand to run next.smpy, notsm.uv.lockis no longer gitignored, so applications commit their lockfile.demo_app).postgrespassword comes fromPOSTGRES_PASSWORDvia${POSTGRES_PASSWORD:?…}.smpy newgenerates it into.env, and the devSM_DATABASE_URLin.envuses the same password, sodocker compose up -d postgreskeeps working as a local dev database.127.0.0.1only.playwright>=1.45is added next topytest-playwrightin both scaffold dev groups.Docs updated: the installation guide, the project-structure guide, the workspace README template and the CHANGELOG. The CHANGELOG entry tells apps that already committed a generated
.env.exampleto rotate those secrets.Verification
make lint: green.make test-py: 3961 passed, 11 skipped, 1 xfailed.make migrations-roundtrip-pgon a disposable local DB: green. This repo already runs sqlmodel 0.0.48, andalembic checkshows no type drift after theUTCDateTimechange.smpy new demo-app --db postgresby hand:docker compose configaccepts the generated.env. With no env it fails withset POSTGRES_PASSWORD in .env.uv lockresolves playwright 1.63.0, pyee 13.0.1 and pytest-playwright 0.10.0.smpy create-module+smpy add ../modules/forest_plots --path host,uv locksucceeds.make test-jsand e2e (no frontend changes); a fulluv sync+ boot of a scaffolded app.Review follow-ups (/ship)
env_valuesparser,_set_sourcehelper, dead guard and unused return removed..envis written with mode0600..envkeeps itsPOSTGRES_PASSWORDand DB URL together; one is never replaced without the other.make docker-upprints which secrets to set when it creates.envfrom the template.create-modulehint wording is fixed.9962a3e5:make lintgreen;make test-py3963 passed, 11 skipped, 1 xfailed;make test-jsgreen.Closes #440, closes #441, closes #442, closes #443, closes #444, closes #445
https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4