Pull Request
Pre-flight checklist
- • Scope is focused; no unrelated refactors.
- • Code is formatted (
gofmt,goimports). - • No secrets checked in (env files, credentials, tokens).
- • Behavior changes are tested (at least targeted tests; full suite when appropriate).
- • For review mutations: aggregates update in the same DB transaction and outbox events are emitted (if relevant).
- • Product responses still do not include reviews (if touching product endpoints).
Testing guidance
Default (unit tests, containerized toolchain):
bash
docker run --rm -v "$PWD":/src -w /src golang:1.25.6-alpine sh -c "go test ./..."
Optional integration concurrency test (when relevant):
bash
RUN_INTEGRATION=1 docker run --rm -v "$PWD":/src -w /src golang:1.25.6-alpine sh -c "go test ./... -run TestConcurrentReviewCreates_UpdateAggregates"
PR description template
Use this structure:
markdown
## Summary - <What changed and why> - <Any user-facing/API impact> ## Test plan - [ ] `go test ./...` (or targeted packages) - [ ] Manual check: <endpoint / scenario> (if applicable) - [ ] Integration test (if applicable) ## Notes - <Risks, migrations, rollout considerations>
Review-ready final pass
- •Re-read the diff like a reviewer.
- •Ensure errors are handled and logs are not leaking sensitive info.
- •Ensure docs/config are updated if behavior or env vars changed.