fix(strix): recognize orchestrator/auto in is_contextual_orchestrator_model - #1421
fix(strix): recognize orchestrator/auto in is_contextual_orchestrator_model#1421seonghobae wants to merge 7 commits into
Conversation
…_model Root cause of the org-wide "Default-branch repository_dispatch Strix evidence failed" failure seen identically across many unrelated PRs (#1414, #789, #1382, #1276, and others): PR #1401 (commit e94f1d1) renamed the Strix primary model from orchestrator/free to orchestrator/auto throughout strix.yml and its contract tests, but missed scripts/ci/strix_quick_gate.sh's is_contextual_orchestrator_model(), which still only recognized the old orchestrator/free spelling. That made resolved_llm_api_base_for_model() treat orchestrator/auto as a non-gateway model, so its "must be an https URL" check rejected the legitimate pinned loopback sidecar base (http://127.0.0.1:18080/v1) that the workflow always provisions for the contextual-orchestrator provider. Every PR-scoped Strix run exited 2 with: ERROR: LLM_API_BASE must be an https URL when configured. This landed on main via #1401 itself without failing that PR's own Strix check, because pull_request_target required workflows run the *base* branch's trusted workflow file: PR #1401's own CI still ran the pre-rename strix.yml, so the new-workflow/old-gate-script mismatch only became observable on every PR opened after it merged. Fix: - is_contextual_orchestrator_model(): recognize orchestrator/auto and contextual-orchestrator/orchestrator/auto alongside the existing orchestrator/free spellings (CONTEXTUAL_ORCHESTRATOR_POOL supports both "free" and "auto"; contextual_orchestrator/orchestrator.py's TaskOrchestrator.AUTO_MODEL / FREE_MODEL are both real sentinels the gateway itself distinguishes). - child_model_for_api_base(): qualify the child process model from the actual resolved $model instead of a hardcoded 'openai/orchestrator/free' literal, so a scan actually configured for the auto pool sends "openai/orchestrator/auto" to the gateway instead of silently asking for the free pool regardless of CONTEXTUAL_ORCHESTRATOR_POOL. - Refreshed two STRIX_PROVIDER_UNAVAILABLE log lines to name whichever model was actually primary, rather than hardcoding orchestrator/free. Adds a mirrored orchestrator/auto qualification scenario to scripts/ci/test_strix_quick_gate.sh (function-dispatch, filtered-case dispatch, and the flat sequential run) alongside the existing orchestrator/free case, plus a Python regression test in tests/test_strix_openai_fallback_api_base.py exercising resolved_llm_api_base_for_model() directly against orchestrator/auto. Validation: - python3 -m pytest tests -q: 1874 passed, 1 skipped (pre-existing, unrelated) -- no regressions vs. the pre-fix baseline. - interrogate: 100% (RESULT: PASSED). - coverage report: pre-existing 1-line gap in scripts/ci/pingora_edge_policy.py is present identically on unmodified main; unrelated to this change. - Targeted scripts/ci/test_strix_quick_gate.sh scenarios via STRIX_TEST_CASE_FILTER: contextual-orchestrator-gateway-model-qualification, contextual-orchestrator-gateway-model-qualification-auto (new), and contextual-orchestrator-missing-api-base-fails-closed all pass with no scenario-specific failures (the suite's one unrelated pre-existing failure -- an opencode-review.yml bootstrap shape-drift assertion -- reproduces identically on unmodified main and is out of scope here). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 5 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The PR was opened only seconds before this check ran, so the async OpenCode review dispatch hadn't had a chance to post a verdict yet — there's nothing in the diff to fix here. Re-running now would just reproduce the same result (not a flake, so I'm not spending the one re-run on it). I'll keep this PR watched and act once the actual OpenCode verdict lands and/or Strix, CodeQL, and the other in-flight checks complete. Generated by Claude Code Generated by Claude Code |
Document this hourly cycle's org-wide Strix root-cause finding (fixed by this same branch), plus PR #1233/#1275/#1276 merge-conflict resolution, #1274 closure as superseded by #1307, and the unrelated pre-existing scripts/ci/pingora_edge_policy.py coverage-gap finding, per the dated continuation-entry convention already used in this file. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…api_base is_contextual_orchestrator_model() accepts both the bare pool spelling (orchestrator/free, orchestrator/auto) and the provider-prefixed spelling (contextual-orchestrator/orchestrator/free, contextual-orchestrator/orchestrator/auto). child_model_for_api_base() echoed $model verbatim after the openai/ prefix, so the provider-prefixed spelling produced openai/contextual-orchestrator/orchestrator/auto instead of the gateway's expected openai/orchestrator/auto, breaking scans configured with that spelling. Strip the contextual-orchestrator/ prefix before qualifying. Found by Devin Review on this PR. Adds a regression scenario (contextual-orchestrator-gateway-model-qualification-auto-prefixed) mirrored across the fake-strix dispatch, the STRIX_TEST_CASE_FILTER dispatch, and the flat sequential run, following this file's existing convention. Verified the new scenario fails with the exact reported mismatch before this fix and passes after; full suite otherwise unchanged (1 pre-existing, unrelated failure also present on unmodified main). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015Gs7KmNvH75nxz1sL8mKjw
|
Verified Devin's finding on Pushed a fix ( Generated by Claude Code Generated by Claude Code |
|
The All other required checks (CodeQL, security scans, OpenCode review, dependency review, etc.) are unaffected by this and should be evaluated normally. Resolving this specific check needs either a maintainer/admin merge decision that accounts for the deadlock, or an org-level process for this situation — I don't have a safe way to make this PR's own Strix run pass without bypassing the gate, which I won't do. Keeping this PR watched; I won't re-comment on further repeats of this same expected Generated by Claude Code Generated by Claude Code |
…tor-auto-model-recognition' into HEAD
|
This is not a defect in this PR's diff — it's a shared-infrastructure failure in Generated by Claude Code Generated by Claude Code |
Ports the fix from PR #1414 into this branch: the required-workflow-bootstrap job's "Enforce Cloudflare Pingora edge policy" step carried a redundant if: ${{ github.event_name == 'pull_request_target' }} guard, even though opencode-review.yml's only trigger is pull_request_target. The bootstrap contract (scripts/ci/test_strix_quick_gate.sh) correctly rejects any if: inside required-workflow-bootstrap, since a required-workflow check must never depend on event payload fields to materialize. This is a real, independent blocker sharing this PR's same pull_request_target trust-boundary deadlock: it was failing the exact-head-path-policy check on every push here. #1414 is not yet merged and hits the identical deadlock in the other direction (its own Strix check needs this PR's orchestrator/auto fix on main first), so porting the fix here breaks the cycle for this branch without waiting on #1414's merge. Full local suite green: 1876 passed / 1 skipped (pytest), full test_strix_quick_gate.sh PASS with no bootstrap-guard failure. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015Gs7KmNvH75nxz1sL8mKjw
|
Ported #1414's fix into this branch: removed the redundant Why port rather than wait for #1414 to merge: #1414 hits the identical Full local validation on the combined change: Generated by Claude Code Generated by Claude Code |
There was a problem hiding this comment.
Pull request overview
OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.
Findings
1. HIGH Current-head GitHub Checks - Fix failed required checks before approval
- Problem: Failed same-head checks remain for
ac5eca40071835a4ce42355d305c7da1b3145308. - Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
- Fix: Read and fix the failed check logs below, then rerun the current-head checks.
- Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.
Failed checks:
- Required Noema Review/noema-review: FAILURE (https://github.com/ContextualWisdomLab/.github/actions/runs/33290820461/job/99202021322)
- Strix Security Scan/strix: FAILURE (https://github.com/ContextualWisdomLab/.github/actions/runs/33290820383/job/99202021270)
- Strix Security Scan/strix: failure (https://github.com/ContextualWisdomLab/.github/actions/runs/33290820383/job/99202021270)
- noema-review check run: failure (https://github.com/ContextualWisdomLab/.github/actions/runs/33290820461/job/99202021322)
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Workflow: opencode-review.yml"]
S1 --> I1["GitHub Actions review job"]
I1 --> R1["Review risk: Workflow: opencode-review.yml"]
R1 --> V1["actionlint plus required checks"]
Evidence --> S2["Repository file: CHANGELOG.md"]
S2 --> I2["repository behavior"]
I2 --> R2["Review risk: Repository file: CHANGELOG.md"]
R2 --> V2["required checks"]
Evidence --> S3["Docs: product-technical-gap-baseline.md"]
S3 --> I3["operator or user guidance"]
I3 --> R3["Review risk: Docs: product-technical-gap-baseline.md"]
R3 --> V3["docs review"]
Evidence --> S4["CI script: strix_quick_gate.sh"]
S4 --> I4["review and security gate shell path"]
I4 --> R4["Review risk: CI script: strix_quick_gate.sh"]
R4 --> V4["bash -n plus Strix self-test"]
Evidence --> S5["CI script: test_strix_quick_gate.sh"]
S5 --> I5["review and security gate shell path"]
I5 --> R5["Review risk: CI script: test_strix_quick_gate.sh"]
R5 --> V5["bash -n plus Strix self-test"]
Evidence --> S6["Test: test_pingora_edge_policy.py (3 files)"]
S6 --> I6["regression suite"]
I6 --> R6["Review risk: Test: test_pingora_edge_policy.py (3 files)"]
R6 --> V6["targeted test run"]
OpenCode Review Overview
|
|
Fresh independent owner-canary reproduction on PR #1176 exact head |
|
Closing this in favor of #1413, which was opened earlier and already carries the identical, correctly-implemented I've ported the ported-from-#1414 bootstrap-guard fix (the other genuinely useful addition from this PR) onto #1413's branch as well, so nothing is lost. #1413 also has more thorough documentation and real canary evidence (DiskSage, LineageWeave #774) worth preserving as the surviving PR. Generated by Claude Code Generated by Claude Code |
* fix(sidecar): refresh stale contextual-orchestrator review pin scripts/ci/contextual_orchestrator_review_sidecar.sh's ORCHESTRATOR_PIN_SHA default (b21645116b352967e50fc497b87eb745b9cc8c61) was 103 commits behind contextual-orchestrator main. Observed directly in hosted noema-review job logs (.github PR #1421, contextual-orchestrator PR #857 and others): the vendored sidecar's own preflight against the stale pin fails closed with "gateway preflight returned HTTP 502" (and, on a differently-shaped request, "request_failed status=413 code=request_too_large") before the model pool can run, so opencode-agent/Noema never post a verdict and the required opencode-review/noema-review checks fail on unrelated PRs across both repos. Bumps the pin to 5f2753ace756ddd81049a5221d55e8977572a416 (current contextual-orchestrator main HEAD, confirmed green on Tests/Security/Fuzz) in the three places the contract tests pin it: the sidecar script default, tests/test_contextual_orchestrator_review_sidecar_contract.py's ORCH_PIN_SHA, and docs/adr/0003-contextual-orchestrator-vendored-free-zdr.md's "today" reference. requirements.lock needs no separate sync -- the sidecar installs it fresh from the freshly-checked-out pinned commit, not from a copy embedded in this repo. Also ports the still-unmerged #1414 fix (remove the redundant step-level if: github.event_name guard inside required-workflow-bootstrap, which the bootstrap contract correctly rejects) so this PR's own exact-head-path-policy check isn't blocked by that separate, already-diagnosed, pre-existing gap. This is the second sidecar-pin staleness incident in as many days (see the 2026-08-29 gap-baseline entry for the first). Documented as a gap-baseline entry recommending a scheduled pin-freshness check as a follow-up, since nothing currently keeps this pin near contextual-orchestrator main on an ongoing basis. Full local suite green: 1873 passed / 1 skipped (pytest), full test_strix_quick_gate.sh PASS. Live gateway behavior at the new pin can only be confirmed by a post-merge hosted noema-review/opencode-review run. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015Gs7KmNvH75nxz1sL8mKjw * fix(sidecar): exclude evidence-only discovery rows from live selection Devin Review flagged this on PR #1422: the new pin's contextual_orchestrator discover_all_models() marks the entire OpenRouter catalog evidence_only=True (added since the old b2164511 pin) -- by contextual-orchestrator's own design, those rows exist solely to supply ZDR evidence for other providers' models and must never become live inference agents; its own agent_from_discovered() raises ValueError rather than serve one, and is_routable_discovered_model() excludes them. scripts/ci/contextual_orchestrator_review_launcher.py builds its own catalog independently (never calling agent_from_discovered()), and its selection loop had no evidence_only check anywhere in its discovery-to-catalog path, so an evidence-only OpenRouter row could reach this review sidecar's live serving catalog once the pin advances far enough to introduce the field. Adds _routable_discovered_models() (mirroring contextual-orchestrator's own filtering semantics) and applies it before both free-route detection and pool selection. Adds a direct unit test proving the exclusion, and confirmed it fails with the exact reported behavior before this fix. Updates the sidecar contract test's pinned wiring strings to match. Full local suite green: 1874 passed / 1 skipped (pytest, +1 new test); full test_strix_quick_gate.sh PASS. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015Gs7KmNvH75nxz1sL8mKjw --------- Co-authored-by: Claude <noreply@anthropic.com>
Root cause
Every PR-scoped Strix run across the org has been failing identically since
#1401 merged, e.g.:
Confirmed on #1414, #789, #1382, #1276 and others (identical signature:
"Strix Security Scan/strix: failure — Default-branch repository_dispatch
Strix evidence failed").
#1401 renamed Strix's primary model from
orchestrator/freetoorchestrator/autothroughoutstrix.ymland its contract tests, but didnot update
scripts/ci/strix_quick_gate.sh'sis_contextual_orchestrator_model(),which still only recognized the old
orchestrator/freespelling. That maderesolved_llm_api_base_for_model()treatorchestrator/autoas anon-gateway model, so its https-only check rejected the legitimate pinned
loopback sidecar base (
http://127.0.0.1:18080/v1) the workflow alwaysprovisions for the contextual-orchestrator provider — failing the gate with
exit code 2 before a scan could even start.
This didn't fail #1401's own CI because
pull_request_targetrequiredworkflows run the base branch's trusted workflow file — #1401's own run
used the pre-rename
strix.yml. The new-workflow / old-gate-script mismatchonly became observable on every PR opened after #1401 merged into
main.Fix (
scripts/ci/strix_quick_gate.sh)is_contextual_orchestrator_model(): also recognizeorchestrator/autoand
contextual-orchestrator/orchestrator/auto, alongside the existingorchestrator/freespellings.CONTEXTUAL_ORCHESTRATOR_POOLsupports bothfreeandauto, andcontextual_orchestrator/orchestrator.py'sTaskOrchestrator.AUTO_MODEL/FREE_MODELare both real sentinels thegateway itself distinguishes by this exact model string.
child_model_for_api_base(): qualify the child-process model from theactual resolved
$modelinstead of a hardcodedopenai/orchestrator/freeliteral — otherwise a scan configured for the auto pool would silently
keep asking the gateway for the free pool regardless of
CONTEXTUAL_ORCHESTRATOR_POOL.STRIX_PROVIDER_UNAVAILABLElog lines now name whichever model wasactually primary instead of hardcoding
orchestrator/free.Tests
orchestrator/autoqualification scenario inscripts/ci/test_strix_quick_gate.sh(added to the function-dispatch case,the
STRIX_TEST_CASE_FILTER-driven dispatch, and the flat sequential run),alongside the pre-existing
orchestrator/freecase.tests/test_strix_openai_fallback_api_base.py(
test_workflow_gateway_base_accepts_auto_pool_model) exercisingresolved_llm_api_base_for_model()directly againstorchestrator/auto.Validation
python3 -m pytest tests -q: 1874 passed, 1 skipped — no regressions vs.the pre-fix baseline (confirmed by running the identical suite on
unmodified
main).interrogate: RESULT: PASSED (100%).coverage report: pre-existing 1-line gap inscripts/ci/pingora_edge_policy.py(line 274, an unreachablescripts/ci/test_strix_quick_gate.shscenarios viaSTRIX_TEST_CASE_FILTER(contextual-orchestrator-gateway-model-qualification,the new
-autovariant, andcontextual-orchestrator-missing-api-base-fails-closed)all pass with no scenario-specific failures. The suite's one remaining
failure — an unrelated
opencode-review.ymlbootstrap shape-driftassertion — reproduces identically on unmodified
mainand is out ofscope here.
Known limitation: this PR's own Strix check
Per
CLAUDE.md's "pull_request_targettrust boundary" note and theidentical situation documented in #1401's own description: this PR's Strix
check runs against the current (buggy)
maingate script, sincepull_request_targetrequired workflows execute the base branch's trustedscripts rather than this PR's head. So this PR is expected to reproduce the
exact same pre-existing failure it fixes, on its own check, until it merges
— the same trusted-workflow deadlock #1401 hit and documented. All other
required checks (security scans, CodeQL, OpenCode review) are expected to
be unaffected and should be evaluated on their own merits.
Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Generated by Claude Code