Skip to content

fix(code-review): disable code review when model not allowed#3590

Merged
alex-alecu merged 10 commits into
mainfrom
unsupported-static-ip
May 29, 2026
Merged

fix(code-review): disable code review when model not allowed#3590
alex-alecu merged 10 commits into
mainfrom
unsupported-static-ip

Conversation

@alex-alecu
Copy link
Copy Markdown
Contributor

@alex-alecu alex-alecu commented May 29, 2026

Summary

Followup to #3558

  • Disable Code Reviewer when a review fails because setup needs owner action, including when the selected model is not available for cloud agent sessions.
  • Notify owners once per reason, show a settings alert, mark the current review as action required, and block retries until settings are fixed and Code Reviewer is enabled again.
  • Treat these failures as expected owner-action cases in reporting and alerting instead of system spikes.

Verification

  1. Trigger a Code Reviewer run where the selected model is not available for cloud agent sessions.
  2. Confirm the review ends as action required and the check run says the selected model is unavailable.
  3. Confirm Code Reviewer is disabled, the settings page shows an alert, and retry is blocked until Code Reviewer is enabled again.

Visual Changes

N/A

Reviewer Notes

No DB migration is needed because terminal reasons are stored as text. Keep the terminal reason allowlists in sync if this set changes again.

@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented May 29, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental merge commit resolves conflicts and propagates selected_model_unavailable through all layers (type definitions, SQL expressions, classifier, shared copy, recovery routing) — consistent, correct, and fully covered by new tests.

Files Reviewed (13 files — full PR)
  • apps/web/src/app/api/internal/code-review-status/[reviewId]/route.test.ts
  • apps/web/src/lib/code-reviews/action-required-shared.ts
  • apps/web/src/lib/code-reviews/action-required.test.ts
  • apps/web/src/lib/code-reviews/action-required.ts
  • apps/web/src/lib/code-reviews/alerting/detectors.test.ts
  • apps/web/src/lib/code-reviews/dispatch/dispatch-pending-reviews.test.ts
  • apps/web/src/routers/admin-code-reviews-router.test.ts
  • apps/web/src/routers/admin-code-reviews-router.ts
  • packages/db/src/schema-types.ts
  • packages/worker-utils/src/cloud-agent-next-client.ts
  • services/code-review-infra/src/code-review-orchestrator.ts
  • services/code-review-infra/src/types.ts
  • services/code-review-infra/test/integration/code-review-orchestrator.test.ts

Reviewed by claude-4.6-sonnet-20260217 · 1,170,355 tokens

Review guidance: REVIEW.md from base branch main

@alex-alecu alex-alecu changed the title fix(code-review): disable action-required failures fix(code-review): disable code review when model not allowed May 29, 2026
# Conflicts:
#	apps/web/src/app/api/internal/code-review-status/[reviewId]/route.test.ts
#	apps/web/src/lib/code-reviews/action-required-shared.ts
#	apps/web/src/lib/code-reviews/action-required.test.ts
#	apps/web/src/lib/code-reviews/action-required.ts
#	apps/web/src/lib/code-reviews/alerting/detectors.test.ts
#	apps/web/src/lib/code-reviews/dispatch/dispatch-pending-reviews.test.ts
#	apps/web/src/routers/admin-code-reviews-router.ts
#	packages/db/src/schema-types.ts
#	packages/worker-utils/src/cloud-agent-next-client.ts
#	services/code-review-infra/src/types.ts
@alex-alecu alex-alecu closed this May 29, 2026
@alex-alecu alex-alecu reopened this May 29, 2026
@alex-alecu alex-alecu merged commit 39e1c85 into main May 29, 2026
61 of 69 checks passed
@alex-alecu alex-alecu deleted the unsupported-static-ip branch May 29, 2026 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants