Skip to content

test(jetbrains): stabilize workspace reload lifecycle - #11730

Merged
markijbema merged 5 commits into
mainfrom
mark/fix-jetbrains-workspace-flake
Jun 29, 2026
Merged

test(jetbrains): stabilize workspace reload lifecycle#11730
markijbema merged 5 commits into
mainfrom
mark/fix-jetbrains-workspace-flake

Conversation

@markijbema

Copy link
Copy Markdown
Contributor

What changed

Make KiloBackendWorkspaceTest wait for its coroutine scope to finish during teardown and close the mock server before joining so blocked requests are released. The global.disposed test now subscribes before sending the SSE event, waits for the next Ready state instead of accepting the existing one after an arbitrary delay, and verifies that reload replaced the cached workspace.

Why

The failed job timed out while setting up this test after the preceding concurrent-reload test. Teardown cancelled asynchronous work without joining it, allowing request and watcher jobs to outlive their test fixture. The disposed-event assertion also treated the pre-event Ready state as proof that reload finished. Causal event synchronization and complete fixture cleanup remove both races without extending normal test waits.

Investigated failure: https://github.com/Kilo-Org/kilocode/actions/runs/28236011741/job/83650998502?pr=11726

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@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 (1 files)
  • packages/kilo-jetbrains/backend/src/test/kotlin/ai/kilocode/backend/testing/MockCliServer.kt
Previous Review Summaries (4 snapshots, latest commit 3ae6d2b)

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

Previous review (commit 3ae6d2b)

Status: No Issues Found | Recommendation: Merge

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

Previous review (commit 4e2fb78)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • packages/kilo-jetbrains/backend/src/test/kotlin/ai/kilocode/backend/testing/MockCliServer.kt
  • packages/kilo-jetbrains/backend/src/test/kotlin/ai/kilocode/backend/workspace/KiloBackendWorkspaceTest.kt

Previous review (commit f6ca368)

Status: No Issues Found | Recommendation: Merge

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

Previous review (commit 90b6b2e)

Status: No Issues Found | Recommendation: Merge

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

Reviewed by gpt-5.4-20260305 · Input: 55.9K · Output: 4.9K · Cached: 184.8K

Review guidance: REVIEW.md from base branch main

markijbema and others added 4 commits June 26, 2026 12:11
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@markijbema
markijbema enabled auto-merge June 29, 2026 08:19
@markijbema
markijbema merged commit 2fc5df7 into main Jun 29, 2026
20 checks passed
@markijbema
markijbema deleted the mark/fix-jetbrains-workspace-flake branch June 29, 2026 08:34
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…rkspace-flake

test(jetbrains): stabilize workspace reload lifecycle
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