fix: stabilize plugin startup boundaries

This commit is contained in:
Peter Steinberger
2026-03-28 05:01:21 +00:00
parent 838013c87a
commit 23f0486810
6 changed files with 357 additions and 252 deletions

View File

@@ -152,6 +152,22 @@ describe("command queue", () => {
}
});
it("demotes live model switch lane failures to debug noise", async () => {
const error = new Error("Live session model switch requested: anthropic/claude-opus-4-6");
error.name = "LiveSessionModelSwitchError";
await expect(
enqueueCommandInLane("nested", async () => {
throw error;
}),
).rejects.toBe(error);
expect(diagnosticMocks.diag.error).not.toHaveBeenCalled();
expect(diagnosticMocks.diag.debug).toHaveBeenCalledWith(
expect.stringContaining("lane task interrupted: lane=nested"),
);
});
it("getActiveTaskCount returns count of currently executing tasks", async () => {
const { task, release } = enqueueBlockedMainTask();