fix: report disabled primary accurately - #63
Conversation
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (3)internal/{dialect,engine,crq,gh,state,workspace}/**/*.go📄 CodeRabbit inference engine (AGENTS.md)
Files:
internal/crq/**/*.go📄 CodeRabbit inference engine (AGENTS.md)
Files:
internal/{engine,crq}/**/*.go📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (3)📚 Learning: 2026-07-27T01:11:18.244ZApplied to files:
📚 Learning: 2026-07-27T01:11:20.071ZApplied to files:
📚 Learning: 2026-07-28T06:12:02.107ZApplied to files:
🔇 Additional comments (1)
📝 WalkthroughWalkthroughThe fire decision now identifies disabled primary reviewers separately from unavailable primary reviews. Co-review-only documentation and logs include the decision reason and posted co-reviewers. The engine test verifies the explicit disabled-primary reason. ChangesPrimary-disabled co-review handling
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Poem
🚥 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 |
kristofferR
commented
Aug 1, 2026
@codex review |
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
kristofferR
commented
Aug 1, 2026
@coderabbitai review |
✅ Action performedReview finished.
|
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 `@internal/crq/service.go`:
- Around line 1513-1518: Update the comment for fireCoOnly to explicitly include
primaries unavailable for the current head alongside finished or disabled
primaries, matching the apply-layer behavior described by coAwareDedupe.
Preserve the existing documentation of gating co-reviewers, trigger claims, and
FireSlot handling.
- Line 1664: Update the logging statement in the co-reviewer trigger flow to
derive the listed reviewers from the successfully posted triggers in posts,
rather than all claims in claimed. Preserve the existing log format and
reason/context while ensuring failed postCoTrigger attempts are excluded.
🪄 Autofix (Beta)
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: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 551b6ec9-3ec9-4df7-8271-5dcfa4ccaa1c
📒 Files selected for processing (3)
internal/crq/service.gointernal/engine/engine_test.gointernal/engine/fire.go
📜 Review details
🧰 Additional context used
📓 Path-based instructions (5)
internal/{dialect,engine,crq,gh,state,workspace}/**/*.go
📄 CodeRabbit inference engine (AGENTS.md)
Preserve the dependency direction
dialect ← engine ← crq,state ← crq,gh ← {state, crq}, andworkspace ← crq; packages must not introduce dependency cycles.
Files:
internal/engine/fire.gointernal/crq/service.gointernal/engine/engine_test.go
internal/engine/**/*.go
📄 CodeRabbit inference engine (AGENTS.md)
internal/engine/**/*.go: Keepinternal/enginepure decision logic: pass time explicitly, perform no I/O, and do not depend on context or GitHub transport.DecideFireis the single owner of fire decisions, andCompletionis the single definition of whether a round is done; fire guards must remain consolidated there.
Files:
internal/engine/fire.gointernal/engine/engine_test.go
internal/{engine,crq}/**/*.go
📄 CodeRabbit inference engine (AGENTS.md)
Do not mix GitHub REST quota (
Throttle) with CodeRabbit account quota (AccountQuotaor account-blocked state); the literal phraserate limitis reserved forghanddialect.
Files:
internal/engine/fire.gointernal/crq/service.gointernal/engine/engine_test.go
internal/crq/**/*.go
📄 CodeRabbit inference engine (AGENTS.md)
internal/crq/**/*.go: Keepinternal/crqlimited to orchestration and effects application; CAS state writes andPostIssueCommentbelong in the apply phase, while observation and decisions remain in their designated layers.
KeepDryRunfrom performing apply effects: it must report without writing state or posting issue comments.
Files:
internal/crq/service.go
internal/engine/*_test.go
📄 CodeRabbit inference engine (AGENTS.md)
Table-test convergence and fire rules in
engine_test.go.
Files:
internal/engine/engine_test.go
🧠 Learnings (3)
📚 Learning: 2026-07-27T01:11:18.244Z
Learnt from: kristofferR
Repo: kristofferR/coderabbit-queue PR: 57
File: internal/crq/feedback.go:91-92
Timestamp: 2026-07-27T01:11:18.244Z
Learning: When reviewing code in `internal/crq` that deals with bot configuration, keep the separation of concerns intact: `Config.isConfiguredBot(login)` should only be evaluated against the fleet-wide primary `Config.Bot`. Do not override or reinterpret `Config.Bot` based on repo-specific reviewer/co-reviewer data. If repo-added co-reviewers are involved, they must be handled via repo-derived bot sets (e.g., `Config.evidenceBots()`), and not via `isConfiguredBot`. `Config.ForRepo(...)` should adjust co-reviewer-derived fields like `CoBots`, `RequiredBots`, `Reviewers`, and `FeedbackBots`, but intentionally not change the meaning of `Config.Bot` used by `isConfiguredBot`.
Applied to files:
internal/crq/service.go
📚 Learning: 2026-07-27T01:11:20.071Z
Learnt from: kristofferR
Repo: kristofferR/coderabbit-queue PR: 57
File: internal/crq/repoconfig.go:163-183
Timestamp: 2026-07-27T01:11:20.071Z
Learning: In internal/crq, treat the “observe → decide → apply” effects restriction as applying only to effects produced by review decisions. Explicit operator mutation commands (e.g., Service.SetReviewers, Service.ClearReviewers, enqueue/cancel flows) are allowed to perform state mutations outside the standard apply path, so review logic should not incorrectly require them to follow observe/decide/apply.
For CRQ_DRY_RUN: it should suppress review requests and fire-record writes, but it must not make explicit configuration/mutation commands (e.g., `crq reviewers set`) silently succeed without persisting the requested changes.
Ensure Service.applyFire revalidates repository reviewer overrides just before posting, to protect against stale/changed overrides since earlier reads.
Applied to files:
internal/crq/service.go
📚 Learning: 2026-07-28T06:12:02.107Z
Learnt from: kristofferR
Repo: kristofferR/coderabbit-queue PR: 58
File: internal/crq/service.go:2113-2116
Timestamp: 2026-07-28T06:12:02.107Z
Learning: In the internal/crq package, treat `rate-limit-command` and `gate-repo` as host-local configuration (not fleet-owned settings). `Service.readQuota` may accept a fleet-derived `Config` only to use the fleet-owned `Scope` and `CalibrationTTL`. Ensure the calibration probe command and any gate-repository logic continue to use the host-local service configuration, not the fleet-owned configuration.
Applied to files:
internal/crq/service.go
🔇 Additional comments (2)
internal/engine/fire.go (1)
344-348: LGTM!internal/engine/engine_test.go (1)
1236-1238: LGTM!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
kristofferR
commented
Aug 1, 2026
@coderabbitai review |
kristofferR
commented
Aug 1, 2026
@codex review |
✅ Action performedReview finished.
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
kristofferR
commented
Aug 1, 2026
@coderabbitai review |
✅ Action performedReview finished.
|
Uh oh!
There was an error while loading. Please reload this page.
When a repository disabled its primary reviewer, co-reviewer-only rounds still logged that CodeRabbit had already reviewed the head. That wording repeatedly led agents to infer that CodeRabbit worked on repositories where it was intentionally disabled.
Use the engine decision reason in orchestration logs and distinguish an explicitly disabled primary from a skipped or unavailable review. The primary-off engine test now pins the user-facing reason.
Validated with
go test ./...andgo vet ./.... Local CodeRabbit preflight was attempted but account-rate-limited with no findings.Implementation environment: GPT-5.6 Sol (xhigh) through the Codex harness.
Summary by CodeRabbit