a hive-side pause holds against the swarm's declared state until an operator resumes
the harness writes the reason into the pause marker when it pauses itself and reports it as paused_by_hive in its turn-state header. swarm-controller declares such an agent paused (only if declared up) and shows the reason on the agents status row and the swarm ui card.
This commit is contained in:
parent
6470e2b109
commit
e5c55257f8
1 changed files with 517 additions and 26 deletions
|
|
@ -5,6 +5,7 @@ import assert from "node:assert/strict";
|
|||
import { test } from "node:test";
|
||||
import {
|
||||
canTurnIntoCustom,
|
||||
hivePauseReason,
|
||||
showsLoginNeeded,
|
||||
} from "../src/agent/AgentTypes.ts";
|
||||
|
||||
|
|
@ -42,3 +43,13 @@ test("turn into custom is offered to a placed archetype agent only", () => {
|
|||
false,
|
||||
);
|
||||
});
|
||||
|
||||
test("an agent its hive paused shows the reason, any other shows none", () => {
|
||||
assert.equal(
|
||||
hivePauseReason({ paused_by_hive: "skipped get_loose_ends" }),
|
||||
"skipped get_loose_ends",
|
||||
);
|
||||
assert.equal(hivePauseReason({ paused_by_hive: null }), null);
|
||||
assert.equal(hivePauseReason({ paused_by_hive: "" }), null);
|
||||
assert.equal(hivePauseReason({}), null);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue