fix(runner): repair heartbeat.rs after two green branches merged red #61
fix/heartbeat-local-models-arity
into main
main has not compiled its tests since #60 landed on 2026-08-06. My fault — and a shape worth naming, because nothing in the process could have caught it: both branches were green and the merge was broken.
#58 added a wiremock-backed mod tests to heartbeat.rs with eleven callers of local_models(client, url). #60 gave local_models a third parameter — the per-model detail cache that keeps /api/show off every heartbeat — and added a second mod tests for the /api/show parsing. Neither branch could see the other’s, so CI passed on both, and main got:
E0428— the nametestsis defined multiple times- eleven ×
E0061—local_modelstakes 3 arguments but 2 were supplied
Git reported no textual conflict because the two modules were appended at different points in the file. The check job fails in 79s and cancels every other job, so test, clippy, fmt, coverage and all three builds have been reporting cancelled rather than any real signal.
The fix
What the merge should have done: one mod tests, with #60’s parsing tests folded into the module #58 established, and every pre-existing caller given its own empty cache. Those tests exercise what /api/tags reports, not the cache, so a fresh HashMap per call is the honest argument — a shared fixture would couple them for no reason.
No behaviour changes. This is purely the merge resolution that was never performed.
Verified locally
cargo check --all-targets— the job that was failing — cleancargo test— 456 lib + 267 integration, 0 failurescargo clippy --all-targets -- -D warnings— cleancargo fmt --check— clean