jobq: key transient tombstones per pill, not per agent
Deletes `TransientState`, adds `transient_kind` to `TransientCleared`, and fixes a crash misreport — three changes over the same functions. `TransientState` was `RunningTransient` with `agent` dropped and `takes_container_down` renamed; that rename was the only thing it did, and its three consumers each read a disjoint subset. `transient_snapshot` now returns `RunningTransient` directly. `recent_transient` was keyed by agent alone and overwritten on each clear. An agent can clear several pills in one grace window, so a `Prebuild` (`takes_container_down = false`) landing after a `StopForUpdate` (`true`) left the tombstone reading `false` and the crash watcher reported a deliberate stop as a container crash. Keyed by `(agent, label)` now, with `recent_transient_within` folding back per agent by OR — the same question `crash_watch` asks of the active set. `TransientCleared` gains the label for the same reason: a client holding two open pills for one agent could not tell which one a clear referred to. The out-of-band suppression guard has no node and so no label; it uses `NO_NODE_LABEL`, angle-bracketed to stay out of the `NodeKind::as_str` namespace.
This commit is contained in:
parent
6a8a729f58
commit
7ef0e8c788
6 changed files with 110 additions and 53 deletions
|
|
@ -97,7 +97,7 @@ fn emit_crash_transitions(coord: &Coordinator, prev: &HashSet<String>, current:
|
|||
// a deliberate stop rather than a crash.
|
||||
let active = transients
|
||||
.get(stopped)
|
||||
.map(|sts| sts.iter().any(|st| st.deliberate_stop))
|
||||
.map(|sts| sts.iter().any(|st| st.takes_container_down))
|
||||
.or_else(|| coord.crash_watch_suppressed(stopped).then_some(true));
|
||||
let recently_cleared = recent.get(stopped).copied();
|
||||
if is_deliberate_stop(active, recently_cleared) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue