Skip to content

Commit d2601db

Browse files
committed
fix(omp): align bash-failure effort and harden flag-acceptance guard
- BASH_FAILURE: default@medium -> default@low to match Python surface and reduce post-hoc diagnostic cost (thread PRRT_kwDORKAmpc6XQIdu). - Flag test: skip only on ENOENT (codex not installed), fail on any other spawn error or non-zero exit; preserves validation in CI while catching broken installs (threads PRRT_kwDORKAmpc6XQId6, CodeRabbit body).
1 parent 22755b7 commit d2601db

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

omp/codex-reflector.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,14 @@ describe("codexExecArgs", () => {
251251
// The suite stubs `codex` with a fake that ignores argv, so an argv the
252252
// real CLI rejects passes every other test here while failing open in
253253
// production. `codex exec --help` is local and needs no auth, so ask the
254-
// real parser what it accepts. Skips when codex is not installed.
254+
// real parser what it accepts. Skips only when codex is not installed
255+
// (ENOENT); any other spawn error or non-zero exit is a real failure.
255256
const help = spawnSync("codex", ["exec", "--help"], { encoding: "utf8" });
256-
if (help.error || help.status !== 0) return; // codex unavailable — nothing to check
257+
if (help.error) {
258+
if ((help.error as NodeJS.ErrnoException).code === "ENOENT") return;
259+
throw help.error;
260+
}
261+
expect(help.status).toBe(0);
257262
for (const flag of args.filter((a) => a.startsWith("--"))) {
258263
expect(help.stdout).toContain(flag);
259264
}

omp/codex-reflector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const CODE_REVIEW_HARD: Preset = { model: FRONTIER_MODEL, effort: "medium" };
8888
const CODE_REVIEW_COMPLEX: Preset = { model: FRONTIER_MODEL, effort: "high" };
8989
const CODE_REVIEW_TINY: Preset = { model: FAST_MODEL, effort: "medium" };
9090
const THINKING: Preset = { model: DEFAULT_MODEL, effort: "high" };
91-
const BASH_FAILURE: Preset = { model: DEFAULT_MODEL, effort: "medium" };
91+
const BASH_FAILURE: Preset = { model: DEFAULT_MODEL, effort: "low" };
9292
const BASH_GUARD: Preset = { model: FAST_MODEL, effort: "low" }; // pre-execution gate: luna@low
9393
const STOP_REVIEW: Preset = { model: FRONTIER_MODEL, effort: "medium" };
9494
const PRECOMPACT: Preset = { model: FRONTIER_MODEL, effort: "low" };

0 commit comments

Comments
 (0)