fix: pin NOEMA_LLM_MODEL routing alias to orchestrator/free - #535
fix: pin NOEMA_LLM_MODEL routing alias to orchestrator/free#535seonghobae wants to merge 93 commits into
Conversation
The bare contextual-orchestrator alias is treated by contextual-orchestrator's TaskOrchestrator the same as orchestrator/auto: the full agent pool, including paid providers, is eligible. Only orchestrator/free restricts a request to the free/ZDR agent pool (free_only=True, judge_agent_ids scoped to free_ids in conduct()). Noema's scripts/lib/orchestrator-gateway.mjs hard-enforced the bare alias as the only accepted NOEMA_LLM_MODEL value, so every Noema/naruon LLM call (PR review, hourly product development, naruon judgments) could reach paid providers instead of being restricted to the free/ZDR pool. Change DEFAULT_ROUTING_ALIAS to "orchestrator/free" and update resolveOrchestratorModel to hard-reject the old bare alias. Regenerate contracts/orchestrator-gateway.json and update every test/doc that asserted the old alias as the canonical value or described routing as "min-cost / max-performance" (now the fail-closed zero-cost ZDR-first pool). Matches ContextualWisdomLab/.github's opencode.jsonc, which already pins contextual-orchestrator/orchestrator/free. This is a code/doc change only. The live NOEMA_LLM_MODEL GitHub Actions variable must be updated separately by an org/repo administrator; until then the hardened preflight fails closed on the old value by design. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BV96rXhqoR3tYZ9AeAVur4
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
|
Cross-repo consistency check from a session that's spent this pass deep in Two things this PR does that line up cleanly with what the directive requires elsewhere in the org, worth having on record as independent cross-repo confirmation:
No blocking concerns from this reading — flagging for the record, not asking for changes. Generated by Claude Code |
…r-free-routing-alias # Conflicts: # CHANGELOG.md
Merge conflict resolution:
|
Commit 44e58c9 ("remove local severity admission thresholds") changed reviewer/noema_reviewer/models.py and gating.py but left four regression tests, one workflow-authority test, and one CLI contract test unsynced with the new behavior: - test_gating.py: the downgrade summary wording changed from "current-head checks or MEDIUM-or-higher..." to "unresolved current-head check, scanner, or review-thread evidence...", but the test still asserted the old plural "current-head checks" substring. - test_github_io.py: ReviewVerdict.confidence became a read-only property (always Confidence.MEDIUM / LegacyConfidence "not-applicable") rather than a constructor field, but the test still passed confidence= as a kwarg, which pydantic now rejects as extra_forbidden. - test_verdict_invariants.py: the approval-invariant validator now rejects ANY finding (not just MEDIUM+) alongside an APPROVE verdict, per models.py's own docstring ("severity ... never a local admission threshold") and the already-updated, still-passing test_models.py::test_approval_rejects_every_evidence_backed_finding. The LOW/INFO "advisory findings remain compatible with approval" test encoded the old, removed invariant; flipped it to assert rejection. - gating.py: added the one missing docstring (nested `identity` helper) that was failing the package's 100% interrogate gate, unrelated to but blocking the same reviewer-ci check. - test_no_heuristic_gateway_policy.py: removed a redundant local `import noema_reviewer.config as config_module` that duplicated the file's existing top-level import; use inspect.getmodule(resolve_config) instead (quality nit, no behavior change). Also fixes two stale `verify` (vitest) fixtures on the same head: - orchestrator-gateway-contract.test.ts: commit 857b76a added requirePublicRepositoryForOpenCode(), which now requires GITHUB_EVENT_PATH whenever --write-opencode-config is passed. The "prints the gateway identity after a successful CLI preflight" test never supplied it, so the success-path assertions failed closed (status 1) instead of succeeding. Added a public-visibility event-file fixture, matching the pattern already used in opencode-private-visibility-boundary.test.ts. - no-heuristic-workflow-authority.test.ts: the "derives request privacy from live repository visibility" test asserted the hourly workflow should carry the same gh-api/NOEMA_LLM_ZDR_ONLY pattern as central-review.yml. That pattern is specific to the PydanticAI reviewer's proved request-level zdr_only transport; OpenCode has no such transport (per verify-orchestrator-gateway.mjs's own docstring) and instead fails closed by refusing to run entirely for non-public repositories, via requirePublicRepositoryForOpenCode -- already implemented and covered by opencode-private-visibility-boundary.test.ts. Setting NOEMA_LLM_ZDR_ONLY in the hourly workflow would be an unread, misleading no-op contrary to this PR's own "no invented ... confidence ... policy" principle. Split the test in two: central-review's assertions unchanged, hourly's assertions now check the actual fail-closed wiring instead of the inapplicable flag pattern. Verification (reviewer/, Python 3.11, non-root runner, real CI conditions -- ambient GH_TOKEN unset): 515 passed, 100.00% line+branch coverage, 100.0% docstring coverage. Verification (root, vitest): the 2 previously-reported tests pass; full-suite run confirms 6 other failing files/8 tests are pre-existing and reproduce identically on the unmodified branch (git stash verified), unrelated to this change. tsc --noEmit is clean. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BV96rXhqoR3tYZ9AeAVur4
Reviewer-ci + verify failures on
|
|
Fresh protected-base repair supersedes the stale authority block. Protected |
Signed-off-by: Seongho Bae <me@seonghobae.me>
This reverts commit 876a6fa. Signed-off-by: Seongho Bae <me@seonghobae.me>
|
2026-09-06 KST post-#546 repair finding: protected semantic reviewer truth is now |
Scope and ownership
Noema consumes the governed
orchestrator/freecontract only.ContextualWisdomLab/contextual-orchestratorowns provider/model discovery, routing, provider credentials, retry and failover; this lane retains Noema-owned reviewer/config/privacy/tool/gateway-preflight boundaries without creating local provider authority.Current exact authority — 2026-09-06 KST
Protected Noema is
main@e26d771470a4ece873c367b40b3cd6cb03ac7de3. Ordinary two-parent/non-force restack5de3fcb2a6acd1b8190ffab95f729fc6b160b0a8preserves the 45 branch-owned paths and adopts merged #527 OIDC trust. The cross-lane product-gap baseline remains owned only by #547.Fresh exact-head
patch-validator-image 34026886149, requiredSecurity Scan 34026886190,reviewer-ci 34026886125, andci 34026886147are queued. Predecessor GREEN does not transfer. Keep Draft until unchanged-head terminal gates and zero valid unresolved findings.