Skip to content

feat(code-reviews): add manual jobs#4273

Merged
alex-alecu merged 17 commits into
mainfrom
chore/local-testing-code-reviews
Jun 30, 2026
Merged

feat(code-reviews): add manual jobs#4273
alex-alecu merged 17 commits into
mainfrom
chore/local-testing-code-reviews

Conversation

@alex-alecu

@alex-alecu alex-alecu commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Manual Code Reviewer jobs can now be started from the Jobs card for personal users and organizations. In normal environments, jobs use the connected GitHub or GitLab account and post results back to the change. In local development, jobs can review public GitHub and GitLab changes without provider credentials and show the result in Kilo only.

Verification

  1. In local development, enable the dev UI, open Code Reviewer, start a job from a public GitHub or GitLab URL, and confirm the result appears in Kilo without provider comments.
  2. With a connected GitHub or GitLab account, start a manual job from the Jobs card and confirm the review posts back to the change.
  3. Retry or cancel a local manual job and confirm it stays read-only and never gains provider credentials.

Visual Changes

Screen.Recording.2026-06-30.at.10.33.48.mov

Reviewer Notes

Manual jobs store their model, effort, instructions, and output mode on the job so retries keep the same behavior. Local jobs are intentionally limited to explicit local development and public github.com or gitlab.com changes.

Comment thread packages/db/src/migrations/0174_brainy_vapor.sql Outdated
@kilo-code-bot

kilo-code-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (7 files)
  • apps/web/src/components/code-reviews/CodeReviewJobsCard.tsx
  • apps/web/src/lib/code-reviews/triggers/prepare-review-payload.test.ts
  • services/cloud-agent-next/src/persistence/CloudAgentSession.ts
  • services/cloud-agent-next/src/persistence/schemas.ts
  • services/cloud-agent-next/src/persistence/session-metadata.test.ts
  • services/cloud-agent-next/src/persistence/session-metadata.ts
  • services/cloud-agent-next/test/integration/session/start-execution-v2.test.ts
Previous Review Summaries (7 snapshots, latest commit 8960ed6)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 8960ed6)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • services/cloud-agent-next/src/persistence/schemas.ts
  • services/cloud-agent-next/src/persistence/session-metadata.test.ts
  • services/cloud-agent-next/src/router/schemas.test.ts

Previous review (commit 6713b63)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • apps/web/src/lib/integrations/platforms/github/webhook-handlers/pull-request-handler.test.ts
  • apps/web/src/lib/integrations/platforms/gitlab/webhook-handlers/merge-request-handler.test.ts

Previous review (commit c607251)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • packages/db/src/migrations/0174_smiling_shadow_king.sql

Previous review (commit 2d69d5c)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • packages/db/src/migrations/0174_smiling_shadow_king.sql

Previous review (commit 5cbfe46)

Status: 1 Issue Found | Recommendation: Address before merge

Fix these issues in Kilo Cloud

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/db/src/migrations/0174_smiling_shadow_king.sql 3 Committing before the replacement unique indexes finish opens a duplicate window
Files Reviewed (9 files)
  • apps/web/src/components/code-reviews/CodeReviewJobsCard.tsx - 0 issues
  • apps/web/src/lib/code-reviews/db/code-reviews.test.ts - 0 issues
  • apps/web/src/lib/code-reviews/db/code-reviews.ts - 0 issues
  • apps/web/src/lib/code-reviews/manual-code-review-jobs.ts - 0 issues
  • apps/web/src/routers/code-reviews-router.test.ts - 0 issues
  • packages/db/src/migrations/0174_smiling_shadow_king.sql - 1 issue
  • packages/db/src/migrations/meta/0174_snapshot.json - 0 issues
  • packages/db/src/migrations/meta/_journal.json - 0 issues
  • packages/db/src/schema.ts - 0 issues

Previous review (commit caeef16)

Status: 1 Issue Found | Recommendation: Address before merge

Fix these issues in Kilo Cloud

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/db/src/migrations/0174_high_the_spike.sql 3 Committing before the replacement unique indexes finish opens a duplicate window
Files Reviewed (5 files)
  • packages/db/src/migrations/0174_brainy_vapor.sql - 0 issues
  • packages/db/src/migrations/0174_high_the_spike.sql - 1 issue
  • packages/db/src/migrations/meta/0174_snapshot.json - 0 issues
  • packages/db/src/migrations/meta/_journal.json - 0 issues
  • packages/db/src/schema.ts - 0 issues

Previous review (commit 72fcba5)

Status: 2 Issues Found | Recommendation: Address before merge

Fix these issues in Kilo Cloud

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
apps/web/src/routers/organizations/organization-code-reviews-router.ts 78 Manual review creation skips organization billing enforcement
packages/db/src/migrations/0174_brainy_vapor.sql 3 Non-concurrent indexes will block writes on a hot table
Files Reviewed (31 files)
  • apps/web/src/app/(app)/code-reviews/ReviewAgentPageClient.tsx - 0 issues
  • apps/web/src/app/(app)/code-reviews/page.tsx - 0 issues
  • apps/web/src/app/(app)/organizations/[id]/code-reviews/ReviewAgentPageClient.tsx - 0 issues
  • apps/web/src/app/(app)/organizations/[id]/code-reviews/page.tsx - 0 issues
  • apps/web/src/app/api/internal/code-review-status/[reviewId]/route.test.ts - 0 issues
  • apps/web/src/app/api/internal/code-review-status/[reviewId]/route.ts - 0 issues
  • apps/web/src/components/code-reviews/CodeReviewJobsCard.tsx - 0 issues
  • apps/web/src/components/code-reviews/CodeReviewStreamView.tsx - 0 issues
  • apps/web/src/lib/code-reviews/core/schemas.ts - 0 issues
  • apps/web/src/lib/code-reviews/db/code-reviews.test.ts - 0 issues
  • apps/web/src/lib/code-reviews/db/code-reviews.ts - 0 issues
  • apps/web/src/lib/code-reviews/dispatch/dispatch-pending-reviews.test.ts - 0 issues
  • apps/web/src/lib/code-reviews/dispatch/dispatch-pending-reviews.ts - 0 issues
  • apps/web/src/lib/code-reviews/manual-code-review-jobs.ts - 0 issues
  • apps/web/src/lib/code-reviews/manual-config.ts - 0 issues
  • apps/web/src/lib/code-reviews/prompts/generate-prompt.ts - 0 issues
  • apps/web/src/lib/code-reviews/session-log.ts - 0 issues
  • apps/web/src/lib/code-reviews/triggers/prepare-review-payload.test.ts - 0 issues
  • apps/web/src/lib/code-reviews/triggers/prepare-review-payload.ts - 0 issues
  • apps/web/src/lib/config.server.ts - 0 issues
  • apps/web/src/lib/integrations/platforms/github/webhook-handlers/pull-request-handler.ts - 0 issues
  • apps/web/src/lib/integrations/platforms/gitlab/adapter.ts - 0 issues
  • apps/web/src/lib/integrations/platforms/gitlab/webhook-handlers/merge-request-handler.ts - 0 issues
  • apps/web/src/routers/code-reviews-router.ts - 0 issues
  • apps/web/src/routers/code-reviews/code-reviews-router.ts - 0 issues
  • apps/web/src/routers/organizations/organization-code-reviews-router.ts - 1 issue
  • packages/db/src/migrations/0174_brainy_vapor.sql - 1 issue
  • packages/db/src/migrations/meta/0174_snapshot.json - 0 issues
  • packages/db/src/migrations/meta/_journal.json - 0 issues
  • packages/db/src/schema-types.ts - 0 issues
  • packages/db/src/schema.ts - 0 issues

Reviewed by gpt-5.4-2026-03-05 · Input: 95.3K · Output: 15.1K · Cached: 795.1K

Review guidance: REVIEW.md from base branch main

Comment thread packages/db/src/migrations/0174_brainy_vapor.sql Outdated
Comment thread packages/db/src/migrations/0175_spooky_unus.sql
…ode-reviews

# Conflicts:
#	apps/web/src/components/code-reviews/CodeReviewStreamView.tsx
A stored v2 repository with an unknown type (e.g. legacy/E2E
"empty-local" placeholders) or no repo/url identity fell through
normalization unchanged and failed the discriminated union, throwing
inside getMetadata(). That crashed every alarm/reaper cycle since
cleanupIdleKiloServer reads metadata without needing the repository.

Treat an unresolvable v2 repository as no repository instead of failing
the whole metadata read; known-type repositories still validate strictly
so genuine corruption is still surfaced. Self-heals on the next write.
@alex-alecu alex-alecu merged commit a5c8ca6 into main Jun 30, 2026
62 checks passed
@alex-alecu alex-alecu deleted the chore/local-testing-code-reviews branch June 30, 2026 08:08
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