From 4e790258c9d0f0da2778de98919937c6ee68a2c8 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Tue, 1 Sep 2026 22:34:52 +0530 Subject: [PATCH 1/2] fix(cross-model): accept Codex CLI effort values none and max The effort whitelist was a stale copy of the Codex enum, so pinning cross_model_effort to none or max skipped the peer as incompatible. Keep fail-closed for values the route cannot honor. Rebased onto current main via Git Data API (OAuth lacks workflow scope for pushing main CI history). --- .compound-engineering/config.example.yaml | 4 +-- docs/guides/configuration.md | 2 +- .../scripts/cross-model-adversarial-review.sh | 4 +-- .../scripts/cross-model-doc-review.sh | 4 +-- .../ce-setup/references/config-template.yaml | 4 +-- .../ce-code-review-cross-model-routes.test.ts | 35 ++++++++++++++++++- 6 files changed, 43 insertions(+), 10 deletions(-) mode change 100755 => 100644 skills/ce-code-review/scripts/cross-model-adversarial-review.sh mode change 100755 => 100644 skills/ce-doc-review/scripts/cross-model-doc-review.sh diff --git a/.compound-engineering/config.example.yaml b/.compound-engineering/config.example.yaml index 49cd37d86..55ebbc926 100644 --- a/.compound-engineering/config.example.yaml +++ b/.compound-engineering/config.example.yaml @@ -123,8 +123,8 @@ # `fable` or a full id such as `claude-opus-5` for claude; `gpt-*` for codex, # optionally namespace-qualified such as `openai.gpt-5.6-sol` when the codex CLI # routes through a non-default `model_provider`). -# Effort levels: claude low|medium|high|xhigh|max, codex minimal|low|medium| -# high|xhigh, grok low|medium|high; cursor/composer routes take none. A value +# Effort levels: claude low|medium|high|xhigh|max, codex none|minimal|low| +# medium|high|xhigh|max, grok low|medium|high; cursor/composer routes take none. A value # the peer cannot honor skips the pass with a stated reason -- never substituted. # cross_model_review_mode: off # auto | off (default: auto) diff --git a/docs/guides/configuration.md b/docs/guides/configuration.md index a480ca7c3..48254eb42 100644 --- a/docs/guides/configuration.md +++ b/docs/guides/configuration.md @@ -48,7 +48,7 @@ All settings are optional. Commented examples are documentation, not active valu | [`ce-work`](./ce-work.md), [`lfg`](./lfg.md) | `work_engine_mode`, `work_engine_preferences` | Ordered implementation-author preferences. Mode is `off`, `prefer`, or `require`; each entry has a `harness` and optional `model`. See [Implementation routing](#implementation-routing). | | [`ce-code-review`](./ce-code-review.md), [`ce-doc-review`](./ce-doc-review.md) | `cross_model_review_mode` | Whether the automatic cross-model pass may send review content to a second provider: `auto` (default, current behavior) or `off`. `off` is evaluated before any peer or route is resolved, keeps every local reviewer and the local adversarial fallback, and is reported as "disabled by checkout config" rather than as an unavailable route. A direct conversation request for a peer overrides `off` for that run; a conversation prohibition overrides `auto`. | | [`ce-code-review`](./ce-code-review.md), [`ce-doc-review`](./ce-doc-review.md) | `cross_model_peer` | Preferred cross-model review target: `codex`, `claude`, `grok`, `cursor`, `composer`, or `opencode`. `grok` binds the native grok CLI when it is installed, and falls back to Grok through Cursor only when that CLI is absent and Cursor is a sanctioned recipient. The review skills still apply host-independence and route-availability gates. | -| [`ce-code-review`](./ce-code-review.md), [`ce-doc-review`](./ce-doc-review.md) | `cross_model_model`, `cross_model_effort` | Pin the resolved peer target's model (an alias such as `fable` or a full id such as `claude-opus-5`, same family as the target; a codex id may carry its serving provider's namespace, such as `openai.gpt-5.6-sol`, when the CLI routes through a non-default `model_provider`) and reasoning effort (claude `low`..`max`, codex `minimal`..`xhigh`, grok `low`..`high`; cursor-agent routes accept none). Unset keeps the skills' editorial mapping. A value the peer cannot honor skips the pass with a stated reason rather than substituting; a conversation request overrides both. | +| [`ce-code-review`](./ce-code-review.md), [`ce-doc-review`](./ce-doc-review.md) | `cross_model_model`, `cross_model_effort` | Pin the resolved peer target's model (an alias such as `fable` or a full id such as `claude-opus-5`, same family as the target; a codex id may carry its serving provider's namespace, such as `openai.gpt-5.6-sol`, when the CLI routes through a non-default `model_provider`) and reasoning effort (claude `low`..`max`, codex `none`..`max`, grok `low`..`high`; cursor-agent routes accept none). Unset keeps the skills' editorial mapping. A value the peer cannot honor skips the pass with a stated reason rather than substituting; a conversation request overrides both. | | [`ce-commit-push-pr`](./ce-commit-push-pr.md) | `pr_teaching_section`, `pr_teaching_archive`, `auto_babysit` | Toggle PR concept teaching, opt into explainer archival, or opt out of the default babysit handoff. Defaults: `true`, `false`, and `true`. `auto_babysit` governs the standing watch handed off after a PR is opened or pushed to -- the open-ended one that spends tokens until you merge. It does not govern [`lfg`](./lfg.md)'s in-pipeline babysit, which is bounded (3 fix rounds, ~30-45 min), ends on its own, and is how that pipeline reaches its "CI decided" completion. | | [`ce-product-pulse`](./ce-product-pulse.md) | `pulse_product_name`, `pulse_lookback_default`, `pulse_primary_event`, `pulse_value_event`, `pulse_completion_events` | Product identity, reporting window, and the events that represent engagement, value, and completion. The setup interview writes these values. | | [`ce-product-pulse`](./ce-product-pulse.md) | `pulse_quality_scoring`, `pulse_quality_dimension`, `pulse_analytics_source`, `pulse_tracing_source`, `pulse_payments_source`, `pulse_db_enabled` | Optional quality scoring and read-only data-source routing. | diff --git a/skills/ce-code-review/scripts/cross-model-adversarial-review.sh b/skills/ce-code-review/scripts/cross-model-adversarial-review.sh old mode 100755 new mode 100644 index 04f8ae119..7699b5f9d --- a/skills/ce-code-review/scripts/cross-model-adversarial-review.sh +++ b/skills/ce-code-review/scripts/cross-model-adversarial-review.sh @@ -330,7 +330,7 @@ validate_model_override() { # Accept an effort override only where the route exposes an effort flag and the # value is one that CLI documents (claude: low|medium|high|xhigh|max; codex -# model_reasoning_effort: minimal|low|medium|high|xhigh; grok: low|medium|high). +# model_reasoning_effort: none|minimal|low|medium|high|xhigh|max; grok: low|medium|high). # cursor-agent routes imply effort in the model id, so any override there is # invalid for the route rather than silently dropped. Empty means "no override". validate_effort_override() { @@ -338,7 +338,7 @@ validate_effort_override() { [ -n "$effort" ] || return 0 case "$route:$effort" in claude:low|claude:medium|claude:high|claude:xhigh|claude:max) ;; - codex:minimal|codex:low|codex:medium|codex:high|codex:xhigh) ;; + codex:none|codex:minimal|codex:low|codex:medium|codex:high|codex:xhigh|codex:max) ;; grok-cli:low|grok-cli:medium|grok-cli:high) ;; opencode:none|opencode:minimal|opencode:low|opencode:medium|opencode:high|opencode:xhigh|opencode:max|opencode:default) ;; *) return 1 ;; diff --git a/skills/ce-doc-review/scripts/cross-model-doc-review.sh b/skills/ce-doc-review/scripts/cross-model-doc-review.sh old mode 100755 new mode 100644 index a3b897d30..757e695ee --- a/skills/ce-doc-review/scripts/cross-model-doc-review.sh +++ b/skills/ce-doc-review/scripts/cross-model-doc-review.sh @@ -320,7 +320,7 @@ validate_model_override() { # Accept an effort override only where the route exposes an effort flag and the # value is one that CLI documents (claude: low|medium|high|xhigh|max; codex -# model_reasoning_effort: minimal|low|medium|high|xhigh; grok: low|medium|high). +# model_reasoning_effort: none|minimal|low|medium|high|xhigh|max; grok: low|medium|high). # cursor-agent routes imply effort in the model id, so any override there is # invalid for the route rather than silently dropped. Empty means "no override". validate_effort_override() { @@ -328,7 +328,7 @@ validate_effort_override() { [ -n "$effort" ] || return 0 case "$route:$effort" in claude:low|claude:medium|claude:high|claude:xhigh|claude:max) ;; - codex:minimal|codex:low|codex:medium|codex:high|codex:xhigh) ;; + codex:none|codex:minimal|codex:low|codex:medium|codex:high|codex:xhigh|codex:max) ;; grok-cli:low|grok-cli:medium|grok-cli:high) ;; opencode:none|opencode:minimal|opencode:low|opencode:medium|opencode:high|opencode:xhigh|opencode:max|opencode:default) ;; *) return 1 ;; diff --git a/skills/ce-setup/references/config-template.yaml b/skills/ce-setup/references/config-template.yaml index 49cd37d86..55ebbc926 100644 --- a/skills/ce-setup/references/config-template.yaml +++ b/skills/ce-setup/references/config-template.yaml @@ -123,8 +123,8 @@ # `fable` or a full id such as `claude-opus-5` for claude; `gpt-*` for codex, # optionally namespace-qualified such as `openai.gpt-5.6-sol` when the codex CLI # routes through a non-default `model_provider`). -# Effort levels: claude low|medium|high|xhigh|max, codex minimal|low|medium| -# high|xhigh, grok low|medium|high; cursor/composer routes take none. A value +# Effort levels: claude low|medium|high|xhigh|max, codex none|minimal|low| +# medium|high|xhigh|max, grok low|medium|high; cursor/composer routes take none. A value # the peer cannot honor skips the pass with a stated reason -- never substituted. # cross_model_review_mode: off # auto | off (default: auto) diff --git a/tests/skills/ce-code-review-cross-model-routes.test.ts b/tests/skills/ce-code-review-cross-model-routes.test.ts index acdb5fa42..4640054a5 100644 --- a/tests/skills/ce-code-review-cross-model-routes.test.ts +++ b/tests/skills/ce-code-review-cross-model-routes.test.ts @@ -1937,10 +1937,21 @@ describe("cross-model provider kernel parity (code-review vs doc-review)", () => } }) + test("codex effort override accepts none and max from the Codex CLI enum", () => { + for (const script of [SCRIPT, DOC_SCRIPT]) { + expect(emitAdapter("codex", script, { CROSS_MODEL_EFFORT_OVERRIDE: "none" })).toContain( + 'model_reasoning_effort="none"', + ) + expect(emitAdapter("codex", script, { CROSS_MODEL_EFFORT_OVERRIDE: "max" })).toContain( + 'model_reasoning_effort="max"', + ) + } + }) + test("an effort override the route cannot honor fails closed in both skills", () => { const cases: Array<[string, string]> = [ ["claude", "minimal"], // not a claude CLI level - ["codex", "max"], // not a codex reasoning level + ["codex", "ultra"], // not a Codex CLI reasoning level ["grok-cli", "xhigh"], // not a grok level ["grok-cursor", "high"], // cursor-agent routes imply effort in the model id ["composer", "high"], @@ -1962,6 +1973,28 @@ describe("cross-model provider kernel parity (code-review vs doc-review)", () => expect(blockBetween(SCRIPT, "validate_effort_override()")).toBe(blockBetween(DOC_SCRIPT, "validate_effort_override()")) }) + test("codex effort enum is pinned across validators, comments, and docs", () => { + const caseArm = + "codex:none|codex:minimal|codex:low|codex:medium|codex:high|codex:xhigh|codex:max" + const commentList = "model_reasoning_effort: none|minimal|low|medium|high|xhigh|max" + for (const script of [SCRIPT, DOC_SCRIPT]) { + const src = readFileSync(script, "utf8") + expect(src).toContain(caseArm) + expect(src).toContain(commentList) + } + const repoRoot = path.join(__dirname, "../..") + expect(readFileSync(path.join(repoRoot, "docs/guides/configuration.md"), "utf8")).toContain( + "codex `none`..`max`", + ) + const yamlNeedle = "codex none|minimal|low|\n# medium|high|xhigh|max" + expect(readFileSync(path.join(repoRoot, ".compound-engineering/config.example.yaml"), "utf8")).toContain( + yamlNeedle, + ) + expect( + readFileSync(path.join(repoRoot, "skills/ce-setup/references/config-template.yaml"), "utf8"), + ).toContain(yamlNeedle) + }) + test("NEVER flags are absent from both skills' adapters", () => { for (const script of [SCRIPT, DOC_SCRIPT]) { for (const route of ROUTES) { From 87318fb050aa32afa9fb37e02906b26ee3d40496 Mon Sep 17 00:00:00 2001 From: saurabh Date: Tue, 1 Sep 2026 23:03:17 +0530 Subject: [PATCH 2/2] fix(cross-model): restore executable bits on review workers Keep the Codex none/max effort change from dropping +x on cross-model-adversarial-review.sh and cross-model-doc-review.sh. --- skills/ce-code-review/scripts/cross-model-adversarial-review.sh | 0 skills/ce-doc-review/scripts/cross-model-doc-review.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 skills/ce-code-review/scripts/cross-model-adversarial-review.sh mode change 100644 => 100755 skills/ce-doc-review/scripts/cross-model-doc-review.sh diff --git a/skills/ce-code-review/scripts/cross-model-adversarial-review.sh b/skills/ce-code-review/scripts/cross-model-adversarial-review.sh old mode 100644 new mode 100755 diff --git a/skills/ce-doc-review/scripts/cross-model-doc-review.sh b/skills/ce-doc-review/scripts/cross-model-doc-review.sh old mode 100644 new mode 100755