feat: carry the corrected value in a fix field on every check - #32
Conversation
commit-check now names the correction when a failed check has an unambiguous one and serialises it as "fix" (commit-check#564). The server already returns to_dict() as is, so the value flows through once that release is installed; with an older commit-check the key was simply absent, and an agent had to probe for it. Give the key a stable presence, empty when the engine has nothing to say, and tell agents in the tool descriptions how to use it: apply a non-empty fix as it stands, rewrite from the suggestion otherwise. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018xYa7m3qup5wyN5MaXFgf6
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughValidation results now include a ChangesValidation fix field
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Validation results now consistently include a fix field while retaining corrections from newer engines and safely supporting older versions. Documentation and tests cover the contract, with no current merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 58.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 2 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #32 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 2
Lines 203 205 +2
=========================================
+ Hits 203 205 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
## What Restores the MCP guide paragraph held back from #32. commit-check/commit-check-mcp#32 gives every check a `fix` key: populated with the corrected value when commit-check can name one, empty otherwise. The guide now says so, with a pointer to [Reading the JSON](https://commit-check.com/example/#reading-the-json) for the field's semantics. Merge after commit-check-mcp#32 ships, so the guide describes a released server. Docs-sync tests: 9 passed.
What
commit-check/commit-check#564 makes a failed check name its correction when the fix is unambiguous and serialises it as a
fixfield next tosuggest. This PR makes that field part of the MCP contract._run_checksgives every check afixkey. With a commit-check that emits it, the engine's value flows through untouched; with an older commit-check the key is present and empty, so an agent can always testcheck["fix"]instead of probing for it.fixas it stands, rewrite fromsuggestwhen it is empty.Tests
main, whereFix: add xcomes back with"fix": "fix: add x"andsuggestUse "fix: add x".No dependency bump: the passthrough works with the existing
commit-check>=2.11.0floor, and populated values arrive as soon as the next commit-check release is installed.🤖 Generated with Claude Code
https://claude.ai/code/session_018xYa7m3qup5wyN5MaXFgf6
Generated by Claude Code
Summary by CodeRabbit
New Features
fixfield for every check.fixcontains the corrected value; otherwise, it remains empty.suggestfield.Documentation
suggestandfix, including compatibility details for older releases.