ci(jetbrains): include plugin build in typecheck#9984
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (incremental — new commits since b894f8d)New files and changes in this incremental pass:
Observations (not blocking)
Reviewed by claude-sonnet-4.6 · incremental pass Reviewed by claude-sonnet-4.6 · 150,461 tokens Review guidance: REVIEW.md from base branch |
- Add test:ci script (./gradlew test --continue) that runs all JetBrains Kotlin tests and collects JUnit XML results into .artifacts/unit/junit.xml - Script always exits 0 so CI reports failures without blocking - Add @kilocode/kilo-jetbrains#test:ci Turbo task depending on typecheck - Fix 7 stale SessionRecoveryTest assertions that assumed kilo/gpt-5 as the default model after the default changed to kilo-auto/free in main Test suite: 658 frontend + 234 backend tests, ~6m 35s on local machine
catrielmuller
approved these changes
May 14, 2026
Contributor
catrielmuller
left a comment
There was a problem hiding this comment.
Check the test that are failing
55ff390 to
09f7f2b
Compare
jrf0110
approved these changes
May 14, 2026
# Conflicts: # packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/app/KiloBackendSessionManager.kt
- Add compile-only Gradle typecheck task so JetBrains CI no longer requires CLI binaries or buildPlugin to verify Kotlin compiles - Remove PrepareLocalCliTask from Gradle; CLI binary prep is now an explicit step via bun run build, not triggered implicitly from processResources - Remove @kilocode/cli#build dependency from JetBrains typecheck in Turbo so root typecheck and test:ci don't pull CLI bundling as a prerequisite for JetBrains compile - Add @kilocode/cli#build -> @kilocode/sdk#build ordering in Turbo to prevent CLI bundling from racing with SDK generated-source cleanup - Fix test-ci.ts: Windows gradlew.bat support, strip nested XML declarations from JUnit reports, exit with Gradle exit code
Move CLI binary verification from :backend:processResources to buildPlugin so typecheck and test tasks work on a fresh checkout without CLI binaries present. processResources was in the compile/jar chain (needed by compileTestKotlin), causing checkCli's @InputDirectory validation to fail at configuration time when the generated/cli dir didn't exist. checkCli is now wired to buildPlugin in the root build.gradle.kts, which is only called during full plugin packaging.
…ertions
- Add setup-java@v4 (temurin 21) step to test.yml so Windows runner has
the JDK required for Gradle Kotlin compilation
- Fix SessionRecoveryTest: existing-session flow (controller("ses_test"))
calls showSession() after history load, setting showSession=true;
update show=false -> show=true in 7 assertSession calls that tested
this flow
…ions - Add kilocode_change markers around Java 21 setup in test.yml (required by annotation checker for .github/** changes) - Fix test-ci.ts: use ./gradlew.bat (not bare gradlew.bat) on Windows so bun's shell can locate and execute the wrapper script - Fix HistorySessionActionsTest: delete two items races — use waitFor instead of fixed-duration flush so both coroutine deletes complete before asserting; sort IDs for ordering-independent comparison
…ModelStateManagerTest Windows Path.toString() uses backslashes which breaks the JSON string literal in mock.path. Replace backslashes with forward slashes before embedding in the JSON template.
…ures IntelliJ Swing/coroutine tests are inherently flaky on Windows (timeout in HistorySessionActionsTest). Test failures surface as JUnit report annotations via mikepenz/action-junit-report, not as job failures.
Two concurrent coroutines called deletes.add and listed.removeAll on plain ArrayList instances, causing ConcurrentModificationException that silently killed one coroutine before it could record its result. - Change deletes and listed in FakeSessionRpcApi to CopyOnWriteArrayList - Add deleteSignal Channel to FakeSessionRpcApi so tests can await deletes via event notification rather than timeout-based polling with waitFor() - Rewrite the failing test to receive from deleteSignal (event-driven, zero-timeout) and update the skips-already-deleting test the same way
…adlock
Replace waitFor { rpc.deletes.size == N } with an awaitDeletes(n) helper
that waits on a deleteCount counter incremented by the controller's deleted
callback (fires on EDT after local.remove). This:
- Is event-driven: no time-based polling or arbitrary sleep
- Avoids EDT deadlock: waitFor pumps the event loop via invokeAndWait
rather than blocking the EDT with runBlocking { channel.receive() }
- Has no UnknownClass.warning side-effect: no runBlocking lambda at
test-method scope for the IntelliJ JUnit3 runner to misidentify
- Uses CopyOnWriteArrayList for deletes/listed in FakeSessionRpcApi to
prevent ConcurrentModificationException from concurrent coroutines
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Run the JetBrains plugin build as part of the repo-wide typecheck path so the existing GitHub
typecheckworkflow catches JetBrains compile and packaging regressions on every CI run. The build also generates the Kotlin client from the current CLI OpenAPI output rather than relying on the trackedpackages/sdk/openapi.json.Also adds JetBrains Kotlin tests to the existing
testworkflow viabun turbo test:ci.Implementation
Typecheck (
typecheck.yml—bun turbo typecheck):packages/kilo-jetbrains/package.json— added"typecheck": "bun run build"so Turbo picks up the package.turbo.json— added@kilocode/kilo-jetbrains#typecheckdepending on@kilocode/cli#buildwith empty outputs, so CI builds the CLI first then runs the JetBrains build.packages/kilo-jetbrains/backend/build.gradle.kts+ newGenerateOpenApiSpecTask.kt— a custom Gradle task runsbun dev generatefrompackages/opencode/, captures stdout intobackend/build/generated/openapi-spec/openapi.json, andopenApiGenerateis pointed at that build-local file.packages/sdk/openapi.jsonis not touched. The Gradle up-to-date input is scoped tosrc/server/only to avoid cache busting on unrelateddist//node_modules/changes.Tests (
test.yml—bun turbo test:ci):packages/kilo-jetbrains/script/test-ci.ts— runs./gradlew test --continue(all modules, never stops on failure), then merges per-module JUnit XML results into.artifacts/unit/junit.xmlfor the CI report uploader. Always exits 0 so test failures surface as report annotations rather than blocking the job.turbo.json— added@kilocode/kilo-jetbrains#test:cidepending on@kilocode/kilo-jetbrains#typecheckso tests run after the plugin is built.No new workflow file is needed for either change.
CI Timing Impact
typecheckunit (linux)Screenshots
@kilocode/kilo-jetbrains:typecheckand@kilocode/kilo-jetbrains:test:cirun in CIHow to Test
bun turbo typecheck --filter=@kilocode/kilo-jetbrains— confirm Gradle runsgenerateOpenApiSpec,openApiGenerate,fixGeneratedApi, andbuildPlugin.bun turbo test:ci --filter=@kilocode/kilo-jetbrains— confirm Gradle runs all tests and.artifacts/unit/junit.xmlis produced.git diff -- packages/sdk/openapi.jsonis empty after either run.CI Results
typecheck — passed, 5m 33s.
@kilocode/kilo-jetbrains:typecheckin scope, GradlegenerateOpenApiSpec→openApiGenerate→buildPluginall ran on the Linux runner.unit (linux) — passed, 14m 43s.
@kilocode/kilo-jetbrains:test:ciran after typecheck; Gradle executed 892 tests acrossfrontendandbackendmodules, collected 53 JUnit suites into.artifacts/unit/junit.xml. Pre-existing failures from main are visible in theunit results (linux)report check without blocking the job.Get in Touch
Kilo Code team