fix(rsi): keep an unchanged negative lesson on a multi-company task

On a task with several companies the extractor does not write, and the
negative branch passed an empty keep key. Retraction then withdrew the
finding from every negative lesson, including the one that still matched
its status, and retired an adopted lesson whose disposition never changed.

The keep test now compares the lesson action, not the dedupe key. The
action names the status; the key also carries the company, which a task
with several companies cannot rebuild. A status change inside the negative
group still withdraws the previous lesson.
This commit is contained in:
BaaRai
2026-11-21 08:50:38 +01:00
parent d638b047dc
commit 2be58efd50
3 changed files with 92 additions and 14 deletions
+3 -2
View File
@@ -67,8 +67,9 @@ stopped retest produces nothing.
A task with more than one company in `task_scope` does not gain a new lesson.
Retraction still runs, so a lesson written while the task had one company can
be withdrawn after a second company is added. Per-finding company attribution
is a later change.
be withdrawn after a second company is added. It withdraws only on a changed
disposition: a finding whose status did not move keeps its evidence. Per-finding
company attribution is a later change.
## Selection