feat(F-091): completed feature
This commit is contained in:
17
work/artifacts/F-091/implementer.md
Normal file
17
work/artifacts/F-091/implementer.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# F-091 — Implementer evidence
|
||||
|
||||
## Changes
|
||||
|
||||
- `project/src/modules/catalog/domain/errors.ts` now records whether a duplicate variant code is `sku` or `ean`.
|
||||
- `project/src/modules/catalog/infrastructure/pg-variant-repository.ts` maps PostgreSQL unique constraints (`*_sku_key`, `*_ean_key`) to that field while preserving the 409 uniqueness rule.
|
||||
- `project/apps/admin/src/features/products/components/sections/InventorySection.tsx`
|
||||
- Guards each SKU/EAN variant save with an in-flight key so Enter followed by blur cannot submit duplicate PATCH requests.
|
||||
- Shows `El SKU ya existe en otra variante` or `El EAN ya existe en otra variante` for 409 conflicts instead of generic `Error`.
|
||||
|
||||
## Validation
|
||||
|
||||
- Root `npm run typecheck` → exit 0
|
||||
- Root `npm test -- --run` → 133 passed, 56 skipped
|
||||
- Admin `npx tsc --noEmit` → exit 0
|
||||
- Admin ESLint on `InventorySection.tsx` → exit 0
|
||||
- SKU/EAN uniqueness remains enforced by the existing database constraints.
|
||||
15
work/artifacts/F-091/leader-close.json
Normal file
15
work/artifacts/F-091/leader-close.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"feature_id": "F-091",
|
||||
"agent": "leader",
|
||||
"verdict": "APPROVED",
|
||||
"summary": "F-091 keeps SKU/EAN uniqueness, prevents duplicate in-flight updates, and explains 409 conflicts by field.",
|
||||
"evidence": [
|
||||
"reviewer.json verdict=APPROVED",
|
||||
"security.json verdict=APPROVED",
|
||||
"qa.json verdict=APPROVED",
|
||||
"scripts/verify.sh exit 0",
|
||||
"Root tests: 133 passed, 56 skipped",
|
||||
"Root and admin typechecks exit 0"
|
||||
],
|
||||
"timestamp": "2026-08-20T19:47:30Z"
|
||||
}
|
||||
14
work/artifacts/F-091/qa.json
Normal file
14
work/artifacts/F-091/qa.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"feature_id": "F-091",
|
||||
"agent": "qa",
|
||||
"verdict": "APPROVED",
|
||||
"summary": "Variant conflict handling and duplicate-submit protection pass the complete available checks.",
|
||||
"evidence": [
|
||||
"Root npm run typecheck exit 0",
|
||||
"Root npm test: 133 passed, 56 skipped",
|
||||
"Admin npx tsc --noEmit exit 0",
|
||||
"Admin ESLint on InventorySection exit 0",
|
||||
"scripts/verify.sh exit 0"
|
||||
],
|
||||
"timestamp": "2026-08-20T19:47:20Z"
|
||||
}
|
||||
13
work/artifacts/F-091/reviewer.json
Normal file
13
work/artifacts/F-091/reviewer.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"feature_id": "F-091",
|
||||
"agent": "reviewer",
|
||||
"verdict": "APPROVED",
|
||||
"summary": "The API keeps SKU/EAN uniqueness, identifies the conflicting field from the database constraint, and the UI prevents duplicate in-flight saves while presenting actionable conflict feedback.",
|
||||
"evidence": [
|
||||
"Existing 409 uniqueness behavior is preserved",
|
||||
"SKU and EAN constraint names map to field-specific domain messages",
|
||||
"Enter plus blur is guarded by a per-field in-flight key",
|
||||
"Root and admin typechecks pass"
|
||||
],
|
||||
"timestamp": "2026-08-20T19:47:00Z"
|
||||
}
|
||||
13
work/artifacts/F-091/security.json
Normal file
13
work/artifacts/F-091/security.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"feature_id": "F-091",
|
||||
"agent": "security",
|
||||
"verdict": "APPROVED",
|
||||
"summary": "The fix does not relax uniqueness or alter authorization. Conflict messages reveal only that the submitted SKU/EAN is already in use, without exposing another variant's identity or data.",
|
||||
"evidence": [
|
||||
"Database UNIQUE constraints remain authoritative for SKU and EAN",
|
||||
"No SQL interpolation or new input path added",
|
||||
"Only field type (SKU/EAN) is returned, not conflicting records",
|
||||
"No dependencies, secrets, auth, or permission changes"
|
||||
],
|
||||
"timestamp": "2026-08-20T19:47:10Z"
|
||||
}
|
||||
Reference in New Issue
Block a user