Files
multica/server/internal/handler
9a8c3dec4e MUL-7879: fix(wakeup): clear a rule's last_error once a pass commits (#9069)
* fix(wakeup): clear a condition rule's error once a check commits

A condition check that fails (for example on its 50ms lock wait) records the
error on the rule. Nothing cleared it afterwards: an unmet condition never
reaches AdvanceIssueWakeup, which is the only write that resets last_error, so
the rule kept reporting the old failure while every later check succeeded.

SetWakeupConditionState runs only inside a check that is about to commit, so it
now resets last_error. A "waiting for claimed run" note written later in the
same dispatch still lands, because AdvanceIssueWakeup runs after it.

* fix(wakeup): clear a system rule's error on every committed pass

dispatchSystem commits early when the assignee changed, when the parent is
closed or the rule is off, and while the parent sits in backlog. None of those
passes writes condition state, so a child_done rule kept an earlier pass's
error: until its parent left backlog, or for good on a closed parent, and the
workspace wakeups view kept flagging it.

The pass now clears last_error once it holds the rule's lock; an error later in
the pass rolls the clear back. Also corrects the SetWakeupConditionState
comment (it is written by baselines and system passes too, not only checks)
and trims the condition test to the assertion it exists for.

* fix(wakeup): preserve current diagnostics when checks recover

Co-authored-by: multica-agent <[email protected]>

---------

Co-authored-by: Yushen <[email protected]>
Co-authored-by: multica-agent <[email protected]>
2026-10-21 16:46:49 +08:00
..