Skip to content

fix(code-review): clean up review DOs - #3194

Closed
alex-alecu wants to merge 6 commits into
mainfrom
fix/code-review-do-cleanup
Closed

fix(code-review): clean up review DOs#3194
alex-alecu wants to merge 6 commits into
mainfrom
fix/code-review-do-cleanup

Conversation

@alex-alecu

Copy link
Copy Markdown
Contributor

Why

Some code review jobs could get stuck keeping old storage forever. This made unused data stay around when the review was already done or could no longer make progress.

What changed

Code reviews now keep a future alarm while they are waiting, running, or retrying after a short problem. Queued reviews fail after a safe wait instead of retrying forever. Running reviews check whether the main app already marked them done, and they fail after a long timeout if no final callback arrives. Finished reviews now check that the main app is done too before deleting their stored data.

How to test

  1. Run pnpm --filter kilo-code-review-worker test.
  2. Run pnpm --filter kilo-code-review-worker typecheck.
  3. Start a code review and confirm it moves from queued to running as before.
  4. Trigger the review alarm in a test or dev worker and confirm old queued or running reviews either retry, finish cleanup, or fail with a timeout.

Comment thread services/code-review-infra/src/code-review-orchestrator.ts
Comment thread services/code-review-infra/src/code-review-orchestrator.ts
@kilo-code-bot

kilo-code-bot Bot commented May 12, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Previously Reported Issues

Both warnings from the initial review have been addressed in subsequent commits:

File Line Status
services/code-review-infra/src/code-review-orchestrator.ts 442 ✅ Fixed — 'db-not-found' guard added in handleRunningAlarm; deleteStorage() called immediately
services/code-review-infra/src/code-review-orchestrator.ts 624 ✅ Fixed — updateStatus now propagates 'db-not-found' back to callers
Files Reviewed (3 files, incremental)
  • services/code-review-infra/src/code-review-orchestrator.ts — 0 issues (2 warnings resolved)
  • services/cloud-agent-next/src/session-service.ts — 0 issues
  • services/cloud-agent-next/src/session-service.test.ts — 0 issues

Reviewed by claude-sonnet-4.6 · 1,475,544 tokens

@alex-alecu alex-alecu changed the title fix(code-review): clean up review dos fix(code-review): clean up review DOs May 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This Pull Request has been inactive for 30 days and will be closed in 7 days if no further activity occurs. Please update or close this PR if it is no longer relevant.

@github-actions github-actions Bot added the stale label Jun 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This Pull Request has been closed due to inactivity.

@github-actions github-actions Bot closed this Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant