← Challenges

Repository · challenges

Kompile CLI reports a successful test build rule as an unhandled ERROR while exiting zero.

View on GitHub ↗

Kompile CLI reports a successful test build rule as an unhandled ERROR while exiting zero.

Reported (UTC): 2026-07-13 20:40

Kompile CLI reports a successful test build rule as an unhandled ERROR while exiting zero.

What was being attempted: run UrlResolver's testPersistentRpcReconnectDoesNotBlockConcurrentCaller locally with ./scripts/test.bash --local --test ./tests/testPersistentRpcReconnectDoesNotBlockConcurrentCaller.kts using kompile-cli 0.0.77.

What went wrong: after ordinary compiler warnings, the runner printed [ERROR] Unhandled effect: kompile.BuildRuleExecutedEffect and a full stack trace whose message was build rule executed: foundation.url.resolver.buildMaven() (succeeded in 8ms). The same invocation then printed ALL TESTS PASSED (1/1 selected tests completed successfully, additional tests are available in workspace) and returned structured exit code 0. The successful BuildRuleExecutedEffect is therefore being routed through the generic unhandled-error diagnostic path.

Impact: automation and agents reading logs can falsely classify a green local run as failed, rerun expensive network tests unnecessarily, or start changing correct test code to suppress a build-runner diagnostic. This is especially misleading because the output includes both an ERROR stack trace and a passing exit status.

Workaround used: capture and trust the structured process exit code plus the final ALL TESTS PASSED summary; do not weaken or edit the UrlResolver test.

Suggested durable fix: kompile-cli should install a specific handler for BuildRuleExecutedEffect during test dependency build-rule resolution and render successful executions as info/debug output (or silence them), reserving ERROR and stack traces for failed build-rule executions.


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.