Memory Wiki

Untitled Session

2026-05-24 08:13 UTC · 21 messages · cli

You2026-05-24 08:14 UTC
Review T18 (re-check), T19, T20 build plans. One verdict file.
Donna2026-05-24 08:14 UTC
Tool2026-05-24 08:14 UTC
{"content": " 1|# Past Faults Log — Profe Core Modules\n 2|\n 3|> **Purpose:** Every bug, design miss, and edge case discovered during development is recorded here.\n 4|> Future modules (and future TBs) MUST read this log before writing code.\n 5|\n 6|---\n 7|\n 8|## ...
Tool2026-05-24 08:14 UTC
{"content": " 1|# Build Plan: T18 — order_management (Order/Payment Records, Refunds, Invoices)\n 2|\n 3|**Module:** Module 3 — Billing\n 4|**Build Order:** 4 of 6 (Module 3)\n 5|**Predecessor:** T15 (stripe_service), T16 (checkout_service), T17 (webhook_handler)\n 6|**Subseq...
Tool2026-05-24 08:14 UTC
{"content": " 1|# Build Plan: T19 — billing_admin (Billing Admin API)\n 2|\n 3|**Module:** Module 3 — Billing\n 4|**Build Order:** 5 of 6 (Module 3)\n 5|**Predecessor:** T15 (stripe_service), T16 (checkout_service), T17 (webhook_handler), T18 (order_management)\n 6|**Subseque...
Tool2026-05-24 08:14 UTC
{"content": " 1|# Build Plan: T20 — rate_limiter (API Rate Limiting for Billing Endpoints)\n 2|\n 3|**Module:** Module 3 — Billing\n 4|**Build Order:** 6 of 6 (Module 3)\n 5|**Predecessor:** T15 (stripe_service), T16 (checkout_service), T17 (webhook_handler), T18 (order_managemen...
Donna2026-05-24 08:14 UTC
Let me read the remaining sections of all three plans.
Tool2026-05-24 08:14 UTC
{"content": " 501|8. Return updated order\n 502|\n 503|**`partialRefund(string $orderUuid, float $amount, string $reason): array`:**\n 504|1. Find order — throw 404 if not found\n 505|2. If status is 'refunded', throw 409 (already fully refunded)\n 506|3. Calculate total refunded so far ...
Tool2026-05-24 08:14 UTC
{"content": " 501| $params\n 502| ) ?? [];\n 503|\n 504| return [\n 505| 'events' => $events,\n 506| 'total' => $total,\n 507| 'page' => $page,\n 508| 'per_page' => $perPage,\n 509| 'total_...
Tool2026-05-24 08:14 UTC
{"content": " 501| */\n 502| public function attempt(string $key, int $maxAttempts = 60, int $decaySeconds = 60): bool\n 503| {\n 504| if (!$this->config->getBool('rate_limiter.billing_endpoints_enabled', true)) {\n 505| return true; // Rate limiting disabled gl...
Donna2026-05-24 08:14 UTC
Tool2026-05-24 08:14 UTC
{"content": " 1001| public function checkAdminAccessWithCsrf(): bool\n 1002| {\n 1003| if (!$this->checkAdminAccess()) { return false; }\n 1004|\n 1005| try {\n 1006| global $profeContainer;\n 1007| if (isset($profeContainer) && $profeContainer->has('...
Donna2026-05-24 08:14 UTC
Let me check T17's webhook handler plan to verify the payload format for the `payment_succeeded` event.
Tool2026-05-24 08:14 UTC
{"total_count": 1, "files": ["/root/.hermes/plans/task-t17-build-plan.md"]}
Donna2026-05-24 08:14 UTC
Tool2026-05-24 08:14 UTC
{"total_count": 5, "matches": [{"path": "/root/.hermes/plans/task-t17-build-plan.md", "line": 109, "content": "| `profe/billing/payment_succeeded` | `{userId: int, paymentId: string, amount: float, eventId: string}` | `checkout.session.completed`, `invoice.paid` | Payment confirmed |"}, {"path": "/r...
Donna2026-05-24 08:14 UTC
Now let me check the T17 event payload specification more carefully.
Tool2026-05-24 08:14 UTC
{"content": " 105|### Events Emitted\n 106|\n 107|| Event | Payload | Stripe Event | When |\n 108||-------|---------|-------------|------|\n 109|| `profe/billing/payment_succeeded` | `{userId: int, paymentId: string, amount: float, eventId: string}` | `checkout.session.completed`, `invoice...
Donna2026-05-24 08:14 UTC
I now have all the data needed. Let me write the verdict file.
Tool2026-05-24 08:14 UTC
{"bytes_written": 7061, "dirs_created": true, "lint": {"status": "skipped", "message": "No linter for .md files"}}
Donna2026-05-24 08:14 UTC
## Summary **What I did:** Reviewed T18 (re-check), T19, and T20 build plans against all active faults from the past faults log. **Files created:** `/root/.hermes/plans/review-gs-plans-t18-t19-t20.md` **Findings:** | Task | Verdict | Key Issue | |------|---------|-----------| | **T18 — order_management** | **BLOCKED** | userUuid fix is incomplete. T18's event listener maps `$payload['userId']` (int, per T17 spec) to `userUuid` parameter, but T17's `payment_succeeded` event has `userId: int` — not a UUID string. The `createFromPayment()` method then queries `WHERE uuid = :uuid` with an integer value that won't match any CHAR(36) UUID. | | **T19 — billing_admin** | **GREEN LIGHT** | All 10 fault checks pass. Clean read-heavy admin module. 16 tests. | | **T20 — rate_limiter** | **GREEN LIGHT** | All 10 fault checks pass. Well-designed Redis+DB dual-backend. 16 tests. | **All other faults verified across all three plans:** - FAULT-004 (CSRF): ✅ all mutation endpoints protected - FAULT-005/009 (≥12 tests): ✅ T18=17, T19=16, T20=16 - FAULT-006 (PHP migrations): ✅ T18 + T20 have migration classes; T19 has none (no new tables) - FAULT-002/007 (direct profe_users documented): ✅ T18 + T19 have FAULT-002 comments; T20 N/A - FAULT-008 (deps injected): ✅ all three verify via reflection test **Issue encountered:** The T18 event listener still has the original userUuid bug — it passes an integer `userId` where a UUID string is expected. The fix requires resolving `userId` to `userUuid` via a `SELECT uuid FROM profe_users WHERE id = :id` lookup in the listener before calling `createFromPayment()`.