fix: use current selected model
All checks were successful
port-to-omp / port (push) Successful in 10s
publish / publish (push) Successful in 14s

This commit is contained in:
2026-08-21 21:18:15 -04:00
parent bb2e89c83f
commit bff187da20
8 changed files with 65 additions and 7 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));