Skip to content

Observe: count the lead bot's deaths and revives, and a wipe spread over 90 s (#264) - #294

Merged
pjerra merged 2 commits into
devfrom
fix/ta264-observe-leader-deaths-window
Oct 22, 2026
Merged

pjerra merged 2 commits into
devfrom
fix/ta264-observe-leader-deaths-window

Conversation

@pjerra

@pjerra pjerra commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Part of #264 (agent side).

Observe runs now count the lead bot's deaths and revives, and a wipe spread over time:

  • The lead bot's deaths and revives go into leader_deaths, resurrections and seconds_dead, with a leader_death trace event.
  • A wipe is also counted when every member died within 90 s of each other even if the lead revived in between (RFC run shape); the wipe event carries "window": true. A guard prevents a second count with the all-dead latch, and a lone death after a counted window wipe does not count again.

Tests: four observe tests (lead death and revive, a spread-out wipe, deaths outside the window, no double count) plus TestObserveNoSecondWipeFromALoneDeathAfterAWindowWipe; mutations of each rule turn a test red. go test ./... and go vet ./... pass.

Reviews: Opus cold review SHIP; Codex review: one P2 kept as a known limit (below).

Known limits:

  • The death baseline is the first observed frame, the same as the existing death counter, so a death between the run start and the first poll is not counted (one poll interval). A later change can fix both counters together.
  • If the lead changes while the old lead is dead, that revive is not counted, and a lead still dead at the end does not add its open interval to seconds_dead.

Still open on #264: the module-side record of leader deaths and wipes (TortoiseBots), the Uldaman near-wipes, and a fixture test from the real RFC trace.

An observed run's report read 0 leader deaths and resurrections: only the
group-mode driver counted them. The observe watch now follows the party's
deaths in the feed, counts the lead bot's deaths and revives (report, legs,
leader_death trace events, seconds dead), and counts a wipe when every
member died within 90 s even though the lead bot revived in between, each
death newer than the last counted wipe (the RFC run: all five dead within
63 s, never in one frame).
@pjerra
pjerra merged commit 79c52a6 into dev Oct 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant