Review output
Read when: reporting the findings of a code review, by hand or from a reviewer agent. Owns: the report template, ordering, tone, and the definition of each severity.
TL;DR
- Cite
file:linefor every finding. - Pair each problem with the corrected code.
- Security and boundaries first; formatting last or not at all (Pint owns it).
- Mark each finding ๐ด, ๐ก or ๐ข as defined below. Cite the anti-pattern number when one matches.
- Omit empty sections. Say plainly when a change is solid.
Severity
| Flag | Meaning | In review | Typical findings |
|---|---|---|---|
| ๐ด Critical | must fix before merge | block | security holes, broken module boundaries, partial writes (no transaction), once-only work that can run twice, response-contract regressions |
| ๐ก Warning | should fix; debt if left | fix in this change if reasonable, otherwise a follow-up | raw arrays for DTOs, logic in a controller, missing eager loads, comments that restate code |
| ๐ข Suggestion | optional | recommend; do not block | naming, small refactors the author may defer |
Template
## Review
### Files reviewed
- `src/Domain/Billing/Actions/IssueRefund.php`
- `app/Http/Controllers/RefundController.php`
### Verdict
โ
Approve / โ ๏ธ Approve with suggestions / โ Changes required
### Security
- ๐ด `routes/web.php:88` โ export route outside the auth group (#53).
### Boundaries and layers
- ๐ด `RefundService.php:42` โ query in a Service (#5). Move it to `GetPendingRefunds` and delegate.
### Data and queries
- ๐ก `RefundController.php:31` โ `$request->all() + [...]` lets the request override `customer_id` (#32).
### API and responses
- ๐ด `RefundController.php:57` โ `store` returns 200 (#69); return 201 with the resource.
### Code quality
- ๐ก `IssueRefund.php:12` โ comment restates the next line (#49); delete it.
### Suggestions
- ๐ข โฆ
### Seen nearby (not blocking)
- Older problems in files the change touched, one line each.
### What is good
- Specific, not generic ("the transition guard covers self-approval and has a test for it").
### Summary
Files: 2 ยท ๐ด 3 ยท ๐ก 2 ยท ๐ข 1
How to write findings
- One finding per problem, with the offending line and the fix side by side when it is not obvious.
- Lead with what can break production or leak data, then boundary violations, then the rest.
- Suggest the fix; do not only name the smell.
- Point to the anti-pattern number instead of re-explaining it.
- Keep it short. A balanced review gets read; a wall of nits gets ignored.
- Scope findings to what the change touched. Pre-existing problems go under "Seen nearby", not in the blocking list.
- Do not flag a decision the project documented as a deliberate deviation.