harn-testing
БесплатноБез исполняемых скриптовНе проверенTest owning interfaces, canonical paths, liveness, replay, and stochastic quality at the right altitude.
от 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
OrchestratorHarnessfor workflow state. - Use deterministic provider and tool adapters.
- Seed randomness and record the seed.
- Avoid
sleep, wall-clock deadlines, and shortrecv_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; afn test_*is never collected. - Declare only the parameters the body uses. The runner derives one argument
per declared non-
Harnessparameter, so a test runs identically at arity two, one, or zero. A trailing_taskslot carries nothing and is noise:pipeline test_route_is_local(harness: Harness)andpipeline test_labels_are_human()are complete signatures. - Take
harness: Harnessas 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
--parallelwithout--jobsby default. The runner sizes the worker pool from available CPU and memory. Reserve--jobsorHARN_TEST_JOBSfor 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
--timeoutas 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-msor--max-execute-msin 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/tmpsits 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, andmake fmt-harnfor syntax work. - Keep genera
Установить 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), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic