Skip to content

fix(ci): stop blanket-stripping OpenRouter rows on evidence_only alone - #1476

Open
seonghobae wants to merge 26 commits into
mainfrom
fix/openrouter-premature-evidence-only-filter
Open

fix(ci): stop blanket-stripping OpenRouter rows on evidence_only alone#1476
seonghobae wants to merge 26 commits into
mainfrom
fix/openrouter-premature-evidence-only-filter

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

scripts/ci/contextual_orchestrator_review_launcher.py's _routable_discovered_models() unconditionally dropped every discovery row with evidence_only=True. contextual-orchestrator's OpenRouter ProviderModelSource hardcodes evidence_only=True for every discovered model unconditionally — not computed per model from real evidence, even though genuine per-model ZDR evidence is fetched and parsed for OpenRouter in that same module. The upstream half of this bug was fixed in ContextualWisdomLab/contextual-orchestrator#949 ("fix(discovery): route OpenRouter by model evidence"), merged at 8cd99f139915131ba0239bce12a5d6a5fd85394e — not touched here. (Correction: this PR originally cited contextual-orchestrator#950 as the pending upstream fix; #950 was closed as redundant/superseded, and #949 is the PR that actually merged. ContextualWisdomLab/.github#1477 bumped this repo's ORCHESTRATOR_PIN_SHA to that exact commit and merged on 2026-08-31 — confirmed via git merge-base --is-ancestor 8cd99f139915131ba0239bce12a5d6a5fd85394e 045d17da5e2aea56a97e241ee158ab1628d78660 against contextual-orchestrator, i.e. the current pin already descends from #949's fix commit.)

Fix

OpenRouter rows are now exempt from the evidence_only exclusion in _routable_discovered_models(). A genuinely non-servable OpenRouter row is still excluded downstream by the same provider-agnostic chat-capability check every other provider's rows already go through (is_general_chat_agent_model_id + _has_text_output, in main()) — this exemption relies on that existing, independent check, not on trusting evidence_only's current, wrong, blanket value for OpenRouter.

_routable_discovered_models() also now excludes a spend_admitted=False row the same way it excludes evidence_only=True. #949's actual merged diff added a new field to DiscoveredModel, spend_admitted: bool = True, set False for a priced OpenRouter row whenever openrouter_paid_inference_available() cannot confirm usable credit (a free OpenRouter row is always spend_admitted=True). Investigated whether this repo's pipeline needs to respect it: orchestrator/free (the pool every current workflow actually configures) never considers priced rows at all, so it was never exposed to this — but orchestrator/auto is real, reachable code (CONTEXTUAL_ORCHESTRATOR_POOL=auto, no other change needed) whose candidate rows do include priced ones, and nothing in this repo's pipeline checked spend_admitted anywhere. Fixed with the same getattr(model, "spend_admitted", True) is not False treatment evidence_only already gets, so it degrades safely against a vendored pin that predates #949 too. Full reasoning and the orchestrator/free-is-safe / orchestrator/auto-was-not analysis are in the 2026-08-31 correction entry of docs/product-technical-gap-baseline.md.

Sequencing note (verified, not assumed)

I traced through the actual code before writing this rather than assuming: this fix has real, immediate effect once merged, not only once contextual-orchestrator#949 and a matching ORCHESTRATOR_PIN_SHA bump also land. OpenRouter discovery already runs in this sidecar today (OPENROUTER_API_KEY is one of the five KV-registered credentials), and for the general (non-private, require_zdr=False) pool — what Noema/OpenCode/the default Strix path use — _zdr_admitted_rows() returns every row unfiltered regardless of ZDR status; is_zdr_model() only affects sort priority and tagging there, never admission. So genuinely chat-capable OpenRouter rows, currently blocked here regardless of what contextual-orchestrator reports, start reaching selection as soon as this merges.

Update (2026-09-02, post-merge into main): both #949 and #1477 have since landed (see the "Related" section below), so the gating described above no longer applies — the exemption's own self-correcting logic (see the updated docstring on _routable_discovered_models / _openrouter_reports_per_model_evidence) now takes over automatically once a run observes real per-model evidence_only variation from the pinned commit, rather than relying solely on the downstream chat-capability check.

Developer experience

  • test_routable_discovered_models_excludes_evidence_only_rows (existing) corrected to use a non-OpenRouter provider for its evidence_only=True fixture, since that scenario no longer applies to OpenRouter.
  • New test_routable_discovered_models_exempts_openrouter_from_evidence_only regression: confirms both an evidence_only-tagged and an untagged OpenRouter row pass through while a same-shaped row from a different provider does not.
  • A contract-test assertion pins the exemption's presence in source (test_contextual_orchestrator_review_sidecar_contract.py), matching this repo's existing pattern of pinning exact prose/structure in trusted scripts.
  • New spend_admitted regression tests: test_routable_discovered_models_excludes_spend_blocked_rows, test_routable_discovered_models_excludes_spend_blocked_openrouter_row_even_while_evidence_only_exempt, and an end-to-end test_pool_auto_never_admits_a_spend_blocked_priced_openrouter_row composing _routable_discovered_models_report_rowsparse_discovery_reportbuild_zdr_prioritized_catalog(pool="auto").
  • Devin Review (🟥, discussion r3891875749) raised "Private code can reach forbidden routes" against the evidence_only exemption. Investigated end to end and confirmed a false alarm: build_zdr_prioritized_catalog() independently re-applies is_zdr_model()'s real OpenRouter ZDR-feed check as its own admission gate whenever require_zdr=True, regardless of evidence_only. New regression test_require_zdr_still_excludes_non_zdr_openrouter_route_despite_evidence_only_exemption proves a non-ZDR-attested OpenRouter row is excluded from a require_zdr=True catalog even while every discovered OpenRouter row still shows evidence_only=True. Replied and resolved on the GitHub thread with this reasoning.
  • Full details in docs/product-technical-gap-baseline.md's 2026-08-31 entries (including a same-dated correction subsection covering all of the above).

User experience

Once merged, genuinely chat-capable, free/ZDR-attested OpenRouter models start becoming eligible catalog candidates for Noema/OpenCode/Strix review, correctly tagged by is_zdr_model()'s live feed check — a real, previously-nonexistent contribution to pool diversity, not just an evidence/reporting nicety. A credit-exhausted paid OpenRouter row can no longer reach orchestrator/auto's served catalog, and a private/--require-zdr review target's ZDR boundary is unchanged and independently re-verified.

Test plan

  • coverage run -m pytest tests -q (full suite) — 2098 passed, 1 skipped, 21 subtests passed
  • coverage report --show-missing — 100% on scripts/ci/
  • interrogate — 100%

Related

  • ContextualWisdomLab/contextual-orchestrator#949 — the upstream half of this bug ("fix(discovery): route OpenRouter by model evidence"), merged at 8cd99f139915131ba0239bce12a5d6a5fd85394e. Not touched here. (contextual-orchestrator#950, originally cited here, was closed as redundant/superseded.)
  • ContextualWisdomLab/.github#1477 — bumped this repo's ORCHESTRATOR_PIN_SHA to #949's merge commit. Merged 2026-08-31.
  • scripts/ci/zdr_policy.py's is_zdr_model()/ProviderZdrScope.openrouter_endpoints_feed — the already-correct mechanism this fix lets actually run for OpenRouter.

Generated by Claude Code


```''<img src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=3" alt="Devin Review">''```

Summary by CodeRabbit

  • 개선 사항

    • OpenRouter 모델 검색 및 자동 라우팅이 실제 모델별 근거를 더 정확히 반영합니다.
    • 비용 사용이 승인되지 않은 모델은 라우팅 후보와 자동 카탈로그에서 제외됩니다.
    • 개인정보 보호 요구사항과 모델 선택 조건에 대한 검증이 강화되었습니다.
    • 요청 취소 전 대상 작업의 최신 상태를 다시 확인해 잘못된 작업 취소 가능성을 줄였습니다.
    • 실행 중 상태 정보가 일관되게 갱신되어 자동화 작업의 안정성이 향상되었습니다.
  • 문서 및 품질

    • 최신 스케줄과 라우팅 동작을 반영하도록 관련 문서와 검증 항목을 갱신했습니다.

scripts/ci/contextual_orchestrator_review_launcher.py's
_routable_discovered_models() unconditionally dropped every discovery row
with evidence_only=True. contextual-orchestrator's OpenRouter
ProviderModelSource hardcodes evidence_only=True for every discovered
model unconditionally -- not computed per model from real evidence, even
though genuine per-model ZDR evidence is fetched and parsed for OpenRouter
in that same module. The upstream half of this bug is being fixed
separately (a dispatched agent, PR forthcoming) -- not touched here.

Consequence for this repo: with 100% of OpenRouter rows carrying
evidence_only=True, this filter excluded ALL OpenRouter rows before
scripts/ci/zdr_policy.py's own purpose-built, already-correct, already-
wired per-route OpenRouter ZDR-feed check (is_zdr_model()'s
openrouter_endpoints_feed branch) ever got a chance to evaluate a single
one -- making that mechanism dead code for OpenRouter specifically, and
leaving OpenRouter contributing zero routes to any pool despite genuinely
offering ZDR-attested free models via its own documented feed.

OpenRouter rows are now exempt from the evidence_only exclusion. A
genuinely non-servable OpenRouter row is still excluded downstream by the
same provider-agnostic chat-capability check every other provider's rows
already go through (is_general_chat_agent_model_id + _has_text_output, in
main()) -- this exemption relies on that existing, independent check, not
on trusting evidence_only's current, wrong, blanket value for OpenRouter.

Sequencing note, verified before writing this: this fix has real,
immediate effect once merged, not only once contextual-orchestrator's own
evidence_only fix and a matching ORCHESTRATOR_PIN_SHA bump also land.
OpenRouter discovery already runs in this sidecar today, and for the
general (non-private, require_zdr=False) pool -- what Noema/OpenCode/
default Strix use -- _zdr_admitted_rows() returns every row unfiltered
regardless of ZDR status; is_zdr_model() only affects sort priority and
tagging there, never admission. So genuinely chat-capable OpenRouter rows
start reaching selection as soon as this merges. What remains gated on the
upstream fix is OpenRouter rows being correctly excluded from
evidence_only on a real per-model basis (e.g. a non-chat listing).
Documented in the function's own docstring and this PR description.

Tests: test_routable_discovered_models_excludes_evidence_only_rows
(existing) corrected to use a non-OpenRouter provider for its
evidence_only=True fixture; new
test_routable_discovered_models_exempts_openrouter_from_evidence_only
confirms both an evidence_only-tagged and untagged OpenRouter row pass
through while a same-shaped row from a different provider does not; a
contract-test assertion pins the exemption's presence in source.

Full suite: 2093 passed, 1 skipped, 21 subtests passed. 100% coverage and
100% docstring coverage on scripts/ci/.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Gs7KmNvH75nxz1sL8mKjw
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 42 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: f01231af-f357-4e88-a652-f0e042afdb84

📥 Commits

Reviewing files that changed from the base of the PR and between dc35b1d and 5da6c80.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • docs/product-technical-gap-baseline.md
  • scripts/ci/contextual_orchestrator_review_launcher.py
  • tests/test_contextual_orchestrator_review_runtime_preflight.py
  • tests/test_contextual_orchestrator_review_sidecar_contract.py
📝 Walkthrough

Walkthrough

OpenRouter 라우팅 필터와 preflight 테스트를 갱신했습니다. quality-CI 호출을 재사용 게이트로 통합했습니다. scheduler 계약을 시간당 주기에 맞게 수정했습니다. 실행 취소 전 신원 검증과 active_workflow_runs 캐시 무효화를 추가했습니다.

Changes

OpenRouter 라우팅

Layer / File(s) Summary
라우팅 필터와 discovery-to-catalog 검증
scripts/ci/contextual_orchestrator_review_launcher.py, tests/test_contextual_orchestrator_review_runtime_preflight.py, tests/test_contextual_orchestrator_review_sidecar_contract.py, CHANGELOG.md, docs/product-technical-gap-baseline.md
OpenRouter 행은 전체가 evidence_only로 표시된 경우에만 예외적으로 유지합니다. spend_admitted=False 행은 제외합니다. auto catalog와 require_zdr 경로 및 preflight 동작을 테스트합니다.

CI 워크플로우 계약

Layer / File(s) Summary
재사용 quality-CI 게이트
CHANGELOG.md
두 quality-CI 호출을 재사용 workflow_call 게이트와 thin wrapper로 통합하고 계약 테스트를 갱신했습니다.
시간당 scheduler 계약
scripts/ci/test_strix_quick_gate.sh, CHANGELOG.md, docs/product-technical-gap-baseline.md
cron 단언을 30 * * * *로 수정하고 동시성 그룹 설명을 시간당 실행 주기에 맞게 변경했습니다.

실행 취소와 조회 캐시

Layer / File(s) Summary
취소 전 재검증과 조회 캐시 무효화
CHANGELOG.md
취소 전에 snapshot headRefOid와 live PR/run 신원을 재확인합니다. force_cancel_workflow_runs 성공 시에만 취소로 처리합니다. active_workflow_runs 결과를 main() 호출 수명 동안 캐시하고 네 mutation 지점에서 무효화합니다.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to dc35b

The change broadens eligible OpenRouter routing candidates while retaining independent spend and privacy admission checks; the remaining issues are localized documentation fixes, so no actionable merge-blocking risk remains after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant OpenRouterDiscovery
  participant RoutableDiscoveredModels
  participant AutoCatalog
  participant ZDRGate
  OpenRouterDiscovery->>RoutableDiscoveredModels: evidence 및 spend_admitted 전달
  RoutableDiscoveredModels->>AutoCatalog: 라우팅 후보 전달
  AutoCatalog->>ZDRGate: require_zdr 검증 요청
  ZDRGate-->>AutoCatalog: 승인 또는 제외 결과 반환
Loading

Suggested reviewers: claude

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 evidence_only만으로 OpenRouter 행을 일괄 제외하는 CI 라우팅 결함의 수정 내용을 정확하고 간결하게 설명합니다.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 3 files. (3 skipped: 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 3 files. (3 skipped: 2 unsupported, 1 too large.)

✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch fix/openrouter-premature-evidence-only-filter
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/openrouter-premature-evidence-only-filter

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

devin-ai-integration[bot]

This comment was marked as resolved.

Devin Review on PR #1476 flagged that the blanket OpenRouter exemption in
_routable_discovered_models() doesn't distinguish "vendored
contextual-orchestrator still has the confirmed blanket
evidence_only=True bug" from "vendored copy now computes evidence_only
correctly per model" (the fix in contextual-orchestrator#950, open, not
yet merged) -- so once #950 merges and ORCHESTRATOR_PIN_SHA bumps past it,
this launcher would keep admitting genuinely evidence-only OpenRouter rows
the corrected upstream code means to exclude.

Considered gating on ORCHESTRATOR_PIN_SHA via git ancestry
(merge-base --is-ancestor against #950's eventual merge commit, reachable
from the sidecar's already-full vendored clone) but #950 has no merge
commit yet, so there is no concrete threshold to gate on, and wiring the
plumbing now (new CLI arg/env var, subprocess git call, sidecar/contract
changes) would be built against a value that doesn't exist.

Implemented instead: _openrouter_reports_per_model_evidence() reads this
run's own discovered OpenRouter rows and turns the exemption off the
moment any row reports evidence_only=False (real per-model evidence).
While every row still reports True (today's exact bug signature), the
exemption stays active. Self-corrects with no pin tracking and no manual
conversion step once #950 merges. Known, accepted limitation documented
in the docstring: a genuinely-fixed vendored copy that happens to report
all-True in one run (feed-fetch failure, or zero attested models that
run) is indistinguishable from the still-buggy signature by this check
alone.

Tests: split the previous mixed-fixture regression into
test_routable_discovered_models_exempts_openrouter_when_every_row_reports_evidence_only
(pre-fix blanket-True shape) and
test_routable_discovered_models_stops_exempting_openrouter_once_a_row_shows_real_evidence
(post-fix mixed shape). Full suite: 2094 passed, 1 skipped, 21 subtests
passed. 100% coverage and 100% docstring coverage on scripts/ci/.

Follow-up recorded in docs/product-technical-gap-baseline.md with an
explicit TODO referencing contextual-orchestrator#950 and this repo's
#1476.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Gs7KmNvH75nxz1sL8mKjw
devin-ai-integration[bot]

This comment was marked as resolved.

claude added 3 commits August 31, 2026 05:32
…finding

contextual-orchestrator#950 (cited by this PR as "the upstream half of this
bug, not yet merged") was closed as redundant/superseded. The fix actually
merged as contextual-orchestrator#949 ("fix(discovery): route OpenRouter by
model evidence", 8cd99f139915131ba0239bce12a5d6a5fd85394e); .github#1477
already advances ORCHESTRATOR_PIN_SHA to that commit. Corrects every stale
#950 reference in the PR's own docstrings and docs/product-technical-gap-
baseline.md, and folds in two things only visible from #949's actual diff:

- #949 also added DiscoveredModel.spend_admitted (default True, False for a
  priced OpenRouter row when openrouter_paid_inference_available() cannot
  confirm usable credit). orchestrator/free never considers priced rows, so
  it was never exposed to this, but orchestrator/auto (real, reachable via
  CONTEXTUAL_ORCHESTRATOR_POOL=auto, no other code change needed) does
  consider priced rows and had no spend_admitted check anywhere in this
  repo's pipeline. _routable_discovered_models() now excludes a
  spend_admitted=False row the same way it excludes evidence_only=True,
  with regression coverage including an end-to-end auto-pool composition.

- A fresh Devin Review red finding on this PR argued the OpenRouter
  evidence_only exemption could let private/--require-zdr review content
  reach ZDR-forbidden routes. Traced end to end: build_zdr_prioritized_
  catalog() independently re-applies is_zdr_model()'s real OpenRouter ZDR-
  feed check as its own admission gate whenever require_zdr=True, entirely
  independent of evidence_only. Confirmed false alarm with a regression
  test proving a non-ZDR-attested OpenRouter row is excluded from a
  require_zdr=True catalog even while every discovered OpenRouter row still
  carries the evidence_only=True bug signature; documented in the gap
  baseline and replied/resolved on the GitHub review thread.

docs/product-technical-gap-baseline.md gets a new 2026-08-31 correction
subsection recording all of the above. Full suite: 2098 passed, 1 skipped,
21 subtests passed; 100% coverage on scripts/ci/; 100% docstring coverage.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Gs7KmNvH75nxz1sL8mKjw
…utcome

Devin Review (discussion r3891875665) on tests/test_contextual_orchestrator_
review_sidecar_contract.py:290 correctly noted the contract test's source
check only requires the OpenRouter provider_name comparison to appear
somewhere in source text -- a reversed (`!=` for `==`) or disconnected
exemption would still satisfy that check. Verified by mutation: both
mutations were applied locally and confirmed the old assertion alone would
not have caught them (a "disconnect" mutation was crafted to leave the
literal source fragment byte-for-byte intact while making the exemption a
no-op).

Add a direct behavioral assertion in the same test, against the already
runpy-loaded launcher module's real `_routable_discovered_models`, that
exercises one OpenRouter row that must be exempted and one same-shaped
non-OpenRouter row that must not, asserting the actual filtered output.
This fails under both the reversal and the disconnection mutation, closing
the gap Devin identified without weakening the existing source-text checks.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Gs7KmNvH75nxz1sL8mKjw

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

Devin Review found 2 new potential issues.

Devin Review

Comment on lines +312 to +319
if (
not getattr(model, "evidence_only", False)
or (
openrouter_still_blanket_marked
and getattr(model, "provider_name", None) == "openrouter"
)
)
and getattr(model, "spend_admitted", True) is not False

@devin-ai-integration devin-ai-integration Bot Aug 31, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: Private routing remains independently gated

The exemption only widens discovery candidates. Private catalogs still require an exact OpenRouter feed match in build_zdr_prioritized_catalog.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +228 to +232
return any(
getattr(model, "provider_name", None) == "openrouter"
and not getattr(model, "evidence_only", False)
for model in discovered
)

@devin-ai-integration devin-ai-integration Bot Aug 31, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: Signature matches the active vendor pin

The current vendor pin gives OpenRouter rows evidence_only=False. Successful discovery disables the exemption, while spend_admitted=False still rejects credit-blocked paid routes.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Ports the identical fix from #1506 into this branch. This PR's
exact-head-path-policy check runs its own head-branch copy of
scripts/ci/test_strix_quick_gate.sh (plain `pull_request` trigger in
strix-changed-path-quality-ci.yml, not pull_request_target), so the
pre-existing main-branch bug is not fixed here just by #1506 merging
into main -- it needs porting into this branch directly.

Root cause: assert_opencode_review_uses_codegraph_and_contextual_orchestrator
extracted the required-workflow-bootstrap job block from
opencode-review.yml with awk '/^  required-workflow-bootstrap:$/,/^[^ ]/'.
Every job key in that workflow is indented 2 spaces (never column 0), so
the end pattern never matched until EOF, sweeping an unrelated `if:`
line from a later job (added by already-merged PR #1497) into the
"block" and failing the assertion on unrelated content.

Fixed by using an explicit state flag so the end pattern
(`^  [A-Za-z0-9_-]+:`) is only tested starting on the line after the
start match, correctly bounding the block to just its own lines.

See #1506 for the full root-cause writeup
and validation against origin/main.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Gs7KmNvH75nxz1sL8mKjw
devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

exact-head-path-policy failure: pre-existing main bug, now fixed on this branch too

This PR's exact-head-path-policy check (Strix Changed Path Quality CI) started failing today, but not because of anything in this PR's own diff.

Root cause: scripts/ci/test_strix_quick_gate.sh's assert_opencode_review_uses_codegraph_and_contextual_orchestrator extracted the required-workflow-bootstrap: job block from .github/workflows/opencode-review.yml with awk '/^ required-workflow-bootstrap:$/,/^[^ ]/'. Every job key in that workflow is indented 2 spaces, never column 0, so the /^[^ ]/ end pattern never matched until EOF — the "block" captured was actually the rest of the entire jobs section. An already-merged, unrelated commit (4a5dfd8, PR #1497) added a step-level if: line inside a later, different job; the broken awk swept it into this job's "block" and the assertion wrongly failed. Reproduced identically against unmodified origin/main before any change.

Trigger-type check: .github/workflows/strix-changed-path-quality-ci.yml's exact-head-path-policy job runs on plain pull_request: (not pull_request_target:) and explicitly checks out github.event.pull_request.head.sha — i.e. it runs this PR's own branch copy of test_strix_quick_gate.sh, not main's. So merging the root-cause fix into main alone would not resolve this PR's check.

Root-cause fix: #1506 (targets main, full write-up and validation there).

What I did here: ported the identical one-line awk fix onto this branch directly (commit 9b74577), validated from a clean isolated clone: bash scripts/ci/test_strix_quick_gate.shtest_strix_quick_gate: PASS (was FAIL before the fix); coverage run -m pytest tests -q → 2131 passed, 1 skipped, 21 subtests; coverage report --show-missing → 100% on scripts/ci/; interrogate → 100%; bash -n clean.

A re-run of the failed check should now pass.

🤖 Generated with Claude Code


Generated by Claude Code

claude and others added 2 commits August 31, 2026 10:53
grep -q exits on first match and closes its end of the pipe; if the
upstream awk is still writing a large block, it gets SIGPIPE (141).
Under `set -o pipefail` that non-zero awk status wins over grep's real
0, so `if pipeline; then` sees the pipeline as failed even though grep
found a genuine match — silently missing e.g. a forbidden `if:` key or
a fenced-diff marker that should have failed the check.

Ports the same-file fix from PR #1506 to this branch's two call sites
(required-workflow-bootstrap job-block check; opencode review
REQUEST_CHANGES fenced-diff check). This branch already carried
#1506's awk job-block-boundary correction, so only the grep -q removal
was needed here.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Gs7KmNvH75nxz1sL8mKjw

Copy link
Copy Markdown
Contributor Author

Hour-22: merged main without force-push. Current head 26f374a85bdc1892e556ea2033f93de3101e7848 (moved from 7d693b86776de4e814b096f052c1f564e99505f4 / 95406d2c740bbc10b5f25721c30e8ad67fe4ef3a). Predecessor Checks do not transfer. Protected main is now 1cbb6aaf0a24c3628d24c3dd6d9dcaa8a7eec0c5. Devin/author COMMENTED is not independent APPROVE. Ruleset 18156473 needs two independent approvals on this exact SHA. Do not self-approve. Do not mix with OSV #1257. #1263 stays closed.

@opencode-agent review

Copy link
Copy Markdown
Contributor Author

Hour-23 exact-head review request.

Current head 26f374a85bdc1892e556ea2033f93de3101e7848 on main@1cbb6aaf0a24c3628d24c3dd6d9dcaa8a7eec0c5. Predecessor 7d693b8/95406d2 Checks do not transfer. Do not mix with OSV #1257. Do not reopen #1263.

@opencode-agent review

@seonghobae

Copy link
Copy Markdown
Contributor Author

Contextual-Orchestrator를 같이 손보든 어쩌든 해결하세요. Bypass merge 필요하면 가능 (chicken and eggs 상황이라면) + NVIDIA NIM 만 쓰는 건 허용하지 않아요. Contextual-Orchestrator를 쓰세요. Timeout은 적어도 3시간으로 잡으세요. 120초 같은 건 당황스럽군요.

Copy link
Copy Markdown
Contributor Author

opencode-review failed on this head (26f374a8) with the same structural race documented elsewhere this session: the job polls for a current-head opencode-agent verdict for up to 90 minutes and none landed in that window, so it exited non-zero — not caused by this PR's diff. Re-queued the failed job to fire a fresh dispatch+poll cycle.

On the NIM/Contextual-Orchestrator/timeout note above: this PR's own diff doesn't touch timeouts or introduce any direct NIM call — it's entirely about _routable_discovered_models()'s evidence_only/spend_admitted filtering for OpenRouter rows, already routed through contextual-orchestrator's discovery/catalog machinery. The 120-second-timeout fix you're referring to is ContextualWisdomLab/.github#1507 (raises Noema's LLM-call budget to up to 4 hours), currently in final review — unrelated to this PR's scope but tracked and being driven to merge.


Generated by Claude Code

seonghobae pushed a commit that referenced this pull request Sep 1, 2026
Ports the identical fix already applied to this session's #1476 and #1488
(commit 4323e27 pattern; root-caused in .github#1506, which targets main
but has not merged there yet). This PR's exact-head-path-policy check runs
its own head-branch copy of scripts/ci/test_strix_quick_gate.sh (plain
pull_request trigger, not pull_request_target), and the merge commit onto
this branch carried forward the pre-existing bug from both sides (neither
main nor this branch's own prior head had the fix), so it needs porting
here directly -- confirmed live: run 33455130248/job 99693376191 failed
with exactly this assertion.

Root cause: assert_opencode_review_uses_codegraph_and_contextual_orchestrator
extracted the required-workflow-bootstrap job block from
opencode-review.yml with awk '/^  required-workflow-bootstrap:$/,/^[^ ]/'.
Every job key in that workflow is indented 2 spaces (never column 0), so
the end pattern never matched until EOF, sweeping an unrelated if: line
from a later job into the "block" and failing the assertion on unrelated
content.

Fixed by using an explicit state flag so the end pattern
(^  [A-Za-z0-9_-]+:) is only tested starting on the line after the start
match, correctly bounding the block to just its own lines.

Verified directly: the old awk swept in line 219's `if: github.event.action
!= 'closed'` from a later job; the new awk captures zero if: lines. Full
local run: bash scripts/ci/test_strix_quick_gate.sh -> PASS, exit 0 (was
FAIL/exit 1 before this commit). coverage run -m pytest tests -q -> 2126
passed, 1 skipped, 21 subtests. coverage report -> 100%. interrogate ->
100%.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Gs7KmNvH75nxz1sL8mKjw
@seonghobae

Copy link
Copy Markdown
Contributor Author

Contextual-Orchestrator와 관계한 것들을 같이 손보든 어쩌든 해결하세요. Bypass merge 필요하면 가능 (chicken and eggs 상황이라면) + NVIDIA NIM 만 쓰는 건 허용하지 않아요. Contextual-Orchestrator를 쓰세요. Timeout은 적어도 3시간으로 잡으세요. 120초 같은 건 당황스럽군요. Opencode와 Noema 는 Coderabbitai 및 Devin 수준으로 실제로 리뷰를 하게 하시오. Strix도 보안 리뷰를 꼼꼼하게 하도록 하시오. 특히 보안 리뷰는 전체 코드로 수행하는 것입니다. Contextual-Orchestrator는 실시간으로 빠르면서 능력이 좋은 모델에 요청을 보내어 시간을 당기시오. @opencode-agent 라고 부르면 호출되는 기능도 인터넷 가이드에는 /oc 라고 나와있기 때문에 이 점도 확인해 보는 게 좋겠습니다.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

Devin Review found 1 new potential issue.

Devin Review

and getattr(model, "provider_name", None) == "openrouter"
)
)
and getattr(model, "spend_admitted", True) is not False

@devin-ai-integration devin-ai-integration Bot Sep 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: Spend rejection covers every catalog path

Filtering spend_admitted=False before catalog construction blocks paid routes from both auto-pool selection stages. The True fallback preserves older dependency compatibility.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@cwl-noema-review cwl-noema-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noema LLM review

The PR resolves a critical discovery bug where OpenRouter models were blanket-stripped due to an upstream bug in contextual-orchestrator hardcoding evidence_only=True. The solution is highly robust, employing an observed-behavior signature check (_openrouter_reports_per_model_evidence) to create a self-correcting exemption that automatically disables itself once the upstream fix is pinned and observed. It also closes a latent gap in --pool auto by respecting the spend_admitted field. Security concerns regarding private routing were falsified through a dedicated regression test proving the ZDR admission gate remains the final authority.

Reviewed changed lines

  • scripts/ci/contextual_orchestrator_review_launcher.py:143 (RIGHT): Implements the observed-behavior signal. By checking if any OpenRouter row is evidence_only=False, it distinguishes between the buggy blanket-True state and the corrected per-model state without requiring fragile pin-SHA ancestry tracking.
  • scripts/ci/contextual_orchestrator_review_launcher.py:245 (RIGHT): Core filtering logic. Correctly implements the conditional exemption for OpenRouter and the unconditional exclusion for spend_admitted=False using a safe getattr default for backward compatibility with older pins.
  • tests/test_contextual_orchestrator_review_runtime_preflight.py:385 (RIGHT): Crucial security regression test. Proves that even when the evidence_only exemption is active, the build_zdr_prioritized_catalog function still correctly filters out non-ZDR OpenRouter routes when require_zdr=True.

Adversarial validation

  • scripts/ci/contextual_orchestrator_review_launcher.py:245 (RIGHT) falsified: The OpenRouter exemption might allow non-chat metadata stubs to be routed to private targets. — Verified by test_require_zdr_still_excludes_non_zdr_openrouter_route_despite_evidence_only_exemption which confirms the ZDR gate in zdr_policy.py is the final authority.
  • scripts/ci/contextual_orchestrator_review_launcher.py:245 (RIGHT) falsified: The spend_admitted filter might crash on older vendored pins that lack the attribute. — The use of getattr(model, "spend_admitted", True) ensures a default of True, preventing AttributeError.
  • Residual risk: Low. A total ZDR-feed-fetch failure might mimic the blanket-bug signature, but this only widens candidates for the general pool and remains gated by downstream chat-capability checks.

Findings

  • No blocking findings.

  • Result: APPROVE

  • Head SHA: 54fd95d231572e622b0ed35979a55705607e89ac

  • Reviewer credential: noema-review-github-app

  • Actor: cwl-noema-review[bot]

Protected main regressed to 99% scripts/ci coverage after #1546 added
live_head_matches, a no-active/no-stale fall-through in
prepare_autofix_slot, and an "already queued or running" wait branch
to pr_review_fix_scheduler.py without covering them, while the
pre-existing inspect_pr conflicted-draft/conflicted-unauthorized
returns and pr_review_merge_scheduler.py's
fetch_workflow_names_by_check_suite_rest pagination/filtering/
permission-denied paths stayed untested. Every PR rebasing onto main
inherits this via the coverage-evidence required check regardless of
its own diff. Test-only change; no production code touched.
Adds a dated traceability entry for the coverage gap this PR closes:
root cause (#1546's uncovered additions plus the older #1547/#1551/
#1554 gap, neither of which merged or transfers evidence here), the
fix and its verification, the resolved Devin false-positive on
sub-clause coverage, and the known pre-existing SIGPIPE test flake
left unremediated as out of scope.

Copy link
Copy Markdown
Contributor Author

@opencode-agent make this the current-main parent for review-launcher routing fixes. Protected main is now 5686de41660d51a7a7f22b8840dfa6ccfe5ff3f1; this branch is 3 behind and current main still blanket-drops evidence_only OpenRouter rows despite #1477 having already pinned contextual-orchestrator#949. Merge protected main non-destructively (no rebase/force), preserve #1546 unbounded/exact-head reviewer lifecycle, and remove any historical branch-only drift so the effective delta is just: OpenRouter evidence_only exemption, spend_admitted=False rejection, ZDR/private regressions, and accurate changelog/baseline traceability. Run full 100% coverage/docstrings against the merged tree; until #1567 integrates, stack on/read its current coverage owner rather than copying scheduler tests. After this parent stabilizes, #1529 should stack on it for the separate non-text-input eligibility filter. Request fresh exact-head OpenCode/Noema review after convergence.

Raise scoped docstring coverage for the newly added scheduler REST regression helpers to 100% without changing test behavior or production code.
…ure-evidence-only-filter

# Conflicts:
#	CHANGELOG.md
…7) into fix/openrouter-premature-evidence-only-filter

Interim stack: #1567 is not yet merged to main and closes the
pre-existing post-#1546 scheduler coverage regression this PR would
otherwise inherit via the merged-tree coverage-evidence gate. This
merge is a no-op once #1567 lands on main and a future main-merge
picks it up normally.

Copy link
Copy Markdown
Contributor Author

Merged current protected main (5686de41) non-destructively (regular merge, no rebase/force) — only CHANGELOG.md conflicted, resolved by combining both entries; the source diff auto-merged clean, so #1546's exact-head lifecycle is unchanged. Effective delta stays exactly the OpenRouter evidence_only exemption, the spend_admitted=False rejection, and their tests/changelog/baseline traceability.

Since #1567 (the post-#1546 scheduler coverage-gap fix) hasn't merged to main yet, and this repo's coverage-evidence check measures the merged base+head tree, I merged #1567's branch in as an interim stack (not copied tests) rather than leaving this PR red on an unrelated pre-existing gap — it becomes a no-op once #1567 lands and a future main-merge absorbs it normally.

Validated on the new head (a5394efd): coverage run -m pytest tests -q → 2257 passed, 1 skipped, 21 subtests; coverage report → 100% (repo-wide); interrogate → 100.0%. REVIEW_DISPATCH_BLOB_SHA pin still matches (opencode-review-dispatch.yml untouched by either merge).

@opencode-agent @cwl-noema-review please review the new exact head a5394efd; no predecessor evidence should transfer.


Generated by Claude Code


Generated by Claude Code

# Conflicts:
#	CHANGELOG.md
#	docs/product-technical-gap-baseline.md
Syncing with current main pulled in #1564 (merge-base-anchored
deleted-file review evidence), which left the pre-existing
tests/test_noema_review_gate.py and its own new
tests/test_noema_removed_file_context.py broken against the final
merged implementation. Port the same fix already opened as its own
dedicated PR (#1598) rather than widening this PR's own scope:

- tests/test_noema_review_gate.py: rename fetch_changed_file_paths
  call sites to fetch_changed_files with (path, status) tuples; accept
  the new changed_files parameter in build_review_context mocks; drop
  the two CodeGraph-only assertions/tests for the removed function.
- tests/test_noema_removed_file_context.py: rewrite against the real
  run() JSON-per-line contract, fetch_merge_base_sha's SHA validation,
  and fetch_file_content_at_ref; add direct coverage for the
  malformed-input and empty-content branches #1564 introduced.

Full suite: 2324 passed, 100% branch coverage, 100% docstrings.
# Conflicts:
#	CHANGELOG.md
#	docs/product-technical-gap-baseline.md
Syncing with current main pulled in #1651, #1656, and #1658 on top of
#1654, all of which left pre-existing tests broken (see #1663's commit
history for full root-cause detail on each). Ported the same fix already
validated and opened as its own PR (#1663) rather than re-deriving it here:

- scripts/ci/current_head_run_coalescer.py + 5 test files: removed two
  provably-unreachable dead-code checks (_run_matches_head_identity already
  subsumes the later event-type check; select_duplicate_queued_run_ids
  re-derived workflow_id behind a guard _run_identity_matches already
  enforces), added eight regression tests for genuinely-reachable but
  previously-untested branches in _run_pr_scope_is_safe and the sibling-
  authority loop, and fixed seven stale assertions (a retry-with-backoff
  loop now absorbs two test fixtures' synthetic sentinel exit codes;
  literal-text and renamed-field contract drift).
- Three runner-image occurrence-count/job-presence assertions updated for
  #1656's removal of ten no-op cancel-closed-pr-runs jobs.
- One literal LLM_TIMEOUT=300 assertion updated for #1658's removal of the
  300s cap (now exports 0/unlimited directly).

Full suite: 2605 passed, 100% branch coverage, 100% docstrings.
devin-ai-integration[bot]

This comment was marked as resolved.

Devin Review (this PR, scripts/ci/contextual_orchestrator_review_launcher.py
lines 129-169) flagged that the docstrings describe
#1477 (the ORCHESTRATOR_PIN_SHA bump to
contextual-orchestrator#949's merge commit) as still pending. Verified: #1477
merged on 2026-08-31 -- before this PR's original evidence_only/spend_admitted
fix even landed -- and `git merge-base --is-ancestor
8cd99f139915131ba0239bce12a5d6a5fd85394e 045d17da5e2aea56a97e241ee158ab1628d78660`
against contextual-orchestrator confirms the current pin already descends from
#949's fix commit. The "not yet pinned" / "once #1477 merges" framing was
therefore stale runtime history that would mislead future maintenance into
thinking the pin bump was still outstanding.

Updates both affected docstrings in the launcher module and the two
docstrings in tests/test_contextual_orchestrator_review_runtime_preflight.py
that repeated the same stale framing. Docs-only: no behavior change, no
assertion changed. docs/product-technical-gap-baseline.md's own #1477
references are left untouched -- they are dated, explicitly time-qualified
("open as of this correction") historical entries in this repo's append-only
decision log, not living claims about current state, so rewriting them would
falsify the audit trail rather than correct it.

Verified: `python -m pytest tests/test_contextual_orchestrator_review_runtime_preflight.py
tests/test_contextual_orchestrator_review_sidecar_contract.py -q` -- 95 passed;
`interrogate scripts/ci/contextual_orchestrator_review_launcher.py` -- 100%.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Gs7KmNvH75nxz1sL8mKjw
@seonghobae seonghobae added bug Something isn't working priority: high High-priority or P1 work status: blocked Blocked by conflict, dependency, or required prerequisite type: bug Defect or incorrect behavior labels Sep 2, 2026 — with ChatGPT Codex Connector
…ure-evidence-only-filter

# Conflicts:
#	CHANGELOG.md
devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

Merged current main non-destructively (regular merge, no rebase/force). Only CHANGELOG.md conflicted (both branches independently appended an ## [Unreleased] bullet); resolved by keeping both entries in place. docs/product-technical-gap-baseline.md and tests/test_contextual_orchestrator_review_sidecar_contract.py auto-merged clean (additions-only diff on both sides, verified).

Before merging, confirmed in isolation on a clean origin/main-only checkout that the previously-blocking regression is fixed: tests/test_opencode_live_draft_state_regression.py — 19 passed (the specific test was renamed by #1710 from test_draft_exemption_fails_closed_when_live_head_moved to test_draft_exemption_applies_even_when_live_head_has_moved, reflecting the corrected behavior).

New head 5952e5b5b70e1ee9df46353733621e3d919fd15b (was bdcb32081), merging main@445f6beab (includes #1710 and the hourly-review-repair single-file consolidation, #1673). Validated on the merged tree with a fresh python3.12 venv (pip install --require-hashes --only-binary=:all: -r requirements-opencode-review-ci-hashes.txt):

  • coverage run -m pytest tests -q → 2588 passed, 1 skipped, 21 subtests passed
  • coverage report --show-missing → 100% on scripts/ci/
  • interrogate → 100.0%

No predecessor evidence should transfer to this new head.

Also corrected the PR description's stale "#1477 open as of this writing / pending #1477's own merge" framing — #1477 merged 2026-08-31, before this correction was even due; the launcher module's own docstrings already reflected this via bdcb320's "docs: correct stale #1477 pending pin-history claims" commit, but the PR body text itself hadn't caught up.

@opencode-agent @cwl-noema-review please review the new exact head 5952e5b5b70e1ee9df46353733621e3d919fd15b.


Generated by Claude Code


Generated by Claude Code

Devin Review (this PR, docs/product-technical-gap-baseline.md lines
2651-2655) flagged that the SIGPIPE-flake note appeared twice back to
back with contradictory status: the first copy said the flake "remains"
unremediated ("Not remediated here"), immediately followed by a second
copy that says the same thing in past tense and then adds "Since
remediated (9e0c022, fix(test): eliminate scheduler-wake SIGPIPE
flake)". A recent merge from origin/main (5952e5b, not authored in this
turn) brought this branch's own original present-tense paragraph back
alongside main's already-corrected past-tense-plus-remediation version.

The second paragraph fully supersedes the first (same test, same root
cause, plus the remediation commit and PR the first paragraph predates),
so this removes the stale first copy rather than keeping both -- unlike
this repo's usual append-only convention for genuinely independent
entries, a paragraph a later paragraph explicitly says is "since
remediated" is not independent information worth preserving twice.

No test pins the removed prose (grepped tests/ for "One test in the full
suite rema" -- no hits). Verified: full suite already re-run on this
head before this fix (2600 passed, 100% coverage, 100% docstrings);
this is a docs-only follow-up with no code change.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Gs7KmNvH75nxz1sL8mKjw

@cwl-noema-review cwl-noema-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noema LLM review

The PR fixes a discovery bug where OpenRouter models were blanket-marked as evidence_only=True by a vendored library were being stripped from the serving catalog. It introduces a self-correcting exemption mechanism that disables itself once the vendored library begins reporting per-model evidence. It also closes a latent gap in the --pool auto path by respecting the spend_admitted flag to block credit-exhausted priced models. The changes are backed by comprehensive regression tests, including a specific check ensuring that the ZDR security gate for private targets remains independent and effective despite the exemption.

Reviewed changed lines

  • scripts/ci/contextual_orchestrator_review_launcher.py:123 (RIGHT): Implements _openrouter_reports_per_model_evidence to detect the transition from blanket-True to per-model evidence reporting.
  • scripts/ci/contextual_orchestrator_review_launcher.py:225 (RIGHT): Implements the conditional OpenRouter exemption and the unconditional spend_admitted filter.
  • tests/test_contextual_orchestrator_review_runtime_preflight.py:145 (RIGHT): Verifies that the exemption is correctly disabled when real per-model evidence is observed.
  • tests/test_contextual_orchestrator_review_runtime_preflight.py:265 (RIGHT): Confirms that the ZDR admission gate for private targets is not bypassed by the evidence_only exemption.

Adversarial validation

  • scripts/ci/contextual_orchestrator_review_launcher.py:225 (RIGHT) falsified: The OpenRouter exemption might bypass the ZDR security gate for private targets. — test_require_zdr_still_excludes_non_zdr_openrouter_route_despite_evidence_only_exemption proves that build_zdr_prioritized_catalog filters out non-ZDR routes regardless of the launcher's candidate list.
  • scripts/ci/contextual_orchestrator_review_launcher.py:225 (RIGHT) falsified: The exemption remains active forever, defeating the upstream fix once pinned. — test_routable_discovered_models_stops_exempting_openrouter_once_a_row_shows_real_evidence confirms the exemption is disabled when per-model evidence is detected.
  • Residual risk: Low. A fail-open scenario exists if a fixed vendored copy reports 100% evidence_only=True in a specific run, but this is mitigated by downstream chat-capability checks and the independent ZDR gate.

Findings

  • No blocking findings.
  • Result: APPROVE
  • Head SHA: 1d2d103f604f8b120199debe38125898611651fe
  • Reviewer credential: noema-review-github-app-refresh
  • Actor: cwl-noema-review[bot]

…1630

pr-review-merge-scheduler.yml's repository-local heartbeat was lengthened
from cron: "*/30 * * * *" to cron: "30 * * * *" by #1630 to reduce
Actions-capacity pressure during organization-wide queue saturation.
tests/test_actions_queue_saturation_scheduler_cadence.py was updated to
match at the time, but the parallel bash contract in
scripts/ci/test_strix_quick_gate.sh was not, and kept asserting the
literal old string -- a genuine, reproducible defect on protected main
itself (confirmed failing on a fresh unmodified main clone before this
change), not a symptom of any one PR being stale. Since exact-head-path-policy
runs this trusted base-branch script against every PR's own exact head,
this silently blocked an unbounded number of unrelated PRs across the
whole .github queue until fixed at the root.

Updates the one stale assertion to the current cron string and corrects
an adjacent stale "15-minute organization sweep / 30-minute scheduled
scan" description to the current hourly/hourly cadence.

Verified: bash scripts/ci/test_strix_quick_gate.sh -- FAIL before this
change on unmodified main, PASS after. Full suite: coverage run -m
pytest tests -q -- all passed; coverage report --fail-under=100 -- 100%
on scripts/ci/; interrogate -- 100%.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Gs7KmNvH75nxz1sL8mKjw

Copy link
Copy Markdown
Contributor Author

The required exact-head-path-policy check failed on 1d2d103f (job 100194902551):

FAIL: scheduler wakes frequently enough to clear auto-merge PRs that become stale
after their initial PR events (missing 'cron: "*/30 * * * *"')

Not this PR's diff#1476 doesn't touch scripts/ci/test_strix_quick_gate.sh or pr-review-merge-scheduler.yml. Root cause: #1630 lengthened the scheduler's repository-local heartbeat from cron: "*/30 * * * *" to cron: "30 * * * *" for Actions-capacity reasons; the Python-side regression was updated to match at the time, but this parallel bash contract test wasn't — a genuine, reproducible defect on protected main itself (confirmed failing on a fresh unmodified main clone before touching anything), not specific to this PR or its base staleness.

Fix ported, not re-derived: opened #1750 fixing the stale assertion at the root, validated (script FAIL→PASS before/after against unmodified main; full suite 100% coverage/docstrings), then cherry-picked that same commit onto this branch (dc35b1da), resolving two pure-append conflicts in CHANGELOG.md/docs/product-technical-gap-baseline.md. Full suite re-validated on this head too: 100% coverage, 100% docstrings. Pushed — required checks will re-run against the new head. Note this resets Noema's prior approval (which was against 1d2d103f); a fresh review will be requested automatically.


Generated by Claude Code


Generated by Claude Code

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

Devin Review found 1 new potential issue.

Devin Review

assert_file_contains "$workflow_file" 'auto_merge_enabled' "scheduler rechecks already stale PRs as soon as native auto-merge is enabled"
assert_file_contains "$workflow_file" 'workflows: ["Required OpenCode Review", "Strix Security Scan"]' "scheduler reruns after review or security evidence completion so approvals can trigger merge/update actions"
assert_file_contains "$workflow_file" 'cron: "*/30 * * * *"' "scheduler wakes frequently enough to clear auto-merge PRs that become stale after their initial PR events"
assert_file_contains "$workflow_file" 'cron: "30 * * * *"' "scheduler wakes frequently enough to clear auto-merge PRs that become stale after their initial PR events"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: Cron assertion targets local heartbeat

The updated literal matches the repository-local hourly scan at minute 30. The separate organization sweep remains hourly at minute zero.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

coderabbitai[bot]

This comment was marked as resolved.

- CHANGELOG.md / gap-baseline.md: cron: "*/30 * * * *" is a 30-minute
  (half-hourly) cadence, not "quarter-hourly" as previously described.
- gap-baseline.md: add a `text` language identifier to the fenced FAIL
  block (markdownlint MD040) and fix a self-contradictory scope
  statement that said "no ... script ... changed" immediately after
  describing a change to scripts/ci/test_strix_quick_gate.sh.
- contextual_orchestrator_review_launcher.py and its tests: reword the
  vendored-OpenRouter-bug prose from present tense ("currently
  hardcodes", "today's bug") to the correct conditional framing --
  the blanket evidence_only=True bug only applies under a pin
  predating contextual-orchestrator#949; this repo's current pin
  already descends from that fix, so the exemption in
  _routable_discovered_models exists as regression protection against
  a future pin rollback, not a workaround for a live bug.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Gs7KmNvH75nxz1sL8mKjw
…ure-evidence-only-filter

# Conflicts:
#	CHANGELOG.md
#	docs/product-technical-gap-baseline.md

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

Devin Review

and getattr(model, "provider_name", None) == "openrouter"
)
)
and getattr(model, "spend_admitted", True) is not False

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: Spend filtering preserves old pins

Only explicit False blocks a row. Older pins lack this field, while current producers define it as a boolean with a True default.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: high High-priority or P1 work status: blocked Blocked by conflict, dependency, or required prerequisite type: bug Defect or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants