perf(test): shrink subagent announce fast-mode settle waits

This commit is contained in:
Peter Steinberger
2026-02-22 09:27:44 +00:00
parent 267d2193bf
commit 35d5bd4e07
2 changed files with 14 additions and 33 deletions

View File

@@ -929,26 +929,16 @@ describe("subagent announce formatting", () => {
childRunId: "run-1",
requesterSessionKey: "main",
requesterDisplayKey: "main",
...defaultOutcomeAnnounce,
task: "first task",
timeoutMs: 1000,
cleanup: "keep",
waitForCompletion: false,
startedAt: 10,
endedAt: 20,
outcome: { status: "ok" },
});
await runSubagentAnnounceFlow({
childSessionKey: "agent:main:subagent:worker",
childRunId: "run-2",
requesterSessionKey: "main",
requesterDisplayKey: "main",
...defaultOutcomeAnnounce,
task: "second task",
timeoutMs: 1000,
cleanup: "keep",
waitForCompletion: false,
startedAt: 10,
endedAt: 20,
outcome: { status: "ok" },
});
} finally {
nowSpy.mockRestore();
@@ -1482,13 +1472,8 @@ describe("subagent announce formatting", () => {
childRunId: "run-leaf-missing-fallback",
requesterSessionKey: "agent:main:subagent:orchestrator",
requesterDisplayKey: "agent:main:subagent:orchestrator",
task: "do thing",
timeoutMs: 1000,
...defaultOutcomeAnnounce,
cleanup: "delete",
waitForCompletion: false,
startedAt: 10,
endedAt: 20,
outcome: { status: "ok" },
});
expect(didAnnounce).toBe(false);
@@ -1529,13 +1514,8 @@ describe("subagent announce formatting", () => {
childRunId: testCase.childRunId,
requesterSessionKey: "agent:main:main",
requesterDisplayKey: "main",
...defaultOutcomeAnnounce,
task: testCase.task,
timeoutMs: 1000,
cleanup: "keep",
waitForCompletion: false,
startedAt: 10,
endedAt: 20,
outcome: { status: "ok" },
...(testCase.expectsCompletionMessage ? { expectsCompletionMessage: true } : {}),
});
@@ -1657,13 +1637,8 @@ describe("subagent announce formatting", () => {
childRunId: testCase.childRunId,
requesterSessionKey: testCase.requesterSessionKey,
requesterDisplayKey: testCase.requesterDisplayKey,
...defaultOutcomeAnnounce,
task: "QA task",
timeoutMs: 1000,
cleanup: "keep",
waitForCompletion: false,
startedAt: 10,
endedAt: 20,
outcome: { status: "ok" },
});
expect(didAnnounce, testCase.name).toBe(true);