fix(runner): repair heartbeat.rs after two green branches merged red
`main` has not compiled its tests since #60 landed on 2026-08-06. My fault, and
a shape worth naming: **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` (duplicate module) plus
eleven `E0061`s (wrong arity). Git had no textual conflict to report because the
two modules were appended at different points in the file.
The repair is 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. They are testing what `/api/tags` reports, not
the cache, so a fresh `HashMap` per call is the honest argument rather than a
shared fixture that would couple them.
Nothing about the behaviour changes; this is the merge resolution that was never
performed.
`cargo check --all-targets` (the job that failed), `cargo test` (456 lib + 267
integration), `cargo clippy --all-targets -- -D warnings` and `cargo fmt --check`
all clean.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
SHA:
55b779991adfc48844106650be0fdb5514cf7526
Author:
Cole Christensen <cole.christensen@gmail.com>
Date:
2026-08-08 17:53
Parents:
4719e13
1 files changed
+35
-29
| Type | ||
|---|---|---|
|
|
src/runner/heartbeat.rs | +35 −29 |
|
||