一键导入
harn-testing
Use for Harn conformance tests, eval harnesses, deterministic fixtures, and language/runtime test coverage.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use for Harn conformance tests, eval harnesses, deterministic fixtures, and language/runtime test coverage.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | harn-testing |
| short | Conformance tests, evals, deterministic fixtures, and test authoring. |
| description | Use for Harn conformance tests, eval harnesses, deterministic fixtures, and language/runtime test coverage. |
| when_to_use | Use when adding or reviewing conformance cases, eval fixtures, mock providers, replay fixtures, or deterministic tests. |
Use this skill when adding or reviewing tests for Harn language, runtime, providers, orchestration, replay, or eval behavior.
Pair it with [[harn-language]] for syntax contracts and [[harn-tracing]] for replay or transcript assertions.
conformance/tests/ is the executable spec for user-visible behavior.docs/src/dev/testing.md lists deterministic test patterns and banned flaky patterns.docs/llm/harn-quickref.md covers .harn syntax used in fixtures.harness.fs.mkdtemp_in_workspace(prefix?) for sandbox-local fixtures and
scratch files; tests should not require host temp paths, credentials, or
Keychain prompts unless that is the behavior under test.HARN_SECRET_PROVIDERS=env with test-only HARN_SECRET_* variables
for secret-dependent CLI smokes; never let routine tests hit the OS keychain..harn files normally pair with .expected..error.@xfail marks an expected failing case.@xfail cases are xfail_expected.@xfail cases are xfail_unexpected_pass.snapshotKey identifies the selected fixture set and relevant sidecars..expected output minimal and user-visible..error output stable around diagnostic codes and messages.std::thread::sleep to tests.tokio::time::sleep to tests.SystemTime::now() in tests.recv_timeout waits.tokio::time::pause() and advance().mock_time or paused clocks for time-sensitive behavior.EventLog::subscribe() over sleep-and-check loops.OrchestratorHarness for orchestration state machines.harn-parser tests or conformance.harn-fmt tests plus focused CLI smoke when needed.harn-lint tests plus CLI coverage for flags.harn-vm tests or conformance.crates/harn-cli/tests/.make check-docs-snippets.make test for higher-risk shared behavior.make test.cargo test -p <package> <filter>.cargo run --quiet --bin harn -- test conformance.cargo run --quiet --bin harn -- test conformance --json.cargo run --quiet --bin harn -- test conformance --filter <name>.make lint-test-patterns.make lint-harn.make fmt-harn.make check-docs-snippets.npm run portal:lint, npm run portal:test, and npm run portal:build.Generate, validate, preview, and run portable Harn workflow bundle JSON for monitoring and repairing pull requests, deploys, logs, and other event-driven engineering work. Optimized for smaller models (qwen, gemma, llama.cpp) with explicit XML sections, strict JSON output, and a validation-and-retry loop.
Use for Harn language syntax, typechecking, modules, imports, and idiomatic script authoring.
Use for autonomous Harn agent work, task decomposition, capability boundaries, and host interaction patterns.
Use for Harn orchestration workflows, agent_loop usage, tool middleware, and handoff design.
Use for Harn provider setup, model routing, provider capability matrices, and llm_call options.
Run a cron eval pack, gate against prior ledger rows, and post Slack only on gate flips.