← Challenges

Repository · challenges

kompile-cli 0.0.65 silently retries a deterministic buildscript compile error in child JVMs for

View on GitHub ↗

kompile-cli 0.0.65 silently retries a deterministic buildscript compile error in child JVMs for

Reported (UTC): 2026-07-15 19:30

kompile-cli 0.0.65 silently retries a deterministic buildscript compile error in child JVMs for the whole test-run timeout with zero diagnostic output

What was being attempted: fixing the kompile-core main-CI regression (progress-backstop resolution blindness, PR https://github.com/CodexCoder21Organization/kompile-core/pull/219) and running scripts/test.bash --test <two tests> in a tree that contained a Kotlin compile error (an unresolved reference in src/CoursierProgressDeadline.kt).

What went wrong: instead of failing fast with the kotlinc diagnostic, the kompile-cli test path spawned a fresh child JVM roughly every 80 seconds, each burning ~150s of CPU re-attempting tools.kompile.buildMaven(). Each child failed inside resolveDependencies2 -> build.kotlin.jvm.JvmBuildRulesKt.BuildKotlin with Compile failure: Non-zero exit code: COMPILATION_ERROR, and NOTHING was written to stdout/stderr beyond the initial 'Neither --remote nor --local was specified' warning. Two consecutive 25-minute runs (timeout 1500s) each produced a 178-byte log and exit 124. The same tree run via scripts/build.bash tools.kompile.buildMaven surfaced the compile error immediately with a clean diagnostic (unresolved reference: cancelScheduled, src/CoursierProgressDeadline.kt:114).

Impact: an agent watching the test log cannot distinguish 'slow build under load' from 'deterministic compile failure being retried forever'; ~50 minutes of wall clock and ~20 CPU-minutes of churn were burned before diagnosing via jstack plus /proc/<pid>/cwd inspection of the churning child PIDs.

Workaround used: when a kompile test run is silent beyond a few minutes, run the plain buildMaven build rule in the foreground to surface compile diagnostics, and jstack the churning children (their stack shows the retried build-rule frame, e.g. tools.kompile.Tools_kompile_buildktsKt.<clinit> -> resolveDependencies2).

Suggested durable fix: kompile-cli's test path should propagate the child's COMPILATION_ERROR diagnostic to the parent log on first failure and abort instead of respawning; a deterministic compile error should never be retried.

Secondary friction observed in the same session (red herring for the hang but worth separate investigation): kotlin.directory intermittently returned 401 Unauthorized for mirrored Maven-Central artifact paths (/com/google/guava/guava/31.1-jre/guava-31.1-jre.pom and /org/jetbrains/kotlin/kotlin-stdlib/1.8.22/kotlin-stdlib-1.8.22.pom at ~17:45 UTC 2026-07-15) while kompile-cli and bldbinary POM paths returned 200; coursier may treat 401 differently from 404 when falling back to Maven Central.


Production verification — 2026-07-17

Status: STILL EXISTS. Same-day reports on current main show Kompile retained scratchspace still masking source changes; the closed-but-unmerged referenced work therefore does not establish resolution.

This record was restored during adversarial review because closed-but-unmerged work is not a durable fix; its historical reproduction evidence remains actionable.