Skip to content

fix(setup): reserve 'render' as a module directory name - #2896

Open
gmoncor wants to merge 2 commits into
bmad-code-org:devfrom
gmoncor:fix/s01-10-reserve-render-module
Open

gmoncor wants to merge 2 commits into
bmad-code-org:devfrom
gmoncor:fix/s01-10-reserve-render-module

Conversation

@gmoncor

@gmoncor gmoncor commented Sep 17, 2026

Copy link
Copy Markdown

What: Add "render" to RESERVED_MODULE_DIRS in setup.py so a packaged module cannot use that name.

Why: render_skill.py writes its content-addressed snapshot to _bmad/render//-, at the same tree level as installed modules; a module literally named render would collide with that directory, and no existing reserved-name guard covers it.

How:

  • Add "render" to the RESERVED_MODULE_DIRS frozenset in setup.py.
  • Add a case to the existing reserved-module test table in test_bmad_setup.py mirroring the existing case-insensitive "ScRiPtS" case.

Testing: Ran tools/tests/test_bmad_setup.py; the new case fails before the fix and passes after (ablation-check by temporarily removing the frozenset entry).

🤖 Generated with Claude Code

@gmoncor
gmoncor force-pushed the fix/s01-10-reserve-render-module branch from 1e8f4b2 to 1ba6fbd Compare September 23, 2026 10:27
…ases

The two new reserved-module-render cases called a helper
(dump_manifest_toml) that does not exist in this test file and used
'module' instead of 'code' as the field key, so the whole containing
test method raised NameError before running. Switched both cases to
dump_bmod_toml(bmod={...}), matching the sibling
case-insensitive-reserved-module case right above them.
@gmoncor
gmoncor marked this pull request as ready for review September 23, 2026 11:40
@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai review

@greptile-apps

greptile-apps Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge.

Summary

Reserves render as a module directory name to prevent collisions with rendered skill snapshots.

  • Uses the existing case-insensitive module-name validation.
  • Adds regression cases for render and ReNdEr.
  • No actionable defects or applicable rule violations identified.

Reviews (1) · Last reviewed commit: "fix(tests): use the real bmod-file test ..."

@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: bmad-code-org/BMAD-METHOD/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: e5f7c994-62b8-4ab2-92aa-3ef4e1152730

📥 Commits

Reviewing files that changed from the base of the PR and between 1b59caa and 9c8b083.

📒 Files selected for processing (2)
  • skills/bmad/scripts/setup.py
  • tools/tests/test_bmad_setup.py

Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The setup script now treats render as a reserved module code. Tests check that lowercase and mixed-case forms are rejected as unsafe.

Changes

Bmod validation

Layer / File(s) Summary
Reserve render module code
skills/bmad/scripts/setup.py, tools/tests/test_bmad_setup.py
The reserved module-code list includes render. Tests verify that render and ReNdEr are rejected as unsafe.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Suggested reviewers: alexeyv

Merge Risk: ⚪ Minimal · up to 9c8b0

The reservation and its tests align with the intended collision prevention; no actionable merge risk remains after normal checks.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: reserving "render" as a module directory name.
Description check ✅ Passed The description explains the change, the collision risk, the implementation, and the test coverage. It is directly related to the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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.

This branch has not been deployed

No deployments
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.

1 participant