testing-spine

Tests the Runtime Truth Spine's EvidenceReceipt, RoutingDecision, invoke_agent dispatch, and anti-accretion gate.

Updated Aug 5, 2026
One-click install
npx skills add https://github.com/AmitabhainArunachala/dharma_swarmv.01 --skill testing-spine-amitabhainarunachala
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: testing-spine
Source: https://github.com/AmitabhainArunachala/dharma_swarmv.01/tree/main/.agents/skills/testing-spine
Command: npx skills add https://github.com/AmitabhainArunachala/dharma_swarmv.01 --skill testing-spine-amitabhainarunachala

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pytest.

What problem does it solve? Changes to the dharma_swarm spine (EvidenceReceipt, RoutingDecision, invoke_agent, and the sqlite anti-accretion gate) can silently corrupt every downstream receipt, and this Skill provides a repeatable procedure to verify both the happy path and that the gate still rejects violations. ## Core Features & Use Cases - Spine acceptance tests: Runs pytest against tests/test_dispatch_dropoff_sources.py covering the five doctrine §11 dispatch dropoff scenarios. - Bidirectional gate testing: Verifies tools/spine_check.py both rejects undeclared sqlite imports (exit 1) and passes files with a proper # spine: header (exit 0), including temp-file cleanup. - Type invariant checks: Validates EvidenceReceipt frozen immutability, OTel span export shape, and JSON round-trip serialization. - Use Case: After editing dharma_swarm/spine/ or tools/spine_check.py, run this Skill to confirm acceptance tests pass, the gate still rejects violations, and adjacent regression suites (telic seam, task board, A2A) match a same-session baseline. ## Quick Start Run the spine test procedure to verify my changes to dharma_swarm/spine/ and confirm the anti-accretion gate still rejects undeclared sqlite imports.

Frequently Asked Questions about testing-spine

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

FAQPage Schema
How do I test changes to the dharma_swarm spine module?▼

Run pytest on tests/test_dispatch_dropoff_sources.py for the five acceptance scenarios, then execute tools/spine_check.py for the anti-accretion gate. Follow with type invariant checks and regression sweeps on adjacent suites like test_telic_seam.py and test_task_board.py.

How do I test that a gate rejects violations, not just passes?▼

Create a temporary file importing sqlite3 without a `# spine:` header and confirm spine_check.py exits 1, then create one with the header and confirm exit 0. Always delete the temp files afterward so the next gate run is not broken.

What does the spine_check.py anti-accretion gate enforce?▼

The gate requires any file importing sqlite3 or aiosqlite to declare a `# spine:` header describing what it writes. Enforcement scope grows over time as the _is_grandfathered() list shrinks, so read the current script to see where enforcement applies.

Why does spine_check.py fail after I added a new sqlite store?▼

The gate rejects new sqlite imports that lack a `# spine:` declaration header. Do not widen _is_grandfathered() or delete the requirement to fix it; instead extend an existing spine owner or add the proper header.

What invariants must EvidenceReceipt satisfy?▼

EvidenceReceipt must be frozen so mutation raises an error, export an OTel span containing gen_ai.operation.name and dharma.receipt_id attributes, and survive a JSON round-trip via to_dict with field values preserved.