feat: configure executor models
This commit is contained in:
@@ -162,6 +162,46 @@ touch '${sessionFile}.meta'
|
||||
expect(result.sessionHandle?.kind).toBe("reasonix");
|
||||
});
|
||||
|
||||
it("start passes --model when configured", async () => {
|
||||
const argsFile = path.join(tmpDir, "args.txt");
|
||||
const fakeBin = writeFakeCli(tmpDir, { argsFile });
|
||||
|
||||
const adapter = createExecutorAdapter("reasonix");
|
||||
await adapter.start({
|
||||
repoRoot: tmpDir,
|
||||
plan: makeValidPlan(),
|
||||
runDir: tmpDir,
|
||||
cycleIndex: 1,
|
||||
config: { binary: fakeBin, model: "custom-reasonix-model" },
|
||||
});
|
||||
|
||||
const capturedArgs = fs.existsSync(argsFile) ? fs.readFileSync(argsFile, "utf8") : "";
|
||||
expect(capturedArgs).toContain("--model");
|
||||
expect(capturedArgs).toContain("custom-reasonix-model");
|
||||
});
|
||||
|
||||
it("resume passes --model when configured", async () => {
|
||||
const argsFile = path.join(tmpDir, "args.txt");
|
||||
const fakeBin = writeFakeCli(tmpDir, { argsFile });
|
||||
const sessionFile = path.join(tmpDir, "session.jsonl");
|
||||
fs.writeFileSync(sessionFile, "{}\n");
|
||||
|
||||
const adapter = createExecutorAdapter("reasonix");
|
||||
await adapter.resume({
|
||||
repoRoot: tmpDir,
|
||||
plan: makeValidPlan(),
|
||||
acceptedFindings: "Fix null pointer at src/index.ts",
|
||||
handle: { kind: "reasonix", sessionFilePath: sessionFile },
|
||||
runDir: tmpDir,
|
||||
cycleIndex: 2,
|
||||
config: { binary: fakeBin, model: "resume-model" },
|
||||
});
|
||||
|
||||
const capturedArgs = fs.existsSync(argsFile) ? fs.readFileSync(argsFile, "utf8") : "";
|
||||
expect(capturedArgs).toContain("--model");
|
||||
expect(capturedArgs).toContain("resume-model");
|
||||
});
|
||||
|
||||
it("resume sends a complete continued plan for task-level reuse", async () => {
|
||||
const argsFile = path.join(tmpDir, "args.txt");
|
||||
const fakeBin = writeFakeCli(tmpDir, { argsFile });
|
||||
|
||||
Reference in New Issue
Block a user