name: pr description: >- FlexPrice PR self-review checklist — security, layering, migrations, tests. Trigger: pr check, ship review, pre-PR.
pr — pre-merge checklist
Run mentally or out loud through this list; fix gaps before requesting review.
Scope & layering
- Change lives in correct layer (handler vs service vs domain vs repo per
docs/ARCHITECTURE.md). - No new hidden globals unless unavoidable and documented (
HOTSPOTS.mdpatterns). - Tenant/environment scoping preserved for multi-tenant data paths.
Security & config
- No secrets, tokens, or production URLs committed (
.env, keys in tests). - Auth/RBAC-sensitive routes still behind correct middleware (
internal/api/router.gopatterns).
Data & migrations
- Ent schema edits accompanied by
make generate-entand migration plan (make migrate-ent/make generate-migrationper deployment). - ClickHouse changes have matching files under
migrations/clickhouse/when applicable.
API & clients
- Swagger annotations updated for new/changed endpoints; run
make swagger. - If public SDK contract changes:
make sdk-all(or agreed subset) andapi/custommerged.
Quality
-
gofmt,go veton affected scope. -
go test -raceon touched packages ormake testfor broad changes. - Prefer table-driven tests for multiple cases (
internal/service/*_test.goconventions).
Docs & graph
- Structural change updates
docs/REPO_MAP.md/DEPENDENCY_GRAPH.md/FLOWS/*when behavior or topology changes. - If Graphify is used:
graphify update .at repo root (seerepo-architecture-intelligencepersonal skill).
Tone for reviewers
Summarize intent, risk, and test evidence in the PR body (not “fixed stuff”).