ironclaw-reborn-testing

Guides test tier selection and conventions for Reborn behavior testing in Rust.

12.6k|1.5k|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/nearai/ironclaw --skill ironclaw-reborn-testing
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ironclaw-reborn-testing
Source: https://github.com/nearai/ironclaw/tree/main/.claude/skills/ironclaw-reborn-testing
Command: npx skills add https://github.com/nearai/ironclaw --skill ironclaw-reborn-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Choosing the wrong test tier wastes effort and leaves coverage gaps: helper-only tests miss caller-path bugs, mocked gateway seams skip the real retry/failover chain, and silently skipped tests hide missing CI coverage. This Skill provides a decision tree and repo-specific rules for writing and reviewing tests for Reborn behavior in the IronClaw Rust workspace.

Core Features & Use Cases

  • Tier decision tree: Routes each change to the right tier — unit tests, caller-path side-effect tests, the in-process scripted-model harness, recorded LLM QA fixtures, Playwright e2e, or live-LLM canaries.
  • Repo-specific traps: Enforces regression-per-fix checks, dual-backend (PostgreSQL + libSQL) parity, loud feature-gated skips instead of silent returns, and contract-doc-to-test naming.
  • Exemplar test references: Points to living in-tree exemplar tests per tier via references/exemplar-tests.md so new tests imitate proven shapes.
  • Use Case: When fixing a bug in an approval-gated write path, use this Skill to decide that you need a caller-path integration test asserting the file exists on disk, modeled on scenario_gate_then_approve.rs, rather than a helper-only unit test.

Quick Start

Ask the assistant to help you choose the right test tier and write a regression test for your Reborn behavior change, following the tier decision tree and exemplar tests.

Frequently Asked Questions about ironclaw-reborn-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose the right test tier for a Rust behavior change?▼

Follow the tier decision tree: pure logic gets a unit test, gated side effects need a caller-path test driving the real entry point, whole-turn behavior uses the in-process scripted-model harness, and model tool-choice behavior uses recorded QA fixtures. Browser-visible changes go to Playwright e2e.

How do I test model tool-choice behavior without a live LLM?▼

Use the recorded QA fixtures in tests/fixtures/llm_traces/reborn_qa with the reborn_qa_recorded_behavior.rs harness, which replays hermetic contract assertions offline. Fixtures must pass the secret/PII scrub script before being committed.

Where should I mock the LLM in integration tests?▼

Mock only at the vendor-SDK seam using TraceLlm so the real ironclaw_llm retry, failover, and circuit-breaker chain still executes. Mocking at the gateway seam skips that chain and belongs to the separate binary replay tier.

Do integration tests requiring Postgres run in PR CI?▼

Not necessarily; the backend-integration tier may run post-merge or nightly depending on the workflow configuration. For database-shaped changes, run the crate-level feature-gated suite locally, such as cargo test -p ironclaw_hooks --features integration,test-support.

Why is a silent skip in a test a problem for CI coverage?▼

A pattern like returning early when Docker is missing makes the suite silently vanish from CI while appearing green. New tests should skip loudly via feature gates or explicit env opt-outs that fail when the dependency is absent.