Watch
0
0
Fork
You've already forked hyperhive
0

closed flow also queues a closed todo on each agent that held one, after the clear

This commit is contained in:
atlas 2026-10-24 13:58:08 +02:00 • committed by mara
commit 0a1e4db0f4
4 changed files with 99 additions and 24 deletions

View file

@ -137,9 +137,18 @@ mod tests {
&flows,
is_agent,
);
// Per agent the clear comes before the closed todo that its prefix would take.
let mut got = agents(&closed);
got.sort_unstable_by_key(|(a, _)| *a);
assert_eq!(got, [("atlas", Op::Clear), ("iris", Op::Clear)]);
got.sort_by_key(|(a, _)| *a);
assert_eq!(
got,
[
("atlas", Op::Clear),
("atlas", Op::Upsert),
("iris", Op::Clear),
("iris", Op::Upsert)
]
);
assert!(closed.next.holders.is_empty());
// A close leaves the assignee snapshot as the last assign set it.
assert_eq!(closed.next.assignees, three.next.assignees);