Manual Test Runbook — R1: PR template enforcement
Owner: Sagar | Time: ~20 min | Local only (no cloud required)
Purpose
Verify that the pr-template-check.yml workflow correctly validates PR titles and required sections.
Prerequisites
- GitHub CLI (
gh) installed and authenticated to the snowops-automation repo. - Permission to create a test branch and PR.
Steps
1. Create a test branch
2. Make a trivial change
echo "# Test for R1" >> TESTING.md
git add TESTING.md
git commit -m "test: r1 pr template validation"
git push -u origin test/r1-pr-template
3. Open a PR with an empty template
- PR opens.
- The
pr-template-checkworkflow is listed in the checks.
4. Wait for the check to fail
- In 30 seconds, the workflow runs and fails.
- Error message visible: "PR body is empty".
5. Test: invalid title format
Close the above PR and open a new one with a bad title:
git commit --allow-empty -m "test"
git push
gh pr create --title "bad title without prefix" --body ""
- Workflow fails with message about Conventional Commits format.
- Error lists allowed types:
feat,fix,chore,sec,compliance,infra,test,docs.
6. Test: template left in body
Create a PR with the HTML comment still in the body:
BODY='<!--
SnowOps PR template (asset R1).
-->
## Summary
Test
## Scope of change
- [x] Documentation only
## Linked issue / ADR
NONE
## Test plan
- [x] No tests required
## Risk + rollback
No risk.
## Compliance impact
N/A'
gh pr create --title "chore: test with comment" --body "$BODY"
- Workflow fails with message: "The instruction comment at the top of the template should be deleted before opening the PR."
7. Test: missing required section
BODY='## Summary
Test summary.
## Scope of change
- [x] Documentation only
## Test plan
- [x] No tests required
## Compliance impact
N/A'
gh pr create --title "chore: test missing sections" --body "$BODY"
- Workflow fails with message listing missing sections:
## Linked issue / ADRand## Risk + rollback.
8. Test: empty required section
BODY='## Summary
Test summary.
## Scope of change
- [x] Documentation only
## Linked issue / ADR
## Test plan
- [x] No tests required
## Risk + rollback
## Compliance impact
N/A'
gh pr create --title "chore: test empty sections" --body "$BODY"
- Workflow fails: "Required PR sections are empty: ## Linked issue / ADR, ## Risk + rollback".
9. Test: empty test plan
BODY='## Summary
Test summary.
## Scope of change
- [x] Documentation only
## Linked issue / ADR
NONE
## Test plan
- [ ] Unit tests
- [ ] Manual test
- [ ] No tests required
## Risk + rollback
No risk.
## Compliance impact
N/A'
gh pr create --title "chore: test no ticked box" --body "$BODY"
- Workflow fails: "At least one item in the Test plan section must be ticked."
10. Test: passing PR
BODY='## Summary
Test summary for a valid PR.
## Scope of change
- [x] Documentation only
## Linked issue / ADR
NONE — minor test doc change.
## Test plan
- [x] No tests required — documentation only.
## Risk + rollback
No risk. Revert via git revert if needed.
## Compliance impact
N/A'
gh pr create --title "chore: test valid pr" --body "$BODY"
- Workflow runs and passes (green check).
- All subsequent pushes to the branch also pass.
11. Clean up
Pass criteria
- Invalid title → workflow fails with clear message about Conventional Commits.
- Empty body → fails.
- Template comment left in → fails with specific message.
- Missing section → fails, lists which sections are missing.
- Empty required section → fails, lists empty sections.
- Empty test plan (no ticked box) → fails.
- Fully compliant PR → passes.
Failure modes & escalation
| Symptom | Action |
|---|---|
| Workflow never runs on PR | Check .github/workflows/pr-template-check.yml is committed to main. Force-refresh PR with git push --force-with-lease. |
| False negatives (bad PR passes) | Check workflow YAML for syntax errors: ruby -ryaml -e "YAML.load_file('.github/workflows/pr-template-check.yml')" |
| Bash test body formatting broken | Use the exact body strings from the runbook; shell quoting can be finicky. |
Sign-off
- Tester: Sagar Chhabra__ | Date: 26/05/2026___ | Result: PASS
- Notes: