| name | branch-verification |
| description | Systematic pre-merge verification workflow for Rust monorepo branches. Check compilation, tests, clippy, grep leftovers, then fix → commit → push → PR. Use when user says "check work done in this branch" or before merging any PR.
|
| source | auto-skill |
| extracted_at | 2026-07-25T11:31:54.176Z |
Branch Verification Workflow
Systematic pre-merge QA checklist for Rust workspace branches. Run before merging any feature/fix branch into main.
Steps
1. Understand the branch context
git log --oneline -10
git diff HEAD --stat
git status
Read the commit messages to understand the branch's intent before inspecting diffs.
2. Inspect actual changes
git diff <base>..HEAD --stat
git diff <base>..HEAD -- <file>
If there are multiple commits, inspect each one separately to understand the incremental changes.
3. Verify compilation
cargo check --workspace
If compilation fails, read the first error, fix it, then re-run.
4. Run tests
cargo test --workspace
Count the test results: note X passed; 0 failed — do not accept failures.
5. Run clippy with deny warnings
cargo clippy -- -D warnings
Zero warnings enforced by clippy.toml policy. If clippy passes without warnings output — confirm clean.
6. Check for leftover references
Grep for the removed/refactored concept across the entire codebase:
grep -r '<concept>' --include='*.rs' --include='*.toml' --include='*.yaml' --include='*.yml' .
Check: .rs, .toml, .yaml, .yml, .sh, .md — any file type that could reference the removed dependency or renamed symbol.
7. If bugs found → fix → re-verify
- Identify root cause (diff of the broken commit)
- Apply surgical fix
- Re-run:
cargo check → cargo test → cargo clippy
- Commit with descriptive message explaining what was wrong and why
8. Commit → Push → PR
git add <fixed_file>
git commit
git push
gh pr create
Rules
- Never assume: compile error could be anywhere — read first error message, don't guess
- Never skip clippy:
cargo clippy -- -D warnings is project policy
- Verify all three before declaring done:
check + test + clippy
- Grep leftover references: removing a dependency doesn't count if code still mentions it in comments or docs
- Commit hook enforces format:
[MARKER] Description — markers: FEAT|FIX|DOC|CHORE|SANDBOX|CI|SEC|PERF|TEST|REFACTOR|DESIGN|PLAN|SPEC|CORE|CLI|SERVER