19 lines
1.3 KiB
JSON
19 lines
1.3 KiB
JSON
{
|
|
"feature_id": "F-100",
|
|
"agent": "reviewer",
|
|
"stage": "review_gate",
|
|
"verdict": "APPROVED",
|
|
"reviewed_at": "2026-08-21",
|
|
"summary": "SKU is derived from the product title, deduped against the existing table, and editable in the admin. Helper is pure, well-tested, and reused by both the create-product and lazy-migration paths.",
|
|
"checks": [
|
|
{ "item": "generateSkuFromTitle normalises case, diacritics, separators; trims to 100 chars; throws on empty/punctuation-only input", "ok": true },
|
|
{ "item": "uniqueSku resolves collisions case-insensitively, truncates to 100 chars, gives up after 9999 attempts", "ok": true },
|
|
{ "item": "listAllSkus is the single source of truth for collisions; pg repository uses one query", "ok": true },
|
|
{ "item": "POST /products/sku:generate authenticates as admin, validates title, returns a collision-free SKU", "ok": true },
|
|
{ "item": "POST /products and the lazy migration in GET /products/:id/variants both reuse the helper, so existing products get a title-derived SKU", "ok": true },
|
|
{ "item": "Admin UI: SKU input validates ^[A-Za-z0-9-]+$, regenerate button calls generateSku, save on blur/Enter, friendly error on duplicate", "ok": true },
|
|
{ "item": "9 unit tests pass; backend tsc clean; admin tsc clean", "ok": true }
|
|
],
|
|
"issues": []
|
|
}
|