mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-10-12 23:37:27 +08:00
The CodeQL Kotlin workflow failed about 40% of the time. Every failure landed in `codeql database run-queries` with "The runner has received a shutdown signal" (or no error at all), because the whole runner VM was running out of memory. CodeQL sized itself for an idle box (CODEQL_RAM: 14575 of 16 GB) while the Gradle daemon (-Xmx4096m) and Kotlin compile daemon from the typecheck build were still resident -- setup-gradle only stops them in its post step, which runs after the analysis. Stop both daemons before the analysis step and cap CodeQL's memory so it leaves headroom for the runner agent and OS. The cleanup step also dumps memory and top-RSS processes, which the failing logs lacked entirely.