Commit Graph
3 Commits
Author SHA1 Message Date
Keith Solomon 0613d00fbb Add plan: live vault balance from /money endpoint
- 4 tasks: failing test, helper implementation, vaultLoop switch, smoke check
- New helper fetchLiveVaultBalance(string $user): ?int in includes/utilities.php
- vaultLoop prefers the live value, falls back to MAX(running_balance)
- Per-request cache to avoid N HTTP calls
- Test hook via $GLOBALS['liveBalanceTestHook'] for unit testing
- Falls back gracefully on API failure
2026-08-05 09:23:15 -05:00
Keith Solomon 908e2c50ab Add plan: vault balance from per-entry API value
- 9 tasks: schema migration, capture data.balance, fetchVaultRecords
  column list, vaultLoop switch to MAX, backfill helper, wire backfill,
  buildTable column, index.php header, end-to-end smoke check
- TDD: failing test in Task 2 before rewriting processLogEntries
- Idempotent schema migration via PRAGMA table_info check
- One-shot live-read backfill broadcasts latest balance to NULL rows
2026-08-03 21:41:33 -05:00
Keith Solomon e7ec343be1 Add implementation plan: Torn API v1 to v2 migration
- 8 tasks: exception class, API call rewrite, validation tightening,
  fetchAndStoreLogPage helper, processLogEntries rewrite with golden-file
  test, backfillUserLogs/syncUserLogs entry points, index.php call swap,
  end-to-end smoke check
- TDD: write the failing test before rewriting processLogEntries
- Each task is a self-contained commit
2026-08-03 12:47:59 -05:00