Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

harn-testing

БесплатноБез исполняемых скриптовНе проверен

Test owning interfaces, canonical paths, liveness, replay, and stochastic quality at the right altitude.

burin-labsот burin-labs★ 34 звезды на GitHub

Об этом скилле

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

  • Write the claim in observable terms.
  • Name a plausible falsifier.
  • Identify the owning module and public interface.
  • Choose the lowest test altitude that can falsify the claim.
  • Add higher-altitude evidence when the claim crosses adapters or surfaces.
  • Do not count tests as proof; map evidence to claims.
  • Record what remains outside the evidence.

Test altitude

  • Pure language semantics: conformance fixture.
  • Parser, type, lint, or format behavior: focused crate test plus conformance.
  • Runtime module behavior: test through the public runtime interface.
  • Workflow behavior: deterministic harness test.
  • Adapter contract: production and in-memory adapters through the same seam.
  • Product behavior: canonical path end to end.
  • Liveness: progress, interruption, recovery, terminal state.
  • Model quality: multiple trials with a calibrated evaluator.

Determinism

  • Use mock_time, paused Tokio time, and explicit advancement.
  • Subscribe to events rather than polling.
  • Use OrchestratorHarness for workflow state.
  • Use deterministic provider and tool adapters.
  • Seed randomness and record the seed.
  • Avoid sleep, wall-clock deadlines, and short recv_timeout.
  • Avoid network dependencies in deterministic suites.
  • Assert on typed events and outcomes rather than incidental log order.

Interface tests

  • Tests and callers should cross the same interface.
  • Assert observable outcomes, errors, receipts, and state transitions.
  • Do not test through private seams merely because they are convenient.
  • Replace shallow-module tests when a deeper owning interface supersedes them.
  • Keep test setup smaller than the behavior under test.
  • Use production-shaped configuration defaults.
  • Verify closed error variants and diagnostic codes.
  • Keep fixtures minimal and readable.

Declare a test pipeline

  • A test is pipeline test_<claim>(...). Discovery is pipeline-only; a fn test_* is never collected.
  • Declare only the parameters the body uses. The runner derives one argument 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.
  • Take harness: Harness as the first parameter only when the body reaches a capability through it.
  • @test(cases: [...]) rows and @test(fixture: ...) do count the remaining parameters. Those slots are part of the contract; keep them.

Run Harn test suites

  • Put module behavior behind a public Harn function and call that function 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.
  • Select related files as positional paths in one invocation. Harn compiles the selected import graph once and schedules the combined cases from one queue.
  • Use --parallel without --jobs by default. The runner sizes the worker pool from available CPU and memory. Reserve --jobs or HARN_TEST_JOBS for an operator-imposed limit on a shared host.
  • Mark tests that start compilers, test runners, or multi-threaded child 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.
  • Use --timeout as an execution-only wall-clock safety rail. It starts after discovery, import-graph compilation, fixture setup, and resource queueing; it still detects blocked I/O and deadlocks, which a CPU-time limit would miss.
  • Assert performance separately with --max-test-ms or --max-execute-ms in 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

  • Put language/runtime specification behavior under conformance/tests/.
  • Include positive and negative cases.
  • Preserve diagnostic codes and useful spans.
  • Update formatter, linter, tree-sitter, and editor fixtures for syntax changes.
  • Run the narrow filtered case first.
  • Pin a capability-policy root to harness.fs.workspace_temp_dir(), never to 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.
  • Run make conformance, make lint-harn, and make fmt-harn for syntax work.
  • Keep genera
Полный SKILL.md на GitHub

Установить harn-testing в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл harn-testing?

Test owning interfaces, canonical paths, liveness, replay, and stochastic quality at the right altitude.

Как установить скилл harn-testing?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл harn-testing запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить harn-testing с