fix: add tdd.enforce to generate_default_config() and regression tests (#340)#341
Conversation
#340) The tdd.enforce config option was added in #285 with a MapConfig field and load_map_config() alias, but was not documented in generate_default_config(). Users running `mapify init` had no way to discover the option. Fix: add a commented example block to generate_default_config() explaining the option's behavior and default value. Regression: add TestVc9DefaultConfigCompleteness tests to prevent future config options from being silently omitted from the generated default config. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XEQFrmNrKSrpTMqULhrZGH
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds a commented ChangesTDD Config Discoverability Fix
Estimated code review effort: 1 (Trivial) | ~5 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Fixes #340.
The
tdd.enforceconfig option was introduced in #285 with:tdd_enforce: bool = Falsefield onMapConfig("tdd.enforce", "tdd_enforce")alias inload_map_config()But the corresponding documentation block was not added to
generate_default_config(), meaning users who runmapify inithad no way to discover this option in their generated.map/config.yaml.Changes
src/mapify_cli/config/project_config.py: Added a commented example block fortdd.enforceingenerate_default_config(), explaining what it does, when to use it, and that it defaults to off.tests/test_project_config.py: AddedTestVc9DefaultConfigCompleteness— a regression test class that guards against future config options being silently omitted fromgenerate_default_config(). Tests verify:tdd.enforceappears in the generated default configexecution.max_actors,tdd.enforce) are documentedTest plan
uv run pytest tests/test_project_config.py -v— 70 passeduv run ruff check src/ tests/test_project_config.py— no issuesGenerated by Claude Code
Summary by CodeRabbit