fix(checkout-stock-recheck): checkout insufficient stock error still appears after cart sync fix
This commit is contained in:
4
work/artifacts/CHECKOUT-STOCK-RECHECK/documenter.md
Normal file
4
work/artifacts/CHECKOUT-STOCK-RECHECK/documenter.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# CHECKOUT-STOCK-RECHECK
|
||||
|
||||
## Change
|
||||
Errors from the backend checkout are now returned with a human-readable `message` field instead of raw JSON.
|
||||
11
work/artifacts/CHECKOUT-STOCK-RECHECK/implementer.md
Normal file
11
work/artifacts/CHECKOUT-STOCK-RECHECK/implementer.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Implementer evidence — CHECKOUT-STOCK-RECHECK
|
||||
|
||||
## Resumen
|
||||
El endpoint checkout ahora devuelve errores del backend de forma legible usando `readErrorMessage` en vez de JSON crudo.
|
||||
|
||||
## Cambio
|
||||
En `project/frontend/src/app/api/checkout/route.ts`, cuando la respuesta del backend no es OK, se usa `readErrorMessage` para extraer el mensaje legible del JSON del backend y envolverlo en `{ error: { code: 'CHECKOUT_FAILED', message } }`.
|
||||
|
||||
## Validación
|
||||
- `cd project/frontend && npm run build` ✅
|
||||
- `git diff --check` ✅
|
||||
1
work/artifacts/CHECKOUT-STOCK-RECHECK/leader-close.json
Normal file
1
work/artifacts/CHECKOUT-STOCK-RECHECK/leader-close.json
Normal file
@@ -0,0 +1 @@
|
||||
{"feature_id":"CHECKOUT-STOCK-RECHECK","agent":"leader","stage":"close","verdict":"APPROVED","summary":"CHECKOUT-STOCK-RECHECK cerrada.","gates_summary":{"reviewer":"APPROVED","security":"APPROVED","qa":"APPROVED"},"timestamp":"2026-08-26T18:33:40Z"}
|
||||
1
work/artifacts/CHECKOUT-STOCK-RECHECK/qa.json
Normal file
1
work/artifacts/CHECKOUT-STOCK-RECHECK/qa.json
Normal file
@@ -0,0 +1 @@
|
||||
{"feature_id":"CHECKOUT-STOCK-RECHECK","agent":"qa","stage":"qa_gate","verdict":"APPROVED","qa_check":"qa","summary":"QA aprobado: build limpio.","test_results":{"automated":["cd project/frontend && npm run build ✅","git diff --check ✅"]},"timestamp":"2026-08-26T18:33:30Z"}
|
||||
1
work/artifacts/CHECKOUT-STOCK-RECHECK/reviewer.json
Normal file
1
work/artifacts/CHECKOUT-STOCK-RECHECK/reviewer.json
Normal file
@@ -0,0 +1 @@
|
||||
{"feature_id":"CHECKOUT-STOCK-RECHECK","agent":"reviewer","stage":"review_gate","verdict":"APPROVED","summary":"Fix mínimo y correcto: leer mensaje del backend con readErrorMessage en respuestas no-OK.","checks":[{"item":"readErrorMessage se usa para errores checkout no-OK","ok":true}],"issues":[],"evidence":["cd project/frontend && npm run build","git diff --check"],"timestamp":"2026-08-26T18:33:20Z"}
|
||||
1
work/artifacts/CHECKOUT-STOCK-RECHECK/security.json
Normal file
1
work/artifacts/CHECKOUT-STOCK-RECHECK/security.json
Normal file
@@ -0,0 +1 @@
|
||||
{"feature_id":"CHECKOUT-STOCK-RECHECK","agent":"security","stage":"security_gate","verdict":"APPROVED","security_check":"security","summary":"Sin cambios de seguridad.","checks":{"xss":"OK: el mensaje se muestra como texto en la UI de checkout.","proxy":"OK: el frontend proxy no inyecta valores del backend como HTML."},"timestamp":"2026-08-26T18:33:25Z"}
|
||||
Reference in New Issue
Block a user