Harn testing

From burin-labs/harn · View interactive version

Harn testing is an AI agent skill from the GitHub repository burin-labs/harn. Test owning interfaces, canonical paths, liveness, replay, and stochastic quality at the right altitude.

How to use this skill

Skill file

Harn testing

Use this skill to choose evidence that can falsify the claim being made.

Pair it with [[harn-probe]] for uncertain runtime facts,

[[harn-orchestration]] for workflow ownership, and [[harn-product-quality]] for

launch behavior.

Start from the claim

Test altitude

Determinism

Interface tests

Declare a test pipeline

fn test_* is never collected.

per declared non-Harness parameter, so a test runs identically at arity

two, one, or zero. A trailing _task slot carries nothing and is noise:

pipeline test_route_is_local(harness: Harness) and

pipeline test_labels_are_human() are complete signatures.

capability through it.

parameters. Those slots are part of the contract; keep them.

Run Harn test suites

from tests in the same process. Use a subprocess only when the CLI adapter,

installed artifact, process isolation, or operating-system exit status is

the behavior under test.

the selected import graph once and schedules the

combined cases from one queue.

pool from available CPU and memory. Reserve --jobs or HARN_TEST_JOBS for

an operator-imposed limit on a shared host.

processes with @heavy(threads: N). Mark tests that share mutable external

state with @serial(group: "name"). Keep ordinary filesystem fixtures in

per-test workspace temporary directories instead of serializing the suite.

discovery, import-graph compilation, fixture setup, and resource queueing;

it still detects blocked I/O and deadlocks, which a CPU-time limit would

miss.

a host-isolated lane. Harn serializes those measurement budgets so scheduler

contention cannot decide the result.

The repository reference docs/src/testing.md defines the exact timing

phases, cache contract, defaults, and machine-readable receipts.

Conformance

the system temporary directory. A checkout under /tmp sits inside the

latter. The fixture then becomes in-scope, and a case asserting that an

out-of-scope read is refused fails on that machine alone.

Workflow and lifecycle

Canonical product path

Portable kernel claims

adapter-owned parser or evaluator.

diagnostics over the same corpus.

does not prove the browser path.

mismatch, corruption, trailing data, excessive size, excessive nesting, and

unsupported semantic contracts.

Also prove denial, wrong request id, wrong snapshot key, changed grants,

stale snapshots, and incompatible results fail deterministically.

randomness, model, thread, and shared-memory authority.

assert isolated executions retain terminal parity. For browsers, use

independent workers rather than assuming Wasm threads.

initialization, and bundle size separately. Preserve machine, browser, build

mode, sample count, receipt, and revision with the observation.

should signal completion structurally, without sleeps or wall-clock polling.

Stochastic quality

undeclared-label, low-confidence, and refusal paths with hermetic fixtures.

Recorded-tape replay must fail on a missing or extra request without live

fallback; assert the provider call count, not just the outcome text.

threshold on a separate labeled holdout before it governs a live workflow.

Replay

Failure injection

Verify the tests

First check for other active Harn builds; never share mutable targets or

start a second umbrella build behind another lane's compiler lock. If the

lane is occupied, keep the focused exact-head proof, let isolated remote CI

own the broad gate, and report the skipped local umbrella gate as a blind

spot rather than interrupting another worker.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.