Why
Users who script SpecFact in CI/CD pipelines rely on stable output: help text format, error message wording, JSON/YAML structured output shapes. Today, a refactoring PR can silently change help text or error phrasing with no test catching it. Snapshot testing makes output changes explicit, reviewable, and intentional — treating help text and structured output as versioned contracts.
What Changes
- NEW:
syrupy dev dependency for pytest snapshot testing
- NEW: Snapshot tests for all command
--help outputs
- NEW: Snapshot tests for structured output shapes (JSON/YAML) and key error messages
- EXTEND: CI pipeline to reject unreviewed snapshot changes
- EXTEND:
pyproject.toml with syrupy configuration and hatch scripts
Acceptance Criteria
OpenSpec Change Proposal: cli-val-02-output-snapshot-stability
Why
Users who script SpecFact in CI/CD pipelines rely on stable output: help text format, error message wording, JSON/YAML structured output shapes. Today, a refactoring PR can silently change help text or error phrasing with no test catching it. Snapshot testing makes output changes explicit, reviewable, and intentional — treating help text and structured output as versioned contracts.
What Changes
syrupydev dependency for pytest snapshot testing--helpoutputspyproject.tomlwith syrupy configuration and hatch scriptsAcceptance Criteria
hatch run snapshot-updateandhatch run snapshot-checkscripts workOpenSpec Change Proposal: cli-val-02-output-snapshot-stability