Make the new-offense gate ignore metric scores in offense messages #1343
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1343
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
FastGate::NewOffenseCheckkeys offenses by [path, cop, message]. Metric cops put the score in the message. An edit that lowers an existing offense score therefore appears as a new offense.Observed
Metrics/AbcSizemessage<7, 21, 2> 22.23/15on main became<6, 19, 1> 19.95/15after an edit that lowered the score.Layout/LineLengthmessages carry125/120. The check reported both as new offenses.bin/os-sdlc-lintand the fast gate both use the check. Seen onAdr::Migration#convert(plugins/os-adr/lib/adr/migration.rb) and plugins/os-sdlc/tests/support/evidence_report_scenario.rb:31.Reproduce
n/a: found by inspection during #1322. Any edit that lowers a metric score on an existing offense triggers it.
Origin
VERDICT: CREATE
Occurrence: fast-gate NewOffenseCheck reports a smaller Metrics offense as new
Seen: fast-gate NewOffenseCheck
Run: fast-batch-15, session 01c29715
Adds: Metrics length messages carry the count, for example Metrics/ClassLength [144/100] on the branch against 145/100 on main. The offense got smaller, but the gate reported it as new and failed.