Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: retrying a broadcast shows the agents that failed, even ones the filter hides

This commit is contained in:
iris 2026-10-18 02:34:42 +02:00 • committed by mara
commit f65364759f
4 changed files with 33 additions and 3 deletions

View file

@ -5,6 +5,7 @@ import assert from "node:assert/strict";
import { test } from "node:test";
import {
failedAgents,
filterShowing,
MAX_BROADCAST,
isRunning,
parseResults,
@ -94,3 +95,14 @@ test("an answer that is not the agreed shape is null, not an empty list", () =>
test("one broadcast may name at most 64 agents", () => {
assert.equal(MAX_BROADCAST, 64);
});
test("a retry shows the failed agents even when the filter hides them", () => {
const agents = [
{ name: "a", snapshot: { running: true } },
{ name: "b", snapshot: { running: false } },
];
assert.equal(filterShowing("running", agents, ["a"]), "running");
assert.equal(filterShowing("running", agents, ["a", "b"]), "all");
assert.equal(filterShowing("running", agents, ["b"]), "all");
assert.equal(filterShowing("all", agents, ["b"]), "all");
});