| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
validate_all_detailed now populates CheckOutcome.value on pass as well as fail, with the concrete value each validator checked (commit subject, branch name, author name/email, push refs). Structured consumers such as --format json, the Python API, and commit-check-action can therefore show what was validated even when every check passed.
📝 Walkthrough
WalkthroughValidation results now retain the concrete value evaluated by each validator. Detailed and JSON outputs include these values for passing checks. Tests cover message, subject, author, and branch validation. ChangesValidation value reporting
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: minor 🚥 Pre-merge checks | ✅ 5 ✅ Passed checks (5 passed)
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. ❤️ ShareComment @coderabbitai help to get the list of available commands. |
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #522 +/- ##
==========================================
+ Coverage 97.40% 97.68% +0.28%
==========================================
Files 12 12
Lines 1231 1254 +23
==========================================
+ Hits 1199 1225 +26
+ Misses 32 29 -3 ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agentsVerify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. Inline comments: In `@commit_check/engine.py`: - Line 652: Update ForcePushValidator.validate() so each successful local_ref -> remote_ref result is accumulated rather than overwriting self._checked_value, and serialize the complete collection according to the CheckOutcome.value contract consumed by validate_all_detailed(). Add a regression test covering a successful multi-reference push and asserting every validated reference is preserved. - Around line 703-704: Update the `ignore_authors` rule setup around `CommitTypeValidator` so `_checked_value` is assigned the resolved commit author before `_should_skip_commit_validation()` evaluates it, rather than the commit message. Preserve the empty result for ignored authors and verify both ignored and non-ignored author paths. - Line 914: Update AiAttributionValidator.validate() to assign _checked_value on every concrete validation path, including successful returns after reading the commit body and when the policy is not forbid. Preserve the existing failure assignment and ensure validate_all_detailed() receives the actual ai_attribution value for passing results.
Fix all unresolved CodeRabbit comments on this PR:
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: d5c4c596-5bef-4f34-b6ea-d41350b8f40b
📥 CommitsReviewing files that changed from the base of the PR and between 5c39e5f and 6a38436.
📒 Files selected for processing (3)
Sorry, something went wrong.
- accumulate every validated ref pair in no_force_push instead of overwriting on multi-ref pushes - record the resolved commit author for the ignore_authors rule and keep the value empty when the author is ignored - record the scanned message for ai_attribution when forbid policy finds no signature; ignore policy remains a no-op without a value
Merging this PR will improve performance by ×3.4⚡ 1 improved benchmark Performance Changes
Tip Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent. Comparing feature/checked-value-in-json-output (433f6a7) with main (5c39e5f) Footnotes
|
Sorry, something went wrong.
The checked value now shares the branch name with the failure path instead of issuing a second git subprocess call, keeping the upstream fallback path at one branch-name lookup per run.
validate_all_detailed opts validators into value collection; text-mode validation stays free of the extra git subprocess calls (branch name lookup in the force-push upstream fallback, author resolution for ignore_authors), keeping the benchmarked pass paths unchanged.
|
Sorry, something went wrong.
## What Adds the v2.13.1 entry to the changelog: - **New feature**: `--format json` and `validate_all_detailed()` now report the checked value on passing checks (PR [commit-check/commit-check#522](commit-check/commit-check#522)) - Highlights table row for 2.13.1, linking to the "Output for scripts and CI" recipe
| Back | FazBrowse Home | New Git URL |
What
validate_all_detailed() now populates CheckOutcome.value on pass as well as fail, with the concrete value each validator actually checked.
Why
Structured consumers (--format json, the Python API, and commit-check-action) currently receive value: "" for every passing check. The action's success report wants to show what was validated (PR title, commit subject, branch name, author name/email) — that data is collected in the validators but thrown away on pass.
Changes
No change to terminal output: the text path never printed values on pass, and it still doesn't.
Example
{ "rule_id": "CC001", "check": "message", "status": "pass", "value": "feat: add login page" }Value semantics
value is the raw input the validator actually checked, identical on pass and fail (fail uses the same value recorded by _print_failure), except where noted:
Notes for consumers:
Tests
Summary by CodeRabbit