Sync the customer-accounts capability and the frontend-mall stats requirement into the main specs, and write the capability Purpose the archive leaves as a placeholder so strict validation stays green.
19 lines
1.3 KiB
Markdown
19 lines
1.3 KiB
Markdown
## 1. Account persistence and mutation boundary
|
|
|
|
- [x] 1.1 Add additive migrations for customer accounts, account kinds/currencies, append-only entries, and required indexes/checks.
|
|
- [x] 1.2 Initialize zero account rows for existing seeded users and every newly registered customer. Do not credit demo points here.
|
|
- [x] 1.3 Implement the Rust account module with stable-order account locking, conditional non-negative debits/freezes, atomic credits/releases, and entry insertion.
|
|
|
|
## 2. Summary contract and proof
|
|
|
|
- [x] 2.1 Add shared account-summary types, client method, localized UI strings, and fixed-data adapter compatibility.
|
|
- [x] 2.2 Expose authenticated `GET /api/me/stats` through the account service without public balance mutation endpoints.
|
|
- [x] 2.3 Add API integration tests for zero initialization, summary ownership, immutable entries, available-to-frozen transfer, and competing insufficient debits.
|
|
|
|
## 3. Mall migration and verification
|
|
|
|
- [x] 3.1 Replace buyer-center and points-page `USER_STATS` reads with the shared account summary API.
|
|
- [x] 3.2 Remove affected stats fixture imports while keeping the fixed-data adapter rollback path intact.
|
|
- [x] 3.3 Seed and browser-smoke the live buyer account summary.
|
|
- [x] 3.4 Run cargo test for vmall-api, the mall build, and strict validation for this OpenSpec change.
|