feat(F-161): completed feature
This commit is contained in:
16
work/artifacts/F-161/architect.md
Normal file
16
work/artifacts/F-161/architect.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# F-161 — Diseño
|
||||
|
||||
## Auth boundary
|
||||
`registerCheckoutRoutes` recibe `createSessionAuthenticator` (identity) en lugar de `combinedAuth`. Las rutas admin/orders permanecen combined porque sirven ambos contextos; checkout es customer-only.
|
||||
|
||||
## Read model
|
||||
`PgOrderRepository.findById` y `findByIdAndUserId` añaden `users_profiles` y resuelven:
|
||||
- nombre: snapshot `orders_orders.customer_name` → perfil.
|
||||
- teléfono: snapshot → perfil → identity.
|
||||
- email: identity user.
|
||||
|
||||
## UI
|
||||
Las cuatro tarjetas de información siempre se renderizan. Si el backend no tiene una transacción o dirección de facturación, se comunica «No registrado»/«Misma que envío» en vez de ocultar la sección.
|
||||
|
||||
## Datos existentes
|
||||
El único pedido afectado, creado segundos después del perfil/dirección del cliente, se reasocia al identity user correspondiente. No se crea una migración heurística general.
|
||||
3
work/artifacts/F-161/documenter.md
Normal file
3
work/artifacts/F-161/documenter.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# F-161
|
||||
|
||||
El detalle admin muestra siempre Cliente, Dirección de envío, Dirección de facturación y Pago. Los datos no registrados se indican expresamente. Checkout queda ligado solo a la sesión customer.
|
||||
14
work/artifacts/F-161/implementer.md
Normal file
14
work/artifacts/F-161/implementer.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# F-161 — Implementer
|
||||
|
||||
## Cambios
|
||||
- Checkout usa auth identity y ya no puede asignar pedidos al backoffice cuando coexisten cookies.
|
||||
- Read model une `users_profiles` y resuelve nombre/teléfono con snapshots como prioridad.
|
||||
- `toOrder` vuelve a exponer `customerName/customerPhone` (se estaban descartando).
|
||||
- Admin usa `/orders/:id/admin`, no el endpoint customer limitado al propietario.
|
||||
- Cliente, envío, facturación y pago siempre se muestran con fallbacks explícitos.
|
||||
- Pedido local afectado reasociado al customer correcto.
|
||||
|
||||
## Evidencia
|
||||
- 6/6 tests target PASS; tsc PASS; admin build PASS.
|
||||
- Runtime: email `info@rikrdo.es`, nombre `Ricardo Echeverriabarrena`, teléfono y dirección Benahavis presentes.
|
||||
- Facturación/pago ausentes aparecen como no registrados.
|
||||
1
work/artifacts/F-161/leader-close.json
Normal file
1
work/artifacts/F-161/leader-close.json
Normal file
@@ -0,0 +1 @@
|
||||
{"feature_id":"F-161","agent":"leader","stage":"close","verdict":"APPROVED","summary":"Order detail and checkout ownership fixed.","checks":[{"item":"all gates","ok":true},{"item":"runtime data","ok":true},{"item":"build/tests","ok":true}],"issues":[]}
|
||||
1
work/artifacts/F-161/qa.json
Normal file
1
work/artifacts/F-161/qa.json
Normal file
@@ -0,0 +1 @@
|
||||
{"feature_id":"F-161","agent":"qa","stage":"qa_gate","verdict":"APPROVED","summary":"Detalle runtime contiene cliente y envío; tarjetas de facturación/pago muestran fallback.","checks":[{"item":"email/name/phone","ok":true},{"item":"shipping address","ok":true},{"item":"missing data fallback","ok":true},{"item":"tests/build","ok":true}],"issues":[]}
|
||||
1
work/artifacts/F-161/reviewer.json
Normal file
1
work/artifacts/F-161/reviewer.json
Normal file
@@ -0,0 +1 @@
|
||||
{"feature_id":"F-161","agent":"reviewer","stage":"review_gate","verdict":"APPROVED","summary":"Se corrige la causa de ownership y el detalle deja de ocultar secciones.","checks":[{"item":"auth boundary","ok":true},{"item":"read model","ok":true},{"item":"admin endpoint","ok":true},{"item":"build/tests","ok":true}],"issues":[]}
|
||||
1
work/artifacts/F-161/security.json
Normal file
1
work/artifacts/F-161/security.json
Normal file
@@ -0,0 +1 @@
|
||||
{"feature_id":"F-161","agent":"security","stage":"security_gate","verdict":"APPROVED","summary":"Checkout queda aislado a identity auth; detalle admin sigue protegido por rol admin.","checks":[{"item":"customer ownership","ok":true},{"item":"admin RBAC","ok":true},{"item":"no PII exposure to customer route","ok":true}],"issues":[]}
|
||||
Reference in New Issue
Block a user