device-testing

Canonical reference for agents writing tests for device identification, doctor checks, and readiness pipelines. Read this before touching @podkit/device-testing, any file named .e2e.test.ts, or tasks in milestone m-19.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/jvgomg/podkit/device-testing
Clone the repo
git clone --depth 1 https://github.com/jvgomg/podkit
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,352 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.06352
Opus 5 $0.00000 $0.03176
Sonnet 5 $0.00000 $0.01270
Haiku 4.5 $0.00000 $0.00635

Measured today against content hash e8e4825605ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

device-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/device-testing.md · 375 lines

How it starts

The opening of the file, as written. The whole thing — 375 lines — stays where its author put it; the contents beside it link to each section on GitHub.

device-testing: Device Test Harness

Canonical reference for agents writing tests for device identification, doctor checks, and readiness pipelines. Read this before touching @podkit/device-testing, any file named *.e2e.test.ts, or tasks in milestone m-19.

Also see test-packages/device-testing/README.md for package-level API details, ADR-016 for the full architecture decision, and ADR-017 for the fixture registry design.

Quick start (developer)

First time:

bun install
bun run harness:setup
bun run test:vm

Subsequent runs:

bun run harness:start  # if VM is stopped
bun run test:vm
bun run harness:stop   # when done

bun run harness:status prints a single-screen health check of the VM, binaries, systemd unit, and kernel modules. bun run harness:install re-runs the turbo builds and re-transfers everything (cheap; sha256-skips no-op transfers). All harness:* scripts dispatch into test-packages/device-testing/scripts/harness.ts.

bun run test:vm is now self-orchestrating. It turbo-depends on two new tasks:

  • @podkit/device-testing#vm:install — cached fresh-binary install. Invalidates on changes to podkit/daemon/gpod-tool source globs OR scripts/harness.ts / runners/lima-test-vm-*.ts. Replays as a cache hit (~300ms) when nothing changed.
  • @podkit/device-testing#vm:doctor — preflight drift check. Hashes podkit-device-harness.yaml + apply-state.sh and compares against the baseline hash sealed inside the VM at harness:setup. No silent recovery — drift exits 1 with the exact harness:destroy && harness:setup remediation command.

You almost never need harness:install directly anymore; test:vm covers the binary-freshness contract. Force-refresh via bunx turbo run @podkit/device-testing#vm:install if needed (e.g. after a manual rebuild outside the test loop). Drift-check only: bunx turbo run @podkit/device-testing#vm:doctor.

Read the full file on GitHub · 375 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 375 lines · 0 tokens per session scan A e8e4825605ed

Subscribe to this mod's changes

device-testing is an agent published in the GitHub repository jvgomg/podkit (39 stars, last pushed 9d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 6,352 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.