distributed-inference-host tests
Parent: distributed-inference-host
Focused Vitest coverage for the host shim, station transports, pipeline orchestration, carrier medium/image adapters, formal helper surfaces, and the agentic superserver MCP chat wrapper.
Getting Started
- What: test fixtures and validation notes for the tests area.
- Why: it shows which behavior is locked by tests instead of only described in prose.
- How: read the local test map, then run the narrow package or crate test command named by the parent README.
- Next: use these files when changing behavior in the sibling source directory.
tts-audio.test.ts covers the local OpenAI-compatible speech endpoint helpers:
audio mode resolution, deterministic WAV encoding, and invalid request handling
without touching a real host audio device.
openai-agentic-mode.test.ts covers the bare-by-default Moonshine chat routing
contract, including X-Zedge-Agentic, body fallback fields, env defaults, and
optional MCP URL overrides.
thoth-npc-halogram.test.ts covers the shared-ui Halogram/metacognition adapter
used to convert NPC, halogram, and hologram voice/body summaries into bounded
Thoth prompt metrics.
style-transfer-any-image.test.ts, style-transfer-adain-adapter.test.ts, and
forkRaceFoldStyleTransfer.test.ts cover the host-side style-transfer surface:
classical transfer output constraints, AdaIN adapter contract behavior, and
fork/race/fold candidate ranking and ceiling rejection.
style-transfer-golden-png.test.ts compares deterministic 16×16 classical outputs
to committed PNG bytes under golden/style-transfer/ (regenerate with
UPDATE_STYLE_TRANSFER_GOLDEN_SNAPSHOTS=1).
style-transfer-frf-golden-png.test.ts guards the weighted FRF style fold on the
same fixtures (frf-mesh-fold-16.png).
frf-race-speed.bench.test.ts benchmarks the race-speed payoff of the ternary
fork verdict (Accept/Abstain/Decline) over the legacy sawRejection
boolean, both built on the real forkRaceFold. The bool forced a
complete-result consumer to re-run the whole fork batch on any rejection; the
trit's Abstain (partial survivors) ships the fold and backfills only the failed
slots. Seeded N×failure sweep, real concurrent wall-clock. Finding: the binary
whole-batch retry blows up geometrically (~`1/(1-p)^N`) — at N=16, p=0.20 it
costs 22x the fork-work and 15x the wall-clock (27 rounds vs ~2); the
policies tie only when nothing rejects. Asserts ternary work/rounds never exceed
binary and ≥1.5x at the stressed corner.