required_canon_version: >=3.0.0
Skill: test-primitives
Version: 0.1.0
Status: Active
Purpose
Tests the safe primitives used throughout the AGS system, including:
- Platform-specific file locking (Windows/Unix)
- Atomic JSONL write and rewrite operations
- Streaming JSONL reader
- Task state transition validation
- Task spec validation
- File hashing (SHA-256)
- Validator constants verification
Trigger
Use when:
- Verifying that safe primitives work correctly on the current platform
- After system updates that might affect file operations
- During CI/CD pipeline validation
- Testing cross-platform compatibility
Inputs
JSON object with optional fields:
run_tests(boolean, optional): Whether to run actual tests (default: true)dry_run(boolean, optional): Return mock results for deterministic testing
Outputs
JSON object:
tests_run(integer): Number of tests executedtests_passed(integer): Number of tests that passedtests_failed(integer): Number of tests that faileddetails(array): List of test results with pass/fail indicatorssummary(string): Human-readable summaryvalidator_semver(string): Current validator semantic versionbuild_id(string): Validator build fingerprintdurable_roots_count(integer): Number of durable rootscatalytic_roots_count(integer): Number of catalytic roots
Constraints
- Creates temporary files during test execution
- All temporary files are cleaned up after tests
- Platform-specific behavior for file locking
- Non-destructive (does not modify repository files)
Tests Performed
- File locking (Windows/Unix) - Exclusive file lock acquire/release
- Atomic JSONL write - Append lines atomically
- Atomic JSONL rewrite - Transform and rewrite JSONL atomically
- Streaming JSONL reader - Read with pagination and filtering
- Task state transitions - Validate allowed state changes
- Task spec validation - Validate task specification format
- File hashing (SHA-256) - Compute file hashes
- Constants and build ID - Verify validator constants
Fixtures
fixtures/basic/- Deterministic test with mock results
required_canon_version: >=3.0.0