Splits "Fehlalarm" into its two kinds before the pilot, so the labels users set from Wednesday on are clean training data for the finding classifier (#416).
Label
Status
Meaning
Fehlalarm – Regel
false_positive (existing, relabelled)
The rule fired on code that is fine: the finding is not real
Fehlalarm – Zuordnung
wrong_mapping (new)
The finding may be real, but it does not violate the CRA requirement it was mapped to
Behaviour
A reason is required for a wrong mapping, like an accepted risk.
FindingStatus::needs_reason() is shared by the agent and the dashboard.
The agent answers 422 without a reason.
The finding's page asks for one: "Warum verletzt der Befund die zugeordnete CRA-Anforderung nicht …"
The reason goes into the status history with who set it and when.
CRA status and OSCAL: a wrong mapping no longer counts against its controls. The finding keeps its control_refs, so which mapping was wrong stays on record, and the semantic pass skips it on rescans.
Bulk actions offer neither status that needs a reason; those are set on each finding's page.
MCP: the status list and counts include wrong_mapping.
Checks
fmt, and clippy with the CI flags on core, agent, MCP and both dashboard feature sets.
Tests: core 75, agent lib 459, dashboard 45 + 61.
New assertions:
a wrong mapping without a reason gets a 422;
a false positive still needs no reason;
a wrong-mapping finding no longer violates its control.
Splits "Fehlalarm" into its two kinds before the pilot, so the labels users set from Wednesday on are clean training data for the finding classifier (#416).
| Label | Status | Meaning |
|---|---|---|
| **Fehlalarm – Regel** | `false_positive` (existing, relabelled) | The rule fired on code that is fine: the finding is not real |
| **Fehlalarm – Zuordnung** | `wrong_mapping` (new) | The finding may be real, but it does not violate the CRA requirement it was mapped to |
## Behaviour
- **A reason is required for a wrong mapping**, like an accepted risk.
- `FindingStatus::needs_reason()` is shared by the agent and the dashboard.
- The agent answers 422 without a reason.
- The finding's page asks for one: *"Warum verletzt der Befund die zugeordnete CRA-Anforderung nicht …"*
- The reason goes into the status history with who set it and when.
- **CRA status and OSCAL:** a wrong mapping no longer counts against its controls. The finding keeps its `control_refs`, so which mapping was wrong stays on record, and the semantic pass skips it on rescans.
- **Bulk actions** offer neither status that needs a reason; those are set on each finding's page.
- **MCP:** the status list and counts include `wrong_mapping`.
## Checks
- fmt, and clippy with the CI flags on core, agent, MCP and both dashboard feature sets.
- Tests: core 75, agent lib 459, dashboard 45 + 61.
- New assertions:
- a wrong mapping without a reason gets a 422;
- a false positive still needs no reason;
- a wrong-mapping finding no longer violates its control.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
A finding a person rejects can be wrong in two ways, and they need
different fixes: the rule fired on code that is fine ("Fehlalarm –
Regel", the existing false_positive, relabelled), or the finding is real
but does not violate the CRA requirement it was mapped to ("Fehlalarm –
Zuordnung", a new wrong_mapping status). Kept apart, they become clean
labels for the finding classifier (#416).
A wrong mapping needs a reason, like an accepted risk (FindingStatus::
needs_reason, enforced by the agent and asked for on the finding's page).
It no longer counts against its controls in the CRA status or the OSCAL
report; the finding keeps its control refs, so which mapping was wrong
stays on record, and the semantic pass does not map it again. Bulk actions
offer neither status that needs a reason.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang
merged commit 8972db0594 into main2026-09-28 18:55:54 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Splits "Fehlalarm" into its two kinds before the pilot, so the labels users set from Wednesday on are clean training data for the finding classifier (#416).
false_positive(existing, relabelled)wrong_mapping(new)Behaviour
FindingStatus::needs_reason()is shared by the agent and the dashboard.control_refs, so which mapping was wrong stays on record, and the semantic pass skips it on rescans.wrong_mapping.Checks
🤖 Generated with Claude Code
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
A finding a person rejects can be wrong in two ways, and they need different fixes: the rule fired on code that is fine ("Fehlalarm – Regel", the existing false_positive, relabelled), or the finding is real but does not violate the CRA requirement it was mapped to ("Fehlalarm – Zuordnung", a new wrong_mapping status). Kept apart, they become clean labels for the finding classifier (#416). A wrong mapping needs a reason, like an accepted risk (FindingStatus:: needs_reason, enforced by the agent and asked for on the finding's page). It no longer counts against its controls in the CRA status or the OSCAL report; the finding keeps its control refs, so which mapping was wrong stays on record, and the semantic pass does not map it again. Bulk actions offer neither status that needs a reason. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p