This commit is contained in:
1 parent
e2eaa7ae40
commit
dac8f2c9ea
1 file changed
+11
@@ -245,6 +245,17 @@ Four jobs run inside the container via `CloudronManifest.json` → `addons.sched
|
||||
same-day current orders, and is never reported without a date to attribute it
|
||||
against. On demand: `POST /admin/unmapped-check`.
|
||||
|
||||
**Spend-consistency check** — on 2026-11-05 the portal's all-time-spend aggregate
|
||||
failed *soft*: its copy of the gateway's LiteLLM DB credential had gone stale, the
|
||||
query returned nothing, and every surface showed $0 while looking clean — the
|
||||
portal was the thing that was wrong. `check_spend_consistency()` compares two
|
||||
genuinely independent reads: the portal's SpendLogs aggregate over its own DB
|
||||
credential, and LiteLLM's own HTTP API (`/global/spend/keys`) over the master key.
|
||||
An EMPTY/$0 portal aggregate while LiteLLM reports real spend is a FAILURE named
|
||||
as the stale-credential case, and an API side with no keys is a failure rather
|
||||
than agreement. Silent when they agree; a read that cannot be made is `skipped`,
|
||||
never clean. On demand: `POST /admin/spend-check`.
|
||||
|
||||
**Notice policy (all of the above):** email `info@` only when there is a
|
||||
problem, and only about what is NEW. What a human has been told is a growing SET
|
||||
of keys in `portal_state` (`order:grant` / `order:hold`, `slug:class`) — a set
|
||||
|
||||
Reference in new issue
Block a user