Phase 1: optional User example slice + bake matrix#27
Merged
Conversation
Wire the include_user_example flag: conditional _exclude drops the User slice (commands, events, model, adapters, routes, reader, handlers, migration, and user tests) when off, and bootstrap/router/migrations/unit-of-work are Jinja-guarded so the off path yields a coherent monitor-only service. Add generic core tests (unit-of-work lifecycle, self-contained messagebus and messages) so both states stay at 100% coverage, and extend the bake-test into a true/false matrix that runs ruff check, ruff format --check, pyrefly, and pytest --cov-fail-under=100 for each. Bakes proven green both ways: User-on 56 tests / User-off 34 tests, 100% coverage each. Closes #21 Closes #22 Refs #24 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Phase 1 — Optional User example slice (#21) + bake matrix (#22)
Makes the
include_user_exampleCopier flag functional and proves both template states with a feature-flag bake matrix.#21 — optional User slice
_exclude(templated, gitignore-style wildcards) drops the entire User slice wheninclude_user_example=false: commands, events, model, adapters (model/repository/queries), routes, reader, handlers, the create-users migration, and all user tests.bootstrap.py,router.py,migrations/env.py, and both unit-of-work modules are Jinja-guarded so the OFF path yields a coherent monitor-only service (empty bus, no user reader) that still imports, types, and runs.#22 — bake matrix
tests/test_bake.pynow parametrizes overinclude_user_exampletrue/false; each variant runsuv sync,ruff check,ruff format --check(newly added to match the generatedmake lint),pyrefly check, andpytest --cov-fail-under=100.Validation (both states, full gate, green)
make lint(ruff format --check) passes for both states (70 / 54 files).Closes #21
Closes #22
Refs #24
🤖 Generated with Claude Code