Closes#483. Follow-up to #464/#477, requested by the platform session. Stage only.
Problem
A group started open even when a person had marked each of its places, one by one, as a false positive, an accepted risk or ignored. The decision was lost on the group, and the group's issue stayed open.
Change
Reading the decisions:RunFindings::write_back reads, for each group, the stored single findings of its rule at its places that carry one of those decisions.
Each place gets its decision: Occurrence.decision, and in the description …/Main.java:12 [marked false_positive].
All places carry the same decision → the group takes it over:
History entry by the scan: ScanChangeKind::Inherited, reason "inherited from N grouped findings".
This also applies to groups an earlier run stored as open. The groups #477 created are set right on the next scan.
A decision on the group itself is never overridden. The update is guarded on the status still being open, triaged or needs_review. Mixed decisions leave the group open, and its description shows each place's decision.
Issues:
An inherited decision goes into status_changed, so issue sync closes the group's issue with a DE/EN comment ("…übernimmt diese Entscheidung") that quotes the reason.
Issue creation skips findings that already carry a decision, so a new group with an inherited decision never opens an issue.
Dashboard: history text for the inherited change.
Tests
tests/group_decisions.rs (Mongo):
all false positive → group FP, history Inherited, in status_changed, places listed with their decision;
mixed (3 accepted risk, 3 open) → group open, decisions per place;
group stored earlier as open → inherits;
group stored earlier as accepted risk → stays accepted risk.
Unit tests: unanimity, the description round trip (rule_description ↔ describe), the issue comment.
The group_findings, finding_variants, resolve_findings and live_findings integration tests are green.
fmt and clippy -D warnings: agent, core, and dashboard (server and wasm).
Unit test runs: agent lib 691, dashboard 82, core 85.
To check on stage
Pick a target with a rule that fires at more than 5 places (e.g. android_logging, the nightly target mobile-android-insecure, or a customer-like app). Mark every single finding of that rule Fehlalarm before grouping. On an already grouped target, use the places of an open group.
Rescan. Expect:
the group shows "Fehlalarm" with the history line "Von den einzeln bewerteten Stellen übernommen…";
its issue (if any) is closed with the comment;
the agent logs group inherited the decision on all its places.
Mark one place differently and rescan a fresh target. Expect the group to stay open and list [marked …] per place.
Closes #483. Follow-up to #464/#477, requested by the platform session. Stage only.
## Problem
A group started `open` even when a person had marked each of its places, one by one, as a false positive, an accepted risk or ignored. The decision was lost on the group, and the group's issue stayed open.
## Change
- **Reading the decisions:** `RunFindings::write_back` reads, for each group, the stored single findings of its rule at its places that carry one of those decisions.
- Each place gets its decision: `Occurrence.decision`, and in the description `…/Main.java:12 [marked false_positive]`.
- **All places carry the same decision** → the group takes it over:
- History entry by the scan: `ScanChangeKind::Inherited`, reason "inherited from N grouped findings".
- This also applies to **groups an earlier run stored as `open`**. The groups #477 created are set right on the next scan.
- **A decision on the group itself is never overridden.** The update is guarded on the status still being open, triaged or needs_review. Mixed decisions leave the group open, and its description shows each place's decision.
- **Issues:**
- An inherited decision goes into `status_changed`, so issue sync closes the group's issue with a DE/EN comment ("…übernimmt diese Entscheidung") that quotes the reason.
- Issue creation skips findings that already carry a decision, so a new group with an inherited decision never opens an issue.
- **Dashboard:** history text for the inherited change.
## Tests
- `tests/group_decisions.rs` (Mongo):
- all false positive → group FP, history `Inherited`, in `status_changed`, places listed with their decision;
- mixed (3 accepted risk, 3 open) → group open, decisions per place;
- group stored earlier as open → inherits;
- group stored earlier as accepted risk → stays accepted risk.
- Unit tests: unanimity, the description round trip (`rule_description` ↔ `describe`), the issue comment.
- The `group_findings`, `finding_variants`, `resolve_findings` and `live_findings` integration tests are green.
- fmt and clippy `-D warnings`: agent, core, and dashboard (server and wasm).
- Unit test runs: agent lib 691, dashboard 82, core 85.
## To check on stage
1. Pick a target with a rule that fires at more than 5 places (e.g. `android_logging`, the nightly target `mobile-android-insecure`, or a customer-like app). Mark every single finding of that rule **Fehlalarm** before grouping. On an already grouped target, use the places of an `open` group.
2. Rescan. Expect:
- the group shows "Fehlalarm" with the history line "Von den einzeln bewerteten Stellen übernommen…";
- its issue (if any) is closed with the comment;
- the agent logs `group inherited the decision on all its places`.
3. Mark one place differently and rescan a fresh target. Expect the group to stay open and list `[marked …]` per place.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
Closes#483. A group (#464/#477) started open even when a person had
marked every one of its places, one by one, a false positive, an
accepted risk or ignored; their issues stayed open and the decision was
lost on the group.
- RunFindings::write_back reads, for each group, the stored single
findings of its rule at its places that carry such a decision. Each
place lists its decision (Occurrence.decision; the description shows
"file:line [marked false_positive]").
- When every place carries the same decision, the group takes it, with a
history entry by the scan (ScanChangeKind::Inherited, "inherited from
N grouped findings"); also on a group an earlier run stored open, so
the groups #477 created are set right on the next scan. A decision a
person made on the group itself is never overridden; mixed decisions
leave the group open.
- Issues: the inherited decision closes the group's issue with a comment
(DE/EN, reason quoted); a finding that is already decided never opens
an issue.
- Dashboard: history wording for the inherited change.
- Tests: tests/group_decisions.rs (Mongo: all-same, mixed, earlier open
group, decision on the group kept), unit tests for unanimity, the
description round trip and the issue comment.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
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.
Closes #483. Follow-up to #464/#477, requested by the platform session. Stage only.
Problem
A group started
openeven when a person had marked each of its places, one by one, as a false positive, an accepted risk or ignored. The decision was lost on the group, and the group's issue stayed open.Change
RunFindings::write_backreads, for each group, the stored single findings of its rule at its places that carry one of those decisions.Occurrence.decision, and in the description…/Main.java:12 [marked false_positive].ScanChangeKind::Inherited, reason "inherited from N grouped findings".open. The groups #477 created are set right on the next scan.status_changed, so issue sync closes the group's issue with a DE/EN comment ("…übernimmt diese Entscheidung") that quotes the reason.Tests
tests/group_decisions.rs(Mongo):Inherited, instatus_changed, places listed with their decision;rule_description↔describe), the issue comment.group_findings,finding_variants,resolve_findingsandlive_findingsintegration tests are green.-D warnings: agent, core, and dashboard (server and wasm).To check on stage
android_logging, the nightly targetmobile-android-insecure, or a customer-like app). Mark every single finding of that rule Fehlalarm before grouping. On an already grouped target, use the places of anopengroup.group inherited the decision on all its places.[marked …]per place.🤖 Generated with Claude Code
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p