-
Notifications
You must be signed in to change notification settings - Fork 8
cli/validate: log failed HARD_CHECK_KEYS for hard verification #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
cli/validate: log failed HARD_CHECK_KEYS for hard verification #23
Conversation
WalkthroughAdded detailed logging on hard verification failures in the CLI validator by computing the specific failed check keys and appending them to the log message. No control flow or error handling changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
grail/cli/validate.py (1)
1251-1256: Prefer lazy logging with parseable payloadUse logger’s %s formatting and emit a JSON array for easier grepping/metrics. Minor style/perf win.
Apply this diff:
- failed_keys = [k for k in HARD_CHECK_KEYS if not checks.get(k, False)] - logger.warning( - f"Hard verification failed for uid {uid_str}; " - f"invalidating uid for window {target_window}; " - f"failed checks = {failed_keys}" - ) + failed_keys = [k for k in HARD_CHECK_KEYS if not checks.get(k, False)] + logger.warning( + "Hard verification failed for uid %s; invalidating uid for window %s; failed_checks=%s", + uid_str, + target_window, + json.dumps(failed_keys), + )
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
grail/cli/validate.py(1 hunks)
🔇 Additional comments (1)
grail/cli/validate.py (1)
1251-1256: LGTM: logging failed HARD_CHECK_KEYS meets the PR objectiveCaptures and reports exactly which hard checks failed; keeps order stable via HARD_CHECK_KEYS.
Log which HARD_CHECK_KEYS failed in grail/cli/validate.py
Summary by CodeRabbit