Skip to content

Map do.md severities (blocker/major/minor) in Severity.from_input#750

Merged
gggdttt merged 1 commit into
mainfrom
fix/codereview-severity-aliases
Jul 24, 2026
Merged

Map do.md severities (blocker/major/minor) in Severity.from_input#750
gggdttt merged 1 commit into
mainfrom
fix/codereview-severity-aliases

Conversation

@gggdttt

@gggdttt gggdttt commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

What

Map the BCQuality skills/do.md severities blocker, major, and minor to the canonical BC-Bench severities in Severity.from_input:

  • blocker -> critical
  • major -> high
  • minor -> low

Why

The production AL review engine (via Invoke-LocalReview.ps1 / do.md contract) emits findings with severities blocker | major | minor | info. BC-Bench's _SEVERITY_ALIASES only recognized error | warning | suggestion | info, so blocker, major, and minor raised ValueError and were silently coerced to unspecified severity. The finding still counted toward precision/recall, but its severity was dropped, so severity_mae was computed against the wrong (missing) value.

This closes the severity gap that surfaces when scoring engine output through the code-review pipeline. It is independent of the engine-adapter alignment work and can merge on its own.

Tests

Extended TestSeverity::test_aliases_map_to_canonical_severities with the three new aliases. pytest tests/test_codereview.py::TestSeverity passes (7/7); ruff check clean.

The production review engine emits blocker|major|minor|info per BCQuality skills/do.md, but _SEVERITY_ALIASES only knew error|warning|suggestion|info, so blocker/major/minor coerced to unspecified severity and were dropped from severity_mae. Add blocker->critical, major->high, minor->low.
Copilot AI review requested due to automatic review settings July 23, 2026 13:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds BCQuality severity aliases to preserve severity scoring in code-review evaluations.

Changes:

  • Maps blocker, major, and minor to canonical severities.
  • Adds unit coverage for each mapping.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/bcbench/dataset/codereview.py Adds BCQuality severity aliases.
tests/test_codereview.py Tests the new mappings.

@gggdttt
gggdttt merged commit 04fb145 into main Jul 24, 2026
14 checks passed
@gggdttt
gggdttt deleted the fix/codereview-severity-aliases branch July 24, 2026 07:24
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.

3 participants