Commit Review
Scope
Review one commit at a time.
- If the user gives a SHA, review that commit.
- If the user asks to review the latest or new commit, review
HEAD.
- Run git commands on the host, not inside Docker.
Gather the Commit
Start with:
git show --stat --summary <sha>
git show --format=fuller --no-patch <sha>
git show <sha>
For wide commits:
- Group changed files by pattern or variant matrix.
- Inspect representative diffs first, then spot-check sibling variants.
- Compare generated and non-generated peers when both exist.
Review Priorities
- Correctness and regression risk.
- Missing validation, tests, or benchmarks.
- Performance-sensitive changes on hot paths.
- Maintainability issues only when they materially affect safety or future debugging.
Avoid turning the review into a style-only audit.
Core Checks
General
- Logic change matches the commit message and changed files.
- Edge cases, layout assumptions, and data-shape assumptions still hold.
- New constants, offsets, and branch conditions are traceable to real inputs.
- Tests or manual validation cover the new behavior, not just the default path.
For generated or mirrored files
- The same logical fix lands in every required variant.
- Generated files do not introduce accidental duplicates, stale code, or drift from source templates.
- Variant-specific differences are intentional and explained by layout, dtype, or tile shape.
aiter SP3 / kernel checks
- 64-bit address math is safe when stride or offset products can overflow 32-bit.
- No SCC-clobbering instruction sits between
s_add_u32 and s_addc_u32.
- New SGPR aliases do not overlap existing scalar register usage.
- New dispatch or kernarg offsets match the host-side ABI and packing.
- Buffer/layout assumptions hold for BHS, SBHD, varlen, GQA/MQA, and padding when relevant.
- Changes stay synchronized across BF16/FP16, D64/D128,
_Gen, cas_kb, and A16/A32 variants as needed.
- New branches in hot paths are uniform or justified, and perf-sensitive changes call out expected impact.
Output Format
Present findings first, ordered by severity.
Use this format:
[Critical/Warning/Suggestion/Praise] <file>:<line>
<problem or positive observation>
<suggested fix or follow-up, if applicable>
Then include:
Open questions / assumptions
Summary
If you find no issues, say so clearly and still mention residual risk, missing tests, or missing perf data.
Good Review Habits
- Prefer 2-5 high-signal findings over exhaustive nits.
- Call out missing evidence separately from proven bugs.
- When a commit touches many similar files, name the exact variant matrix you checked.
- If the change looks correct but risky, recommend the smallest useful validation matrix.
Additional Resources
- For a worked example using a real FMHA shader commit, see examples.md.
1---2name: commit-review3description: Review a single git commit or the latest fresh commit with findings-first feedback. Use when the user asks to review a commit, provides a SHA, asks to review the latest commit or `HEAD`, shares `git show` output, or when post-commit context indicates a new commit was created. Focus on correctness, regression risk, missing tests, and aiter SP3/HIP/CUDA concerns.4---56# Commit Review78## Scope910Review one commit at a time.1112- If the user gives a SHA, review that commit.13- If the user asks to review the latest or new commit, review `HEAD`.14- Run git commands on the host, not inside Docker.1516## Gather the Commit1718Start with:1920```bash21git show --stat --summary <sha>22git show --format=fuller --no-patch <sha>23git show <sha>24```2526For wide commits:2728- Group changed files by pattern or variant matrix.29- Inspect representative diffs first, then spot-check sibling variants.30- Compare generated and non-generated peers when both exist.3132## Review Priorities33341. Correctness and regression risk.352. Missing validation, tests, or benchmarks.363. Performance-sensitive changes on hot paths.374. Maintainability issues only when they materially affect safety or future debugging.3839Avoid turning the review into a style-only audit.4041## Core Checks4243### General4445- Logic change matches the commit message and changed files.46- Edge cases, layout assumptions, and data-shape assumptions still hold.47- New constants, offsets, and branch conditions are traceable to real inputs.48- Tests or manual validation cover the new behavior, not just the default path.4950### For generated or mirrored files5152- The same logical fix lands in every required variant.53- Generated files do not introduce accidental duplicates, stale code, or drift from source templates.54- Variant-specific differences are intentional and explained by layout, dtype, or tile shape.5556### aiter SP3 / kernel checks5758- 64-bit address math is safe when stride or offset products can overflow 32-bit.59- No SCC-clobbering instruction sits between `s_add_u32` and `s_addc_u32`.60- New SGPR aliases do not overlap existing scalar register usage.61- New dispatch or kernarg offsets match the host-side ABI and packing.62- Buffer/layout assumptions hold for BHS, SBHD, varlen, GQA/MQA, and padding when relevant.63- Changes stay synchronized across BF16/FP16, D64/D128, `_Gen`, `cas_kb`, and A16/A32 variants as needed.64- New branches in hot paths are uniform or justified, and perf-sensitive changes call out expected impact.6566## Output Format6768Present findings first, ordered by severity.6970Use this format:7172```text73[Critical/Warning/Suggestion/Praise] <file>:<line>74<problem or positive observation>75<suggested fix or follow-up, if applicable>76```7778Then include:79801. `Open questions / assumptions`812. `Summary`8283If you find no issues, say so clearly and still mention residual risk, missing tests, or missing perf data.8485## Good Review Habits8687- Prefer 2-5 high-signal findings over exhaustive nits.88- Call out missing evidence separately from proven bugs.89- When a commit touches many similar files, name the exact variant matrix you checked.90- If the change looks correct but risky, recommend the smallest useful validation matrix.9192## Additional Resources9394- For a worked example using a real FMHA shader commit, see [examples.md](examples.md).