Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions src/subagent/run-ask-director-continue.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,7 @@ describe("runSubAgent ask_director compact-continue wiring", () => {
capturedFactory = opts.factory;
return real.defineDirector(opts);
},
stringTool: (
args: Parameters<typeof real.stringTool>[0],
) => {
stringTool: (args: Parameters<typeof real.stringTool>[0]) => {
const tool = real.stringTool(args);
if (args.definition.name === "ask_director") {
capturedAskHandler = args.handler;
Expand Down Expand Up @@ -236,17 +234,15 @@ describe("runSubAgent ask_director compact-continue wiring", () => {
throw new Error("ask_director tool was not mounted");
}

const director = capturedFactory(
{},
{} as never,
{
systemPrompt: "system",
toolDefinitions: [],
compactorNames: [],
},
);
const director = capturedFactory({}, {} as never, {
systemPrompt: "system",
toolDefinitions: [],
compactorNames: [],
});
if (!(director instanceof SubAgentDirector)) {
throw new Error("factory did not return SubAgentDirector");
throw new Error(
"factory did not return SubAgentDirector",
);
}
if (requestContinuation === undefined) {
throw new Error("requestContinuation was not captured");
Expand Down
20 changes: 13 additions & 7 deletions src/tui/runner/wiring.stall-bound.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ describe("stall-bound primary turn (CL-8016)", () => {
"stall-abort:awaiting-first-token",
);
// ... the hung inference was interrupted before any new deliver ...
const interruptAt = port.calls.findIndex((call) => call.op === "interrupt");
const interruptAt = port.calls.findIndex(
(call) => call.op === "interrupt",
);
expect(interruptAt).toBeGreaterThanOrEqual(0);
const wakeAfterInterrupt = port.calls
.slice(interruptAt + 1)
Expand Down Expand Up @@ -231,14 +233,18 @@ describe("stall-bound primary turn (CL-8016)", () => {
// Production abort is the #1095 monitor tick → doInterrupt, not the
// 5s fleet poll. Occupancy must win that next turn; a re-surface wake
// must not start processing first.
const interruptAt = port.calls.findIndex((call) => call.op === "interrupt");
const interruptAt = port.calls.findIndex(
(call) => call.op === "interrupt",
);
expect(interruptAt).toBeGreaterThanOrEqual(0);
expect(
port.calls.slice(interruptAt + 1).some(
(call) =>
call.op === "deliver" &&
call.item.text.includes(ASK_DIRECTOR_WAKE_PREFIX),
),
port.calls
.slice(interruptAt + 1)
.some(
(call) =>
call.op === "deliver" &&
call.item.text.includes(ASK_DIRECTOR_WAKE_PREFIX),
),
).toBe(false);
expect(mailDrives).toBe(1);
expect(wakeDeliveries(port)).toHaveLength(1);
Expand Down
Loading