Skip to content

Commit c0facec

Browse files
test(e2e): give security-full-stack actors a task handler (ADR-013)
Since v2.0/ADR-013, AgentActor.start() throws on a handler-less actor instead of silently discarding tasks. security-full-stack.test.ts still had 4 pre-ADR-013 actors started with `undefined`/no handler (the firewall, breaker-ok, combo, and redis-password setups). These suites only run in nightly (ci.yml doesn't run the e2e/security gates — they need Docker), so the first nightly on v2.0 `main` failed at the Security E2E step with "cannot start without a task handler". Fix: give each a succeeding no-op handler `async () => "ok"` — the same pattern already used elsewhere in this file. Legit/golden paths still COMPLETE; injection and breaker-trip paths are still blocked by the firewall/breaker BEFORE the handler runs, so every assertion is preserved. Verified locally: 37/37 security e2e pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 9f4c2ac commit c0facec

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

tests/e2e/security-full-stack.test.ts

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ async function waitFor(
7272
}
7373
}
7474

75-
7675
// ─── 1. Semantic Firewall ─────────────────────────────────────────────────────
7776

7877
describe("1. Semantic Firewall (real BullMQ + Redis)", () => {
@@ -92,9 +91,15 @@ describe("1. Semantic Firewall (real BullMQ + Redis)", () => {
9291
drivers.push(pub, sub);
9392

9493
const firewall = new HeuristicFirewall();
95-
const actor = new AgentActor(queueId, sub, `sec-fw-${queueId}`, undefined, {
96-
firewall,
97-
});
94+
const actor = new AgentActor(
95+
queueId,
96+
sub,
97+
`sec-fw-${queueId}`,
98+
async () => "ok",
99+
{
100+
firewall,
101+
},
102+
);
98103
await actor.start();
99104
await new Promise((r) => setTimeout(r, 200));
100105
return { pub, queueName: `sec-fw-${queueId}` };
@@ -255,7 +260,7 @@ describe("2. Circuit Breaker (real BullMQ + Redis)", () => {
255260
drivers.push(pub, sub);
256261

257262
const breaker = new SlidingWindowBreaker(3, 5000);
258-
const actor = new AgentActor(id, sub, `sec-cb-ok-${id}`, undefined, {
263+
const actor = new AgentActor(id, sub, `sec-cb-ok-${id}`, async () => "ok", {
259264
circuitBreaker: breaker,
260265
});
261266
await actor.start();
@@ -424,7 +429,7 @@ describe("3. Firewall + Circuit Breaker Combined", () => {
424429
const breaker = new SlidingWindowBreaker(3, 5000);
425430
const firewall = new HeuristicFirewall();
426431

427-
const actor = new AgentActor(id, sub, `sec-combo-${id}`, undefined, {
432+
const actor = new AgentActor(id, sub, `sec-combo-${id}`, async () => "ok", {
428433
firewall,
429434
circuitBreaker: breaker,
430435
});
@@ -757,7 +762,7 @@ describe("5. Redis Password Auth", () => {
757762
const agentId = randomUUID().slice(0, 8);
758763

759764
let completed = false;
760-
const actor = new AgentActor(agentId, sub, queueName);
765+
const actor = new AgentActor(agentId, sub, queueName, async () => "ok");
761766
await actor.start();
762767
await new Promise((r) => setTimeout(r, 200));
763768

0 commit comments

Comments
 (0)