fix(hourly-loop): route OpenCode hourly maintenance agent to orchestrator/free - #1013
fix(hourly-loop): route OpenCode hourly maintenance agent to orchestrator/free#1013seonghobae wants to merge 3 commits into
Conversation
…ator/free The hourly self-referential dev loop (cron 23 * * * *) requested orchestrator/auto in both the generated opencode.json and the `opencode run --model` CLI argument, admitting priced fallback routes. ADR-0003 already moved every ContextualWisdomLab/.github central review path (OpenCode, Noema, Strix) off orchestrator/auto and onto the fail-closed zero-cost orchestrator/free pool; this loop was out of that ADR's stated scope and was missed. Switch both call sites to orchestrator/free so no scheduled agent run in this repository can incur a paid model cost, and update the pinned workflow contract test to match. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 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 |
|
@coderabbitai review Please review the current exact head |
|
Current merge blocker is not a demonstrated defect in this two-file diff; it is missing exact-head required evidence. Fresh repository-wide Actions sampling shows the same GitHub-hosted queue starvation on unrelated heads ( The organization owner path is existing |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
requested_head='0a800f87c6df8bb310e1a09859f44d5451fcc969'
echo '== Checked-out commit =='
git rev-parse HEAD
git show -s --format='commit=%H%nparents=%P%nsubject=%s' HEAD
if [[ "$(git rev-parse HEAD)" != "$requested_head" ]]; then
echo "ERROR: expected ${requested_head}" >&2
exit 2
fi
echo
echo '== Changed files against first parent =='
git diff --name-status HEAD^ HEAD
echo
echo '== Complete diff =='
git diff --no-ext-diff --unified=80 HEAD^ HEAD -- \
.github/workflows/opencode-hourly-loop.yml \
tests/test_hourly_opencode_loop_contract.py
echo
echo '== Workflow structure =='
ast-grep outline .github/workflows/opencode-hourly-loop.yml --items all || true
echo
echo '== Contract-test structure =='
ast-grep outline tests/test_hourly_opencode_loop_contract.py --items all || true
echo
echo '== Direct model-pool and workflow references =='
rg -n -C 4 \
-e 'contextual_orchestrator_gateway/orchestrator/(auto|free)' \
-e 'opencode-hourly-loop\.yml' \
.github testsLength of output: 12959
I found one regression-test gap.
Add an assertion for the provider model key, for example: assert '"orchestrator/free": { "name": "fail-closed zero-cost orchestration" }' in workflowThe workflow changes correctly update both fully qualified model requests to
|
Ports #1006's decision record onto this branch's already-corrected fix (the removed job-level model deadline and orchestrator/free pin) so the two overlapping PRs converge on one canonical successor instead of duplicating the same underlying repair: - docs/adr/0007-hourly-loop-orchestrator-free-pool-pin.md: #1006's ADR, carried over unchanged. Its body already reads `Status: Proposed`. - docs/adr/README.md: register the ADR-0007 row as `Proposed`, matching the body -- the Proposed/Accepted mismatch a review comment flagged on #1006 was between an earlier ADR draft and its index row; #1006's current head had already corrected both to `Proposed` before this port, so no repair was needed here beyond carrying the agreement forward. - .github/workflows/opencode-hourly-loop.yml: restore #1006's top-of-file comment block explaining the orchestrator/free vs. auto-discovery distinction and pointing at ADR-0007, plus a note on the no-job-deadline policy this PR already implements. - tests/test_hourly_opencode_loop_contract.py: port #1006's ADR-content test, and add a new test_adr_0007_body_and_index_status_agree_and_stay_proposed_while_open acceptance-criteria test that parses both the ADR body `Status:` line and the docs/adr/README.md index row and fails if they disagree, or if either reads anything but `Proposed` while the decision is open. This is the regression test the review comment asked for so the body/index contradiction it found on #1006 cannot recur silently, here or on any future ADR. #1013 was compared against this diff and #1006's: its only content is the same orchestrator/auto -> orchestrator/free workflow/test edit, already present here and in #1006, with no ADR, no job-deadline fix, and no additional test coverage -- it carries no delta this PR is missing. Verified: tests/test_hourly_opencode_loop_contract.py (4 passed), interrogate 100% on the modified test file, workflow YAML parses. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BV96rXhqoR3tYZ9AeAVur4
|
Reconciling this PR against #1027 and #1006, which overlap on the same I diffed this PR's changes against both: the entire content here — the #1027 now supersedes this PR. I have not closed this PR — per this org's PR-closure discipline, that's for the queue owner to do once #1027 actually merges, not for me to do unilaterally. Generated by Claude Code |
Successor landed — no remaining independent deltaProtected This PR's complete scope—both OpenCode model call sites, the local model catalog key, and the free-pool contract test—is present in that successor. #1027 additionally removes the unsupported elapsed-time cap, adds ADR traceability, and strengthens fail-closed contract coverage. Closure is based on complete successor inheritance, not on treating the change as unnecessary or discarding its delta. |
Summary
Org-wide audit into whether every ContextualWisdomLab GitHub Actions workflow that makes an LLM call routes through contextual-orchestrator's
orchestrator/freepool found that this repository's own hourly maintenance loop (.github/workflows/opencode-hourly-loop.yml,cron: "23 * * * *") was still requestingorchestrator/auto— the paid-inclusive pool — in both:~/.config/opencode/opencode.jsonmodelfield, andopencode run --modelCLI argument.ADR-0003inContextualWisdomLab/.github(docs/adr/0003-contextual-orchestrator-vendored-free-zdr.md) already moved OpenCode, Noema, and (as of its 2026-08-30 amendment) Strix offorchestrator/autoand onto the fail-closed zero-costorchestrator/freepool for the three central review workflows. That ADR's stated scope is explicitly "ContextualWisdomLab/.github central review pipelines" — this repository's own self-referential hourly dev loop was out of scope for that document and was missed. The org owner has since directed that all Actions workflows useorchestrator/free.Change
Two call sites changed from
contextual_orchestrator_gateway/orchestrator/autotocontextual_orchestrator_gateway/orchestrator/free, plus themodelsblock key in the generated config. The sidecar's own auto-discovery (--auto-discover-model-agents) and provider credential wiring are unchanged — this only changes which virtual pool the client requests. Updated the pinned contract test (tests/test_hourly_opencode_loop_contract.py) to match and renamed it to reflect the pool it now asserts.Developer experience
actionlintpasses clean on the changed workflow file.uv run --with pytest pytest tests/test_hourly_opencode_loop_contract.py -qpasses (1 passed). No other test references this workflow file or its prompt.User experience
No user-facing change. Scheduled hourly maintenance runs on this repository can no longer incur a paid-model cost; behavior otherwise unchanged (provider auto-discovery, credential handling, PR queue logic, and the maintenance prompt are untouched).
Test plan
actionlint .github/workflows/opencode-hourly-loop.ymluv run --with pytest pytest tests/test_hourly_opencode_loop_contract.py -q🤖 Generated with Claude Code