Skip to content

refactor(benchmark): compute submission rates with one rounding rule - #188

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/submission-metric-ratios
Nov 20, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/submission-metric-ratios

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Summary

Security Signals scoring used two implementations of the same guarded division. Use a single private function for the count-based rates and the F1 calculation. Integer inputs still convert to floating point before division, and scoring retains the same zero-denominator handling and four-decimal rounding.

Scope and trust impact

This only changes the arithmetic helper inside the submission scorer. Label validation, input loading, score fields, and publication behavior keep their existing contracts.

Verification

  • go test -count=1 ./internal/runner -run ValidateSecuritySignalsSubmission, go test -count=1 ./..., go vet ./..., and go run ./cmd/clawscan --help passed.
  • Ran scripts/validate-security-signals-submissions.sh over the reference and all-clean prediction files using a local endpoint backed by the committed expected labels. Each submission contained 3,368 cases. Every metric matched the saved result, including precision and F1 for the zero-positive prediction set.
  • The frozen base requires the short dataset ID. Only the temporary copies of the example metadata used that spelling.

@clawsweeper

clawsweeper Bot commented Nov 20, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@vincentkoc
vincentkoc marked this pull request as ready for review November 20, 2026 09:48
@vincentkoc
vincentkoc requested review from a team and Patrick-Erichsen as code owners November 20, 2026 09:48
@vincentkoc
vincentkoc merged commit 66ecdaf into main Nov 20, 2026
11 checks passed
@vincentkoc
vincentkoc deleted the refactor/submission-metric-ratios branch November 20, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant