fix(alarms): a native condition's AddComment is not subject to the scripted verdict (#937)

Native AddComment shares HandleAlarmCommand but is applied at the node only;
asking the scripted host made it BadInvalidState (live A02 on fu937-1).

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Joseph Doherty
2026-11-28 11:01:47 -05:00
parent 4d41e61858
commit e45012b69d
3 changed files with 48 additions and 5 deletions
@@ -558,7 +558,8 @@ class ConditionScenarios:
finally:
restored_at = self.utc(-2)
self.r.mutate(scripted_predicate=good)
loaded = wait_for(lambda: self.log_lines(source, restored_at, "ScriptedAlarmEngine loaded"), 120)
# The engine's own "loaded" line rides the script-log topic; the host's re-assert of the still-active condition is on stdout.
loaded = wait_for(lambda: self.log_lines(source, restored_at, "ScriptedAlarmHost: re-asserted"), 120)
self.check("origin_engine_reloaded", loaded)
# Positive control: the first good load after a failed one is a new occurrence (documented); the ack now succeeds.
fresh = wait_for(lambda: self.latest(origin, name, lambda b: b.get("State") == "Active, Unacknowledged"