Conversation
|
Important Approval pendingCodeRabbit has no unresolved comments, but it skipped the latest review. Use the checkbox below to review the latest commit. CodeRabbit will approve the changes if it finds no blocking issues.
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 |
Review summaryThis is a solid, well-documented draft implementing a metrics ratchet for the disabled RuboCop Metrics cops. I posted inline comments on the specific issues found; overview below. Correctness / robustness
Design / maintenance overhead
Performance
Behavioral note
None of these are blockers for a draft — flagging them since the PR description says the baseline/CI-integration/tests are still in progress. The double-RuboCop-scan cost and the reuse-vs- |
Review summarySolid, well-scoped addition — a deterministic ratchet that prevents new RuboCop Metrics complexity while leaving the existing backlog and global disables untouched. Tests, docs, and the
No security concerns; this only shells out to pinned local tooling ( |
Address-review summaryScan scope: full review history; no previous address-review checkpoint. Status: cutoff-safe summary. All 20 inline threads were replied to and resolved; no review item remains pending. Detailed review outcomesMattered
Optional
Skipped
Deferred-work tracking: none. The two broader redesign suggestions were explicitly declined for this first baseline slice, not deferred. Next default scan starts after this comment. Say |
Review summaryReviewed the RuboCop Metrics ratchet: Overall assessment: solid. The core logic is correct and well-tested:
Two minor, non-blocking points left as inline comments:
No correctness, security, or test-coverage issues found. |
Address-review summaryScan scope: review activity after 2026-09-02T10:47:05Z. Status: cutoff-safe summary. The exact-head Claude review found no correctness, security, or coverage issues; both non-blocking threads have explicit outcomes and are resolved. Detailed review outcomesMattered
Optional
Skipped
Deferred-work tracking: none. No substantive follow-up was identified. Next default scan starts after this comment. Say |
|
Reconciled onto current main and pushed.
Next owner: GitHub Actions and reviewers. |
| The initial RuboCop 1.87.0 baseline contains 5,702 offenses across 153 files: | ||
|
|
||
| | Cop | Offenses | | ||
| | --- | ---: | | ||
| | `Metrics/AbcSize` | 1,509 | | ||
| | `Metrics/BlockLength` | 294 | | ||
| | `Metrics/ClassLength` | 99 | | ||
| | `Metrics/CyclomaticComplexity` | 489 | | ||
| | `Metrics/MethodLength` | 2,779 | |
There was a problem hiding this comment.
Doc counts don't match the committed fixture. The table says Metrics/AbcSize = 1,509, Metrics/MethodLength = 2,779, and a total of 5,702 offenses, but summing test/fixtures/rubocop-metrics-baseline.json gives 1,510 / 2,780 / 5,704:
jq '[.files[] | .["Metrics/AbcSize"] // [] | length] | add' test/fixtures/rubocop-metrics-baseline.json # 1510
jq '[.files[] | .["Metrics/MethodLength"] // [] | length] | add' test/fixtures/rubocop-metrics-baseline.json # 2780
jq '[.files[] | to_entries[] | .value | length] | add' test/fixtures/rubocop-metrics-baseline.json # 5704
Not release-blocking, but a maintainer using these numbers to gauge remaining backlog or verify a refresh will be off by 1-2 in three places. Worth regenerating the doc numbers from the fixture (or a refresh-time doc-check) rather than hand-typing them.
Review summaryReviewed the RuboCop metrics-baseline ratchet (
Left two inline comments, both non-blocking:
No security or correctness issues found; the two prior review threads (recurring double RuboCop pass, |
|
Current-head triage at |
Why
The repository globally disables eight default RuboCop Metrics cops because the existing backlog is too large for one safe refactor. Without a machine-readable allowance, new complexity can accumulate while maintainers reduce that backlog.
Refs #309.
What changed
checkandrefreshhelper. It groups offenses by tracked Ruby file and cop and stores sorted observed metric values.bin/lintreject new offenses, larger existing values, inline-disable bypasses, RuboCop version drift, and cop-set drift while preserving ordinary RuboCop diagnostics in the same run.How to review and verify
bin/rubocop-metrics-baselinefor deterministic collection and rank-by-rank comparison, then inspect the JSON fixture as generated debt rather than hand-authored policy.ruby bin/rubocop-metrics-baseline-test.rb,ruby bin/lint-test.rb,bin/rubocop-metrics-baseline check, andbin/lint..rubocop.ymldisable.Agent details
Commands and results
ruby bin/rubocop-metrics-baseline-test.rb— 8 runs, 34 assertions, passed.ruby bin/lint-test.rb— 16 runs, 146 assertions, passed.ruby bin/validate-doc-links-test.rb— 16 runs, 20 assertions, passed.bin/rubocop-metrics-baseline refreshfollowed bycheck— passed; the review refactor tightenedbin/lint-test.rbclass length from 226 to 213, and a second refresh produced no fixture diff.bin/lint— passed all five linters with pinnedyamllint1.37.1 installed in an isolated temporary virtual environment.git diff --check— passed.bin/validatewas intentionally not run under the implementation-lane constraint. Exact-head hosted Validate is the full-validation authority.Exact-head and replay evidence
db989c34d6910095a066beef07b67fb6be657c94.27b3261bf4d90d7b25b8f9dab77ae7ee65633646.mainand the merge base still equal the trusted base.checklist+replay. A GitHub file-map sweep covered all 56 openmainPRs and found 50, including this PR, that touch Ruby. The 49 other affected PRs must update to post-ratchetmainand rerun the current lint/CI before merge.QA Evidence
codex-m5-issue309-metrics-ratchet; focused local developer-workflow replay complete; exact-head hosted Lint and Claude review passed. Validate is blocked by an inherited prompt-budget failure reproduced on the trusted base.bin/lintpropagation, documentation links, all repository lint surfaces, and baseline metadata drift.27b3261bf4d90d7b25b8f9dab77ae7ee65633646.plan-pr-batch299-character prompt headroom check; the same command fails identically on trusted basedb989c34d6910095a066beef07b67fb6be657c94.bin/lintsmoke test exercised the developer workflow and failure propagation is covered by a focused process test.3406dc4a; the exact-head Claude review found no correctness, security, or coverage issues. Hosted Validate remains blocked by the inherited 299/300 prompt-headroom failure.Coordination and reviewer telemetry
aw-medium-wave9-20260901; live claim holdercodex-m5-issue309-metrics-ratchet; instance284734b7-45a2-4cf1-b125-6f51f35d493c.Decision log
Merge confidence
Draft. Exact-head Lint and Claude review passed with no unresolved threads. Validate is blocked by the inherited
plan-pr-batch299/300 prompt-headroom failure, reproduced unchanged on the trusted base. No merge is authorized in this lane.Audit receipts
No merge or completed-batch audit is in scope. Changelog classification:
deferred_to_update_changelog.