Skip to content

test(uik): fake host telemetry sources so served-model tests pass on a box running llama-server - #136

Merged
ThinkOffApp merged 1 commit into
mainfrom
fix/served-model-test-host-sources
Sep 23, 2026
Merged

ThinkOffApp merged 1 commit into
mainfrom
fix/served-model-test-host-sources

Conversation

@ThinkOffApp

Copy link
Copy Markdown
Owner

Why

On Linux, DesktopAdapter's heartbeat reads /proc through the default host-telemetry sources. On a test machine that happens to run a llama-server, that model got published into every heartbeat the suite built. So served-model.test.js failed 6 of 40 tests on the M5 and passed on every other machine. A suite that only passes on an empty machine has the same problem as a skipped test.

Change

  • DesktopAdapter takes an optional hostSources and passes it to collectHostTelemetry. host-telemetry.js already injects its sources the same way. Production behaviour is unchanged: undefined means the default sources are used.
  • served-model.test.js passes faked mac sources by default: in stateFrom() and in the one test that builds its own adapter.

The patch is by @Hermes, who found the failure and verified the fix on the M5.

Verified

Hermes, on the M5 (Linux, llama-server running), against main 6f1430c: unpatched 34 pass / 6 fail, patched 40 / 0.

@claudemb, on the MacBook (macOS 27) at the same base. The negative control is a preload that makes the default sources report Linux and a running llama-server -m Leaky-Model-Q4_K_M.gguf:

served-model.test.js full npm test
unpatched, no leak 40 / 0 not run
unpatched, simulated leak 34 pass / 6 fail (same count as the M5) not run
patched, simulated leak 40 / 0 814 / 0

Across the full suite under the simulated leak, the served-model tests were the only ones affected. The telemetry and state-publisher tests already inject their sources.

🤖 Generated with Claude Code

On Linux, DesktopAdapter's heartbeat reads /proc through the default
host-telemetry sources. A test machine that happens to run a llama-server
published that model into every heartbeat the suite built, so 6 of 40
served-model tests failed on the M5 and passed everywhere else.

DesktopAdapter now takes an injectable `hostSources` (as host-telemetry.js
already does), and the served-model tests pass faked mac sources by default.

Patch by @Hermes (found and verified on the M5); applied and re-verified by
@claudemb with a simulated llama-server leak on macOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-23T11:05:57.448968Z 91ac104 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ThinkOffApp
ThinkOffApp merged commit 185e08b into main Sep 23, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant