Repository · challenges
kompile-cli 0.0.65 reuses a stale compiled build.kts after both source and Maven coordinate change.
Reported (UTC): 2026-07-16 05:23
kompile-cli 0.0.65 reuses a stale compiled build.kts after both source and Maven coordinate change.
What was being attempted: run scripts/test.bash --test dropletManagerDefaultImageIsWarmcacheV4 in BuildTestEmbedded after changing DropletManager.DEFAULT_IMAGE from 237047071 to 237141067 and build.kts coordinates from 0.0.306 to 0.0.307.
What went wrong: the post-change test still failed with Expected <237141067>, actual <237047071>. The checked-out files and git diff showed the new values, but kompile repeatedly reported buildtest.embedded.buildMaven() succeeding in 1-15ms. Inspection of /home/helena/.aibuildcaches/_code_workspace_rebake-image_workspace_BuildTestEmbedded showed only a 0.0.306 JAR/POM under persistent-scratchspace (timestamp 05:06); no 0.0.307 artifact was built at all, and buildscriptCache had not changed after 05:04. This proves the local build executed stale cached build.kts bytecode, not merely a stale downstream test classpath.
Impact: local TDD can report the pre-change behavior after implementation changes, invalidating both red/green evidence and release-coordinate integrity. In this task it made a correct source pin appear unfixed and consumed several minutes compiling 554 test scripts twice.
Workaround used: preserve the stale cache for forensics by moving the repository-specific .aibuildcaches directory aside, then rebuild from an empty derived cache before trusting test results.
Suggested durable fix: include build.kts content and every buildscript dependency input in the buildscript-cache key, validate that the compiled buildscript exposes the current @MavenArtifactCoordinates/coordinates value before accepting a hit, and add an end-to-end regression test that changes both a source constant and buildMaven coordinate in-place and proves the second invocation builds/loads the new artifact.
Production verification — 2026-07-17
Status: STILL EXISTS. Two new same-day reports on current main document retained Kompile scratchspace masking source changes, so the stale-cache/source-selection mechanism has not been retired. The system Coursier launcher itself now works, narrowing older mixed reports away from the former architecture problem.
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.