6.1 KiB
Testing Recipe Schema Tracking Automation
This guide covers how to test the recipe schema tracking automation both locally and via GitHub Actions.
Local Testing
Prerequisites
- goose CLI installed
- jq installed (for JSON processing)
- Git repository with goose source code
Manual Pipeline Execution
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
Individual Script Testing
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
Recipe Testing
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
GitHub Actions Testing
Test in Your Fork
The workflow can be tested in your fork without affecting the upstream repository.
Step 1: Push Branch to Fork
git push origin your-branch-name
Step 2: Enable GitHub Actions
- Go to your fork on GitHub
- Click "Actions" tab
- Enable workflows if prompted
Step 3: Run Workflow Manually
- Click "Update Recipe Documentation" workflow (docs-update-recipe-ref.yml)
- Click "Run workflow" button
- Select your branch
- Configure inputs (see test scenarios below)
- Click "Run workflow"
Test Scenarios
Scenario 1: Dry-Run with No Changes
Purpose: Verify the workflow runs successfully when no changes are detected.
Inputs:
old_version:v1.14.0new_version:v1.15.0dry_run:true
Expected Results:
- ✅ Workflow completes successfully
- ✅ "No changes detected" message in summary
- ✅ Artifacts uploaded with extraction results
- ✅ No PR created
Scenario 2: Dry-Run with Changes
Purpose: Test change detection and documentation generation without creating a PR.
Inputs:
old_version:v1.9.0new_version:v1.15.0dry_run:true
Expected Results:
- ✅ Workflow detects changes (4 validation rules, 1 field removal)
- ✅ Generates
validation-changes.mdwith documentation - ✅ Updates
recipe-reference.md - ✅ Artifacts uploaded with all generated files
- ✅ No PR created (dry-run mode)
Review Artifacts:
- Download artifact zip from workflow run
- Check
validation-changes.md- should document all changes - Check
update-summary.md- should show what was updated - Compare updated
recipe-reference.mdwith original
Scenario 3: Full Run with PR Creation
Purpose: Test end-to-end including PR creation.
Inputs:
old_version:v1.9.0new_version:v1.15.0dry_run:false
Expected Results:
- ✅ Workflow runs successfully
- ✅ Creates PR:
docs/recipe-reference-v1.15.0 - ✅ PR contains updated
recipe-reference.md - ✅ PR description includes change summary and checklist
Review PR:
- Check only
recipe-reference.mdwas modified - Verify changes match dry-run artifacts
- Confirm no unintended modifications
- Test documentation renders correctly
Scenario 4: Auto-Detection
Purpose: Test automatic version detection (simulates production mode).
Inputs:
old_version: (leave empty)new_version: (leave empty)dry_run:true
Expected Results:
- ✅ Auto-detects two most recent releases
- ✅ Compares them automatically
- ✅ Uploads artifacts
Reviewing Workflow Results
Check Workflow Summary
Each workflow run provides a summary with:
- Version comparison performed
- Whether changes were detected
- Dry-run mode status
- Links to artifacts
Download and Review Artifacts
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 log
Check Workflow Logs
For detailed debugging:
- Click on the workflow run
- Click on the "Update Recipe Documentation" job
- Expand each step to see detailed logs
- Look for error messages or unexpected behavior
Troubleshooting
Workflow doesn't appear in Actions tab
- Verify workflow file is in
.github/workflows/ - Check file has
.ymlor.yamlextension - Ensure GitHub Actions is enabled in fork
"No changes detected" when expecting changes
- Check artifact
validation-changes.jsonto see what was compared - Verify versions exist:
git tag | grep v1.15.0 - Review extraction script logs
goose CLI installation fails
- Workflow installs from current repository
- Ensure
crates/goose-clibuilds successfully - Check Rust toolchain installation
PR creation fails
- Verify workflow has required permissions
- Check branch name doesn't already exist
- Review workflow logs for error messages
Production Deployment
Once testing is complete:
- Merge automation to main: Create PR for
documentation/automation/recipe-schema-tracking/ - Merge baseline docs: Create PR for revised
recipe-reference.md - Merge workflow: Create PR for
.github/workflows/docs-update-recipe-ref.yml - Enable release trigger: Uncomment
release:section in workflow
After deployment, the workflow will automatically:
- Trigger on new releases
- Compare with previous release
- Create PR if changes detected
- Notify team for review
Related Documentation
- Recipe Schema Tracking README - Automation details
- Recipe Reference Guide - Target documentation
- Automation Overview - All automation projects