Testing - Verification Patterns

Guide Vitest unit and integration tests for the Bastion protocol.

Updated Mar 11, 2026
One-click install
npx skills add https://github.com/Glorktelligence/Bastion --skill testing-verification-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Testing - Verification Patterns
Source: https://github.com/Glorktelligence/Bastion/tree/main/.claude/skills/testing
Command: npx skills add https://github.com/Glorktelligence/Bastion --skill testing-verification-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide and patterns for writing robust tests, ensuring the reliability and safety of the Bastion protocol and its components.

Core Features & Use Cases

  • Testing Framework Guidance: Details the use of Vitest for unit and integration testing across packages.
  • Critical Testing Areas: Outlines essential aspects to test for the Protocol, Safety Engine, and Relay.
  • Mandatory Test Patterns: Includes specific examples for Safety Floor and MaliClaw Clause tests, emphasizing immutability and hardcoded security.
  • Use Case: When developing a new feature for the Safety Engine, consult this Skill to understand the required unit tests, specifically how to verify that safety floors cannot be lowered and that the MaliClaw Clause remains effective.

Quick Start

Run all tests for the Bastion project using the command pnpm test.

Frequently Asked Questions about Testing - Verification Patterns

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

FAQPage Schema
How do I write integration tests for protocol schemas and safety engines?

To write integration tests for protocol schemas and safety engines, use Vitest to verify component behaviors and enforce critical testing patterns across the Protocol, Safety Engine, and Relay layers. This ensures comprehensive protocol reliability.

What are the mandatory verification patterns for testing safety floors?

Mandatory verification patterns for testing safety floors require asserting immutability, ensuring the safety floor cannot be lowered, and verifying that hardcoded security measures remain effective across all test suites. This guarantees protocol safety.

Does Vitest work well for verifying protocol immutability and the MaliClaw Clause?

Yes, Vitest works well for verifying protocol immutability and the MaliClaw Clause by providing the framework necessary to enforce specific test patterns that validate hardcoded security constraints and safety floor boundaries.

How do I run all unit and integration tests for the Bastion protocol?

To run all unit and integration tests for the Bastion protocol, execute the command `pnpm test` in your project directory to initiate the Vitest suite and verify relay functionalities and client behaviors.

What specific testing areas should I cover when developing Safety Engine features?

When developing Safety Engine features, you should cover unit tests for safety floor immutability, verify the MaliClaw Clause remains effective, and test relay functionalities alongside client behaviors to ensure comprehensive safety verification.

Why does my protocol safety test fail to enforce hardcoded security constraints?

Protocol safety tests fail to enforce hardcoded security constraints when specific test patterns for the MaliClaw Clause and safety floor immutability are not properly implemented using Vitest to verify these critical boundaries.