autonomous_loop: stop clobbering applier model/provider defaults
Found by running: the loop was setting LH_APPLIER_MODEL=qwen3-coder:480b explicitly via env, which clobbered the applier's NEW default of x-ai/grok-4.1-fast on openrouter. Result: applier kept hitting the throttled ollama_cloud account and producing zero patches every iter. Now LOOP_APPLIER_MODEL and LOOP_APPLIER_PROVIDER are optional overrides; when unset, scrum_applier.ts uses its own defaults. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4ac56564c0
commit
6432465e2c
@ -22,7 +22,12 @@ const BRANCH = process.env.LOOP_BRANCH ?? "scrum/auto-apply-19814";
|
||||
const MAX_ITERS = Number(process.env.LOOP_MAX_ITERS ?? 3);
|
||||
const PUSH = process.env.LOOP_PUSH === "1";
|
||||
const MIN_CONF = process.env.LOOP_MIN_CONF ?? "85";
|
||||
const APPLIER_MODEL = process.env.LOOP_APPLIER_MODEL ?? "qwen3-coder:480b";
|
||||
// Optional override — when unset, let scrum_applier.ts use ITS default
|
||||
// (currently x-ai/grok-4.1-fast on openrouter). The prior hardcoded
|
||||
// qwen3-coder:480b default was clobbering the applier's own default
|
||||
// and forcing every iter to hit the throttled ollama_cloud account.
|
||||
const APPLIER_MODEL = process.env.LOOP_APPLIER_MODEL;
|
||||
const APPLIER_PROVIDER = process.env.LOOP_APPLIER_PROVIDER;
|
||||
const TARGETS = (process.env.LOOP_TARGETS ?? "crates/queryd/src/service.rs,crates/gateway/src/main.rs,crates/gateway/src/v1/mod.rs")
|
||||
.split(",").map(s => s.trim()).filter(Boolean);
|
||||
|
||||
@ -108,16 +113,20 @@ async function runIter(iter: number, baseSha: string): Promise<IterResult> {
|
||||
});
|
||||
|
||||
log(`scrum_applier.ts COMMIT=1 MIN_CONF=${MIN_CONF} files=${TARGETS.length}`);
|
||||
await runCmd("bun", ["run", "tests/real-world/scrum_applier.ts"], {
|
||||
// Only forward model/provider when explicitly overridden — otherwise
|
||||
// let scrum_applier.ts use its own defaults (Grok 4.1 fast on openrouter).
|
||||
const applierEnv: Record<string, string> = {
|
||||
LH_APPLIER_COMMIT: "1",
|
||||
LH_APPLIER_MIN_CONF: MIN_CONF,
|
||||
LH_APPLIER_MAX_FILES: String(TARGETS.length),
|
||||
LH_APPLIER_MODEL: APPLIER_MODEL,
|
||||
LH_APPLIER_BRANCH: BRANCH,
|
||||
// Constrain applier to THIS iter's targets so it patches what we
|
||||
// just reviewed instead of the highest-confidence file from history.
|
||||
LH_APPLIER_FILES: TARGETS.join(","),
|
||||
});
|
||||
};
|
||||
if (APPLIER_MODEL) applierEnv.LH_APPLIER_MODEL = APPLIER_MODEL;
|
||||
if (APPLIER_PROVIDER) applierEnv.LH_APPLIER_PROVIDER = APPLIER_PROVIDER;
|
||||
await runCmd("bun", ["run", "tests/real-world/scrum_applier.ts"], applierEnv);
|
||||
|
||||
const reviewsAfter = await countLines(`${REPO}/data/_kb/scrum_reviews.jsonl`);
|
||||
const applyAfterText = existsSync(`${REPO}/data/_kb/auto_apply.jsonl`)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user