fix(skills): wrap generate-mdl SKILL.md's relationships.yml example under the required key - #2676
Conversation
…nder the required key Step 3 of the generate-mdl skill showed a bare top-level YAML list for relationships.yml. load_relationships() only reads a top-level `relationships:` mapping key, so a bare list silently loads as zero relationships; validate_project() (run by default before `wren build`) does catch it with an explicit error, but only because a fail-loud guard was added for hand-edited files after this example was written, not because the example itself was ever correct. Fixes Canner#2672
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review. WalkthroughThe MDL generation skill now nests relationship definitions under ChangesMDL relationship validation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The example now matches the required relationships.yml format, preventing users from following the documentation into a validation failure. No actionable merge-blocking risk remains after normal checks and review. Possibly related issues
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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 |
|
Checking in, no pressure. Let me know if anything here needs rework or more context. |
|
Thanks for the quick merge! |
Root cause
generate-mdl's SKILL.md, Step 3 — Write relationships, showed:a bare top-level YAML list.
load_relationships()(core/wren/src/wren/context.py)only reads a top-level
relationships:mapping key:so an agent following the doc verbatim ends up with a
relationships.ymlthat loads as zero relationships.
validate_project()does report a clearrelationships.yml must be a mapping with a 'relationships' key, got listerror for this exact shape (and by default
wren buildruns validationfirst and aborts on it), so the failure today is loud rather than silent —
but the doc's own example has never actually matched what the loader
expects.
Fix
Wrap the example under the
relationships:key, matching whatload_relationships/validate_projectrequire:Verification
test_generate_mdl_skill_step3_example_round_tripsin
tests/unit/test_context.py) reads the skill's own served content viawren.skills_delivery.get_skill("generate-mdl"), extracts the Step 2/Step 3YAML blocks, and feeds them through
load_relationships/validate_project.Fails on unmodified
main(load_relationshipsreturns 0 relationshipsinstead of 1); passes with this fix.
tests/unit/(excl.test_memory.py/test_mcp_server.py, matchingthis repo's
test-unitCI job): 1146 passed, 2 skipped, no regressions.ruff format --check src//ruff check src/clean.wren context init && wren buildrun against alive database: this is a pure-doc/test change and doesn't touch runtime code
paths beyond what the new test already exercises directly.
Summary by CodeRabbit
Bug Fixes
Tests