This commit is contained in:
omp-port
2026-08-21 21:19:45 -04:00
parent f45e7ffb0e
commit c080ebcd1e
7 changed files with 61 additions and 5 deletions

View File

@@ -110,6 +110,28 @@ describe("check-runner integration", () => {
);
});
it("forwards the selected model to every sub-agent", async () => {
const check = smokeCheck();
const selectedModel = {
provider: "test-provider",
id: "test-model",
} as unknown as PygieniumCtx["model"];
const seen: unknown[] = [];
setAgentRunner(async (opts) => {
seen.push(opts.model);
return fakeAgentRunner(opts);
});
await handleCheckCommand(
check,
"--fix",
{ ...stubCtx(cwd), model: selectedModel } as PygieniumCtx,
);
// Analysis + fix phases each dispatch one sub-agent.
expect(seen.length).toBe(2);
for (const m of seen) expect(m).toBe(selectedModel);
});
it("persists run-state.json at the expected path", async () => {
const check = smokeCheck();
await handleCheckCommand(check, "", stubCtx(cwd));