Skip to content

fix(jetbrains): recover interrupted backend startup#11802

Merged
marius-kilocode merged 3 commits into
mainfrom
purple-alloy
Jun 29, 2026
Merged

fix(jetbrains): recover interrupted backend startup#11802
marius-kilocode merged 3 commits into
mainfrom
purple-alloy

Conversation

@marius-kilocode

@marius-kilocode marius-kilocode commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

JetBrains backend startup can be interrupted in two ways that previously left user-visible state stale or stuck.

When the startup event stream stalls, the connection layer delegates a full reconnect. The app layer now allows that delegated reconnect while the app is still in Connecting, so startup can recover instead of staying in Connecting until tests or UI waits time out.

When restart or reinstall interrupts in-flight startup REST loading, canceled HTTP calls can still unwind with stale connection failures. The app now respects coroutine cancellation before converting startup load exceptions into app errors, so canceled loads cannot overwrite the restarted backend state.

The app-service tests use one shared startup wait helper with diagnostics instead of scattered short waits, include regression coverage for startup SSE timeout recovery, and the JetBrains agent guidance now documents deterministic integration-test synchronization with centralized timeout watchdogs only when unavoidable.

@kilo-code-bot

kilo-code-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issues Found | Recommendation: Address before merge

Overview

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

WARNING

File Line Issue
packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/app/KiloBackendAppService.kt 281 Removing the Connecting guard lets a stale queued reconnect restart a newer startup attempt.

Fix these issues in Kilo Cloud

Files Reviewed (3 files)
  • .changeset/jetbrains-restart-loading.md - 0 issues
  • packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/app/KiloBackendAppService.kt - 1 issue
  • packages/kilo-jetbrains/backend/src/test/kotlin/ai/kilocode/backend/app/KiloBackendAppServiceTest.kt - 0 issues
Previous Review Summaries (2 snapshots, latest commit 971a418)

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

Previous review (commit 971a418)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • .changeset/jetbrains-restart-loading.md
  • packages/kilo-jetbrains/AGENTS.md
  • packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/app/KiloBackendAppService.kt

Previous review (commit 90dce3c)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • packages/kilo-jetbrains/backend/src/test/kotlin/ai/kilocode/backend/app/KiloBackendAppServiceTest.kt

Reviewed by gpt-5.4-20260305 · Input: 86.1K · Output: 15K · Cached: 684.5K

Review guidance: REVIEW.md from base branch main

@marius-kilocode marius-kilocode changed the title test(jetbrains): harden app service startup waits fix(jetbrains): ignore stale canceled startup failures Jun 29, 2026
@marius-kilocode marius-kilocode requested a review from kirillk June 29, 2026 14:08
@marius-kilocode marius-kilocode changed the title fix(jetbrains): ignore stale canceled startup failures fix(jetbrains): recover interrupted backend startup Jun 29, 2026
@marius-kilocode marius-kilocode merged commit 64af7ff into main Jun 29, 2026
21 checks passed
@marius-kilocode marius-kilocode deleted the purple-alloy branch June 29, 2026 14:37
vkeerthivikram pushed a commit to vkeerthivikram/kilocode that referenced this pull request Jun 30, 2026
fix(jetbrains): ignore stale canceled startup failures
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