🐛 fix(ci): apply all 10 coderabbit findings from #29 - #30
Conversation
Warning Review limit reached
Next review available in:32 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe changes harden remote model configuration downloads and lookup errors. Issue and PR workflows now restrict retry routing, support multiple event shapes, report model-resolution failures, and stop before OpenCode runs. ChangesModel resolution and workflow failure handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant Workflow
participant resolve-model.sh
participant GitHub
participant OpenCode
Workflow->>resolve-model.sh: resolve model configuration
resolve-model.sh-->>Workflow: model or status 4
Workflow->>GitHub: post failure comment and negative reaction
Workflow-->>OpenCode: stop before invocation
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/scripts/resolve-model.sh:
- Around line 75-82: Update the Python resolver around the workflow/job lookup
and entry output to validate that workflow and job mappings are objects, while
preserving an absent job mapping as an unresolved result. Within the existing
try block, also validate any present go and free values are strings; malformed
mappings or tier values must raise the existing configuration error path and
exit with status 4 before printing model outputs.
In @.github/workflows/opencode-issue-handler.yml:
- Around line 59-67: Paginate each retry-history query with gh api --paginate
and flatten the returned page arrays before applying the existing authorization,
retry-exclusion, and final-comment selection logic. Apply this to
.github/workflows/opencode-issue-handler.yml lines 59-67,
.github/workflows/opencode-pr-comment.yml lines 64-71, and
.github/workflows/opencode-pr-comment.yml lines 430-439; all three sites require
the same change.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1b65f6fa-d302-4996-b9fb-0913b9e90abd
📒 Files selected for processing (4)
.github/scripts/resolve-model.sh.github/workflows/opencode-issue-handler.yml.github/workflows/opencode-pr-comment.yml.github/workflows/opencode-pr-review.yml
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Implements all 10 findings from issue #29 (Coderabbit review), keeping changes minimal and preserving existing behavior.
Findings fixed
PREV_BODYcould inject newlines/::into workflow commandsPREV_BODY_SAFE(tr '\n' ' ') before::notice::/oc(review) routed to process-2 instead of process-3process-3retry-parse.TIER || parse.TIERpull_request.numberunavailable onissue_commenteventsissue.number || pull_request.numberin prompts,gh pr checkout, and contextif: is_bot_thread == 'true'author_associationOWNER/MEMBER/COLLABORATOR) added to all 3 retry queriesif: pr-check.skip != 'true'.tmp+ atomicmv(cleanup on failure)sys.exit(4)+::error::for invalid/unreadable config; exit 3 for missing entrycontinue-on-erroron resolve + "Resolve model failure feedback" step (comment + -1 reaction +exit 1) in all 5 process jobsValidation
mise run lint-yaml— passedmise run lint-shell— passedbash -n .github/scripts/auth.sh .github/scripts/resolve-model.sh— passedTest plan
Manual runs of
/oc,/ocf,/oc retry,/ocf retry,/oc implement,/ocf implement,/oc taskin downstream repos to confirm routing, tier, and PR-number resolution behave as before.Summary by CodeRabbit
Bug Fixes
User Experience