fix(loyalty): resolve critical production readiness issues
Some checks failed
CI / ruff (push) Successful in 11s
CI / validate (push) Successful in 26s
CI / dependency-scanning (push) Successful in 32s
CI / pytest (push) Failing after 3h8m55s
CI / docs (push) Has been cancelled
CI / deploy (push) Has been cancelled

- Add pessimistic locking (SELECT FOR UPDATE) on card write operations
  to prevent race conditions in stamp_service and points_service
- Replace 16 console.log/error/warn calls with LogConfig.createLogger()
  in 3 storefront JS files (dashboard, history, enroll)
- Delete all stale lu.json locale files across 8 modules (lb is the
  correct ISO 639-1 code for Luxembourgish)
- Update architecture rules and docs to reference lb.json not lu.json
- Add production-readiness.md report for loyalty module

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 23:18:18 +01:00
parent 5dd5e01dc6
commit 4a1f71a312
18 changed files with 194 additions and 118 deletions

View File

@@ -1,72 +0,0 @@
{
"loyalty": {
"module": {
"name": "Treieprogrammer",
"description": "Stempel- a punktebaséiert Treieprogrammer mat Wallet-Integratioun"
},
"program": {
"title": "Treieprogramm",
"create": "Programm erstellen",
"edit": "Programm beaarbechten",
"activate": "Aktivéieren",
"deactivate": "Deaktivéieren",
"type": {
"stamps": "Stempelen",
"points": "Punkten",
"hybrid": "Hybrid"
}
},
"card": {
"title": "Treiekaart",
"number": "Kaartennummer",
"qr_code": "QR-Code",
"enroll": "Client umellen",
"deactivate": "Kaart deaktivéieren"
},
"stamp": {
"title": "Stempelen",
"add": "Stempel dobäisetzen",
"redeem": "Belounung aléisen",
"count": "{current} vun {target}",
"until_reward": "Nach {count} bis zur Belounung"
},
"points": {
"title": "Punkten",
"earn": "Punkten sammelen",
"redeem": "Punkten aléisen",
"balance": "{count} Punkten",
"per_euro": "{points} Punkten pro Euro"
},
"pin": {
"title": "Mataarbechter-PINen",
"create": "PIN erstellen",
"edit": "PIN beaarbechten",
"unlock": "PIN entspären",
"locked": "PIN gespaart bis {time}"
},
"wallet": {
"google": "Bäi Google Wallet bäisetzen",
"apple": "Bäi Apple Wallet bäisetzen"
},
"stats": {
"title": "Statistiken",
"total_cards": "Total Kaarten",
"active_cards": "Aktiv Kaarten",
"stamps_issued": "Ausgestallte Stempelen",
"rewards_redeemed": "Agelëst Belounungen"
},
"errors": {
"program_not_found": "Treieprogramm net fonnt",
"program_inactive": "Treieprogramm ass net aktiv",
"card_not_found": "Treiekaart net fonnt",
"card_inactive": "Treiekaart ass net aktiv",
"cooldown": "Waart w.e.g. {minutes} Minutten virum nächste Stempel",
"daily_limit": "Dageslimit vun {limit} Stempelen erreecht",
"insufficient_stamps": "Brauch {required} Stempelen, hutt {current}",
"insufficient_points": "Brauch {required} Punkten, hutt {current}",
"pin_required": "Mataarbechter-PIN erfuerdert",
"pin_invalid": "Ongültege PIN",
"pin_locked": "PIN gespaart wéinst ze vill Feelverséich"
}
}
}