Skip to content

fix: add tdd.enforce to generate_default_config() and regression tests (#340)#341

Merged
azalio merged 1 commit into
mainfrom
claude/compassionate-cerf-77tz1n
Jul 6, 2026
Merged

fix: add tdd.enforce to generate_default_config() and regression tests (#340)#341
azalio merged 1 commit into
mainfrom
claude/compassionate-cerf-77tz1n

Conversation

@azalio

@azalio azalio commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes #340.

The tdd.enforce config option was introduced in #285 with:

  • A tdd_enforce: bool = False field on MapConfig
  • A ("tdd.enforce", "tdd_enforce") alias in load_map_config()

But the corresponding documentation block was not added to generate_default_config(), meaning users who run mapify init had 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 for tdd.enforce in generate_default_config(), explaining what it does, when to use it, and that it defaults to off.

  • tests/test_project_config.py: Added TestVc9DefaultConfigCompleteness — a regression test class that guards against future config options being silently omitted from generate_default_config(). Tests verify:

    • tdd.enforce appears in the generated default config
    • The generated config is valid YAML (after stripping comments)
    • All known active options (execution.max_actors, tdd.enforce) are documented

Test plan

  • uv run pytest tests/test_project_config.py -v — 70 passed
  • uv run ruff check src/ tests/test_project_config.py — no issues

Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Updated the default configuration template to include a commented example for the TDD enforcement setting.
    • Improved configuration completeness checks so the generated default config stays valid and includes expected documented options.

#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
@azalio azalio merged commit a4cd585 into main Jul 6, 2026
1 of 2 checks passed
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9e4d4e55-0981-4460-be83-a8e56298044e

📥 Commits

Reviewing files that changed from the base of the PR and between 51afd96 and efb5c26.

📒 Files selected for processing (2)
  • src/mapify_cli/config/project_config.py
  • tests/test_project_config.py

📝 Walkthrough

Walkthrough

Adds a commented tdd.enforce: false example block to the .map/config.yaml template generated by generate_default_config(), and adds a new test suite verifying the generated config documents all active options and remains valid YAML.

Changes

TDD Config Discoverability Fix

Layer / File(s) Summary
Default config template update
src/mapify_cli/config/project_config.py
Adds a commented section describing TDD enforcement with tdd.enforce: false to the generated default config template.
Completeness regression tests
tests/test_project_config.py
Imports generate_default_config, updates module docstring with issue/coverage references, and adds TestVc9DefaultConfigCompleteness verifying tdd.enforce appears, the config remains parseable YAML after stripping comments, and expected option aliases are documented.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Poem

A missing knob, now found at last,
tdd.enforce set in the cast,
Comments bloom in YAML light,
Tests confirm it all is right,
Hop hop hooray, the config's fast! 🐇

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/compassionate-cerf-77tz1n

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tdd.enforce config option missing from generate_default_config() — undiscoverable after mapify init

2 participants