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"
|
||||
}
|
||||
@@ -1,11 +1,15 @@
|
||||
# Feature actual
|
||||
|
||||
## Feature activa: ninguna — F-090 cerrada
|
||||
## Feature activa: F-091 (in_progress) — Duplicate SKU/EAN update conflicts are opaque and can be submitted twice
|
||||
|
||||
Backlog: 158 features (149 done, 9 pending, 0 in_progress).
|
||||
Backlog: 159 features (149 done, 9 pending, 1 in_progress).
|
||||
|
||||
Últimas features cerradas: **F-080**, **F-081**, **F-082**, **F-083**, **F-084**, **F-085**, **F-086**, **F-087**.
|
||||
|
||||
## Incidencia actual (2026-08-20)
|
||||
|
||||
El PATCH de variantes devuelve `409 PRODUCT_VARIANT_CODE_EXISTS` cuando el SKU o EAN ya está usado por otra variante. El editor muestra solo `Error` y la combinación Enter + blur puede intentar enviar dos veces. F-091 conserva la unicidad, evita envíos simultáneos y muestra el campo en conflicto.
|
||||
|
||||
## Última incidencia resuelta (2026-08-20)
|
||||
|
||||
F-090 cerrada con todos los gates aprobados. El listado ya recibe marca/caducidad y los valores SKU/EAN guardados permanecen visibles tras salir del campo.
|
||||
|
||||
@@ -1,55 +1,13 @@
|
||||
{
|
||||
"feature_id": "F-090",
|
||||
"feature_id": "F-091",
|
||||
"stage": "close",
|
||||
"agent": "leader",
|
||||
"action": "F-090 cerrado: marca/caducidad serializadas y SKU/EAN reflejan guardado",
|
||||
"state": "done",
|
||||
"action": "Validate F-091 gates and close SKU/EAN conflict fix",
|
||||
"state": "running",
|
||||
"next_agent": "leader",
|
||||
"waiting_for": "Seleccionar la siguiente feature pending",
|
||||
"updated_at": "2026-08-20T19:40:49Z",
|
||||
"waiting_for": "verify.sh green",
|
||||
"updated_at": "2026-08-20T19:47:22Z",
|
||||
"timeline": [
|
||||
{
|
||||
"ts": "2026-08-20T19:16:31Z",
|
||||
"agent": "implementer",
|
||||
"stage": "build",
|
||||
"state": "running",
|
||||
"message": "Extend taxApi.update signature to accept appliesTo enum; rebuild admin; respawn admin so port 3004 serves 200"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-20T19:28:23Z",
|
||||
"agent": "reviewer",
|
||||
"stage": "review_gate",
|
||||
"state": "running",
|
||||
"message": "Review F-088 type-only fix and build evidence"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-20T19:28:31Z",
|
||||
"agent": "security",
|
||||
"stage": "security_gate",
|
||||
"state": "running",
|
||||
"message": "Check F-088 enum validation, scope, and dependency impact"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-20T19:28:41Z",
|
||||
"agent": "qa",
|
||||
"stage": "qa_gate",
|
||||
"state": "running",
|
||||
"message": "Run F-088 regression and endpoint smoke checks"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-20T19:28:58Z",
|
||||
"agent": "leader",
|
||||
"stage": "close",
|
||||
"state": "running",
|
||||
"message": "Validate gates and repair legacy evidence metadata before closing F-088"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-20T19:29:27Z",
|
||||
"agent": "leader",
|
||||
"stage": "close",
|
||||
"state": "done",
|
||||
"message": "F-088 cerrado: admin :3004 verificado HTTP 200 y verify.sh verde"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-20T19:32:56Z",
|
||||
"agent": "leader",
|
||||
@@ -147,6 +105,48 @@
|
||||
"stage": "close",
|
||||
"state": "done",
|
||||
"message": "F-090 cerrado: marca/caducidad serializadas y SKU/EAN reflejan guardado"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-20T19:44:59Z",
|
||||
"agent": "leader",
|
||||
"stage": "intake",
|
||||
"state": "running",
|
||||
"message": "Triage repeated variant PATCH 409 and opaque SKU/EAN conflict feedback"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-20T19:45:13Z",
|
||||
"agent": "implementer",
|
||||
"stage": "build",
|
||||
"state": "running",
|
||||
"message": "Add field-specific SKU/EAN conflict messages and guard duplicate in-flight saves"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-20T19:46:54Z",
|
||||
"agent": "reviewer",
|
||||
"stage": "review_gate",
|
||||
"state": "running",
|
||||
"message": "Review duplicate variant conflict mapping and in-flight save guard"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-20T19:47:03Z",
|
||||
"agent": "security",
|
||||
"stage": "security_gate",
|
||||
"state": "running",
|
||||
"message": "Check F-091 uniqueness enforcement and error disclosure"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-20T19:47:11Z",
|
||||
"agent": "qa",
|
||||
"stage": "qa_gate",
|
||||
"state": "running",
|
||||
"message": "Run F-091 typecheck, tests, lint, and verify"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-20T19:47:22Z",
|
||||
"agent": "leader",
|
||||
"stage": "close",
|
||||
"state": "running",
|
||||
"message": "Validate F-091 gates and close SKU/EAN conflict fix"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user