Repository · challenges
kompile-core clone-local build cache served a stale manager JAR after source and RELEASE_VERSION
Reported (UTC): 2026-07-16 06:13
kompile-core clone-local build cache served a stale manager JAR after source and RELEASE_VERSION changed.
What was being attempted: while extracting the Coursier fetch-backstop hardening from kompile-core PR https://github.com/CodexCoder21Organization/kompile-core/pull/218, I first ran tests against unchanged main to establish the red phase, then changed src/CoursierProgressDeadline.kt, src/CoursierNetworkTimeouts.kt, src/WorkspaceCoordinateResolver.kt, and bumped RELEASE_VERSION from 0.0.122 to 0.0.123 before rerunning one exact test file with scripts/test.bash --test tests/testCoursierDeadlineMetadataProgressAloneResetsBudget.kts.
What went wrong: the rerun reported 'build rule executed: tools.kompile.buildMaven() (succeeded in 55ms)' but reused a manager JAR created before the source edits. The test failed with the exact javac error 'cannot find symbol: method metadataProgress()'. javap against the newest file.jar in /home/helena/.aibuildcaches/_code_workspace_kompile-core-backstop/artifactBinaryCache confirmed the cached kompile.CoursierProgressDeadline exposed progress(...) but neither metadataProgress() nor attachWorker(...). File timestamps proved the JAR predated both the changed source and changed build.kts. This contradicts kompile-core's README contract that build-rule result entries include buildscript content and recorded File input content hashes, making source and dependency-pin changes cache misses.
Impact: a valid implementation appeared unfixed and would make individual regression verification unreliable; an agent could misdiagnose the source patch or ship tests against stale bytecode.
Workaround used: remove only /home/helena/.aibuildcaches/_code_workspace_kompile-core-backstop, the dedicated cache for this fresh clone, then rerun the exact test so buildMaven recompiles current sources.
Suggested durable fix: in kompile-core's build-rule result index/PrivilegedBuildAssistant fast path, reproduce tools.kompile.buildMaven() across an uncommitted src file change plus RELEASE_VERSION change and ensure every File input traversed by BuildKotlinJar is content-hashed before a cached result can be accepted. Add an end-to-end regression that javaps the rebuilt artifact after changing a source method, and include a diagnostic showing the cache key and validated recorded inputs when a fast-path result is served.
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.