documentation/automation/recipe-schema-tracking/TESTING.md
This guide covers how to test the recipe schema tracking automation both locally and via GitHub Actions.
Test the complete pipeline locally:
cd documentation/automation/recipe-schema-tracking
# Test with no changes expected
./scripts/run-pipeline.sh v1.14.0 v1.15.0
# Test with changes expected
./scripts/run-pipeline.sh v1.9.0 v1.15.0
Test each script independently:
# Extract schema from a version
./scripts/extract-schema.sh v1.15.0 > output/test-schema.json
# Extract validation structure
./scripts/extract-validation-structure.sh v1.15.0 > output/test-validation.json
# Compare two validation structures
./scripts/diff-validation-structures.sh output/old.json output/new.json > output/test-changes.json
Test the AI recipes:
# Generate change documentation
cd output
goose run --recipe ../recipes/synthesize-validation-changes.yaml
# Update recipe-reference.md
export RECIPE_REF_PATH=/path/to/recipe-reference.md
goose run --recipe ../recipes/update-recipe-reference.yaml
The workflow can be tested in your fork without affecting the upstream repository.
git push origin your-branch-name
Purpose: Verify the workflow runs successfully when no changes are detected.
Inputs:
old_version: v1.14.0new_version: v1.15.0dry_run: trueExpected Results:
Purpose: Test change detection and documentation generation without creating a PR.
Inputs:
old_version: v1.9.0new_version: v1.15.0dry_run: trueExpected Results:
validation-changes.md with documentationrecipe-reference.mdReview Artifacts:
validation-changes.md - should document all changesupdate-summary.md - should show what was updatedrecipe-reference.md with originalPurpose: Test end-to-end including PR creation.
Inputs:
old_version: v1.9.0new_version: v1.15.0dry_run: falseExpected Results:
docs/recipe-reference-v1.15.0recipe-reference.mdReview PR:
recipe-reference.md was modifiedPurpose: Test automatic version detection (simulates production mode).
Inputs:
old_version: (leave empty)new_version: (leave empty)dry_run: trueExpected Results:
Each workflow run provides a summary with:
Artifacts include:
old-validation-structure.json - Extracted from old versionnew-validation-structure.json - Extracted from new versionvalidation-changes.json - Structured diffvalidation-changes.md - Human-readable changesupdate-summary.md - Documentation update summarypipeline.log - Full pipeline execution logFor detailed debugging:
.github/workflows/.yml or .yaml extensionvalidation-changes.json to see what was comparedgit tag | grep v1.15.0crates/goose-cli builds successfullyOnce testing is complete:
documentation/automation/recipe-schema-tracking/recipe-reference.md.github/workflows/docs-update-recipe-ref.ymlrelease: section in workflowAfter deployment, the workflow will automatically: