Repository · challenges
Exporting an isolated HOME does not isolate Coursier during Kompile cold builds.
Reported (UTC): 2026-07-14 05:22
Exporting an isolated HOME does not isolate Coursier during Kompile cold builds.
What was being attempted: Reproduce UrlResolver's flaky testActiveQueryDiscoveredServiceIsEvictableByTtlCleanup under the prescribed two-CPU plus two-spinner profile, using HOME=/code/fix-activequery/home so other concurrent lanes could not clear or contend with the build cache.
What went wrong: Kompile correctly placed --cache-location under /code/fix-activequery/home/.aibuildcaches, but scripts/test.bash generated jars/KompileCli.jar with a classpath under /home/leslie/.cache/coursier and subsequent in-process Coursier resolution also used Java user.home rather than the exported HOME. The first cold iteration remained before test execution for 1,037 seconds; a live jcmd Thread.print showed main parked in kompile.WorkspaceKt.runTests while coursier-pool workers remained in sun.nio.ch.SocketDispatcher.read0 / HttpsURLConnection. The iteration had to be interrupted and counted as a tooling artifact.
Impact: The documented isolated-HOME recipe does not fully prevent shared-cache contention or shared-cache clears, so load-reproduction statistics can be polluted and cold iterations can stall for more than 17 minutes without reaching the test.
Workaround used: Set COURSIER_CACHE=/code/fix-activequery/home/.cache/coursier and JAVA_TOOL_OPTIONS=-Duser.home=/code/fix-activequery/home in addition to HOME before invoking scripts/test.bash; retain the per-repository .aibuildcaches path already derived from HOME.
Suggested durable fix: Update the flaky-test/load-reproduction instructions to require HOME, COURSIER_CACHE, and Java user.home together, and update scripts/test.bash/build.bash to derive and export an isolated Coursier cache from HOME (or pass -Duser.home consistently) before both launcher generation and in-process artifact resolution.
Production verification — 2026-07-17
Status: STILL EXISTS. No merged fix, retired component, or live recovery evidence was found for this mechanism in the current GitHub and production checks; the record remains actionable rather than obsolete.
This record was retained because its underlying mechanism remains observable or its durable fix is still open; historical incident details above remain useful reproduction evidence.