Watch
0
0
Fork
You've already forked hyperhive
0

derive an agent's backend hosts into the egress allow list at the controller

This commit is contained in:
atlas 2026-10-29 01:10:38 +01:00 • committed by mara
commit c5a876b845

View file

@ -52,3 +52,13 @@ test("the body is swarm-wide or for the agent, with the name trimmed", () => {
agent: "atlas",
});
});
test("a derived entry is counted as automatic, not as the operator's own", () => {
const derived = { domain: "llm.example.com", agent: "atlas", derived: true };
assert.equal(
allowedSummary([...entriesFor(all, "atlas"), derived]),
"1 swarm-wide, 2 for this agent, 1 automatic",
);
assert.equal(allowedSummary([derived]), "1 automatic");
assert.deepEqual(entriesFor([derived], "atlas"), [derived]);
});