Skip to content

🐛 fix: fail fast on invalid roles and target config#28

Merged
zrr1999 merged 2 commits intomainfrom
fix/strict-role-loading-target-config
Mar 16, 2026
Merged

🐛 fix: fail fast on invalid roles and target config#28
zrr1999 merged 2 commits intomainfrom
fix/strict-role-loading-target-config

Conversation

@zrr1999
Copy link
Copy Markdown
Owner

@zrr1999 zrr1999 commented Mar 16, 2026

Summary

  • fail fast when source, project, or user role files are malformed instead of silently skipping them during add, list, or render
  • honor explicit target config for model-less adapters like Cursor and Windsurf while rejecting unsafe project-external output directories
  • isolate cached GitHub sources by ref and harden loader parsing around frontmatter fences and missing prompt_file references
  • consolidate duplicated Cursor/Windsurf adapter tests into shared parametrized coverage while tightening regression assertions

Why

  • silent partial success made broken role definitions easy to miss and left renders in a misleading state
  • CLI target resolution incorrectly assumed every adapter required model_map, which broke valid Cursor/Windsurf configs
  • unchecked output paths and ref-colliding caches weakened safety and reproducibility
  • the adapter test suite had copy-pasted coverage that was harder to maintain than a shared regression matrix

Testing

  • just ci

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
role-forge Ready Ready Preview, Comment Mar 16, 2026 0:15am

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 16, 2026

Merging this PR will not alter performance

✅ 1 untouched benchmark


Comparing fix/strict-role-loading-target-config (e041475) with main (0ad5193)

Open in CodSpeed

@zrr1999 zrr1999 merged commit 3996d70 into main Mar 16, 2026
10 checks passed
@zrr1999 zrr1999 deleted the fix/strict-role-loading-target-config branch March 16, 2026 12:32
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