fix: raise autonomous solver iteration budget
This commit is contained in:
parent
45f6b3f4f4
commit
34140fff38
6 changed files with 11 additions and 11 deletions
|
|
@ -25,9 +25,9 @@ export const AUTONOMOUS_SOLVER_OUTCOMES = [
|
|||
];
|
||||
|
||||
const MAX_RENDERED_ITEMS = 12;
|
||||
const DEFAULT_SOLVER_MAX_ITERATIONS = 12;
|
||||
const DEFAULT_SOLVER_MAX_ITERATIONS = 30000;
|
||||
const MIN_SOLVER_MAX_ITERATIONS = 1;
|
||||
const MAX_SOLVER_MAX_ITERATIONS = 100;
|
||||
const MAX_SOLVER_MAX_ITERATIONS = 100000;
|
||||
|
||||
function solverDir(basePath) {
|
||||
return join(sfRoot(basePath), "runtime", "autonomous-solver");
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ Setting `prefer_skills: []` does **not** disable skill discovery — it just mea
|
|||
- `soft_timeout_minutes`: minutes before the supervisor issues a soft warning (default: 20).
|
||||
- `idle_timeout_minutes`: minutes of inactivity before the supervisor intervenes (default: 10).
|
||||
- `hard_timeout_minutes`: minutes before the supervisor forces termination (default: 30).
|
||||
- `solver_max_iterations`: maximum autonomous solver iterations for one unit before pausing (default: `12`, min: `1`, max: `100`).
|
||||
- `solver_max_iterations`: maximum autonomous solver iterations for one unit before pausing (default: `30000`, min: `1`, max: `100000`).
|
||||
- `completion_nudge_after`: tool calls in a complete-slice unit before nudging the agent to call `sf_slice_complete` (default: 10; set `0` to disable).
|
||||
- `runaway_guard_enabled`: enable active-loop diagnosis for long-running units (default: `true`).
|
||||
- `runaway_tool_call_warning`: unit tool calls before a runaway warning (default: `60`; set `0` to disable this signal).
|
||||
|
|
|
|||
|
|
@ -695,8 +695,8 @@ export function resolveAutoSupervisorConfig() {
|
|||
solver_max_iterations: Number.isFinite(
|
||||
Number(configured.solver_max_iterations),
|
||||
)
|
||||
? Math.max(1, Math.min(100, Number(configured.solver_max_iterations)))
|
||||
: 12,
|
||||
? Math.max(1, Math.min(100000, Number(configured.solver_max_iterations)))
|
||||
: 30000,
|
||||
completion_nudge_after: configured.completion_nudge_after ?? 10,
|
||||
runaway_guard_enabled: configured.runaway_guard_enabled ?? true,
|
||||
runaway_tool_call_warning:
|
||||
|
|
|
|||
|
|
@ -782,11 +782,11 @@ export function validatePreferences(preferences) {
|
|||
}
|
||||
if (as.solver_max_iterations !== undefined) {
|
||||
const val = Number(as.solver_max_iterations);
|
||||
if (!Number.isNaN(val) && val >= 1 && val <= 100) {
|
||||
if (!Number.isNaN(val) && val >= 1 && val <= 100000) {
|
||||
validatedAs.solver_max_iterations = Math.floor(val);
|
||||
} else {
|
||||
errors.push(
|
||||
"auto_supervisor.solver_max_iterations must be a number from 1 to 100",
|
||||
"auto_supervisor.solver_max_iterations must be a number from 1 to 100000",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ test("resolveAutoSupervisorConfig provides safe timeout defaults", () => {
|
|||
assert.equal(supervisor.soft_timeout_minutes, 20);
|
||||
assert.equal(supervisor.idle_timeout_minutes, 10);
|
||||
assert.equal(supervisor.hard_timeout_minutes, 30);
|
||||
assert.equal(supervisor.solver_max_iterations, 12);
|
||||
assert.equal(supervisor.solver_max_iterations, 30000);
|
||||
});
|
||||
|
||||
test("writeUnitRuntimeRecord persists progress and recovery metadata defaults", () => {
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ describe("autonomous solver", () => {
|
|||
});
|
||||
|
||||
test("getConfiguredAutonomousSolverMaxIterations_clamps_preference", () => {
|
||||
expect(getConfiguredAutonomousSolverMaxIterations()).toBe(12);
|
||||
expect(getConfiguredAutonomousSolverMaxIterations()).toBe(30000);
|
||||
expect(
|
||||
getConfiguredAutonomousSolverMaxIterations({
|
||||
auto_supervisor: { solver_max_iterations: 0 },
|
||||
|
|
@ -238,8 +238,8 @@ describe("autonomous solver", () => {
|
|||
).toBe(1);
|
||||
expect(
|
||||
getConfiguredAutonomousSolverMaxIterations({
|
||||
auto_supervisor: { solver_max_iterations: 150 },
|
||||
auto_supervisor: { solver_max_iterations: 150000 },
|
||||
}),
|
||||
).toBe(100);
|
||||
).toBe(100000);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue