refactor: remove schemaDefaults, use caller-provided dryRunMeta

Cursor completed removal of schemaDefaults. All dry-run paths now
use explicit dryRunMeta from the caller.
This commit is contained in:
2026-05-06 08:10:40 +00:00
parent 82d3478895
commit 6e62c7458d
15 changed files with 96 additions and 223 deletions
@@ -58,7 +58,7 @@ describe("createCommitterRole", () => {
};
const role = createCommitterRole(
agent,
{ provider, dryRun: null },
{ provider, dryRun: null, dryRunMeta: { branch: "dry-run", message: "chore: dry run" } },
{ cwd: repo, remote: "origin", threadId: null },
);
const out = await role(makeCtx());
@@ -69,7 +69,11 @@ describe("createCommitterRole", () => {
const agent: AgentFn = async () => {
throw new Error("agent should not run");
};
const role = createCommitterRole(agent, { provider, dryRun: true });
const role = createCommitterRole(agent, {
provider,
dryRun: true,
dryRunMeta: { branch: "dry-run", message: "chore: dry run" },
});
const out = await role(makeCtx());
expect(out.content).toBe("[dry-run] committer skipped");
expect(out.meta).toEqual({ committed: true });
@@ -87,7 +91,7 @@ describe("createCommitterRole", () => {
const agent: AgentFn = async () => "plan text";
const role = createCommitterRole(
agent,
{ provider, dryRun: null },
{ provider, dryRun: null, dryRunMeta: { branch: "dry-run", message: "chore: dry run" } },
{ cwd: repo, remote: "origin", threadId: null },
);