fix(maestro): parse reported activity states strictly

This commit is contained in:
Miguel Palhas
2026-08-24 22:05:40 +01:00
parent 81312aa0c5
commit 4f0e887a50
2 changed files with 33 additions and 0 deletions
+6
View File
@@ -108,3 +108,9 @@ If a client receives an `ActivityState` variant it does not know, it must not
fail rendering: treat it as `Idle` (neutral/dim, line-2 rules apply as usual)
until the daemon sends a variant it does know. Rust clients deserialize
activity leniently for the same reason.
Leniency runs one way only. It covers a client *reading* a newer daemon, where
dropping the whole session would be worse than dimming one card. A report
arriving at `POST /api/sessions/:id/activity` is parsed strictly and an unknown
state is a 4xx: an agent posting a state the daemon does not know is a bug in
the agent, and answering 204 would hide it.