Source
What the code does
On #75's head the accumulation reads "unknown": (spend.get("unknown", 0) if same_day else 0) + unknown (
|
"unknown": (spend.get("unknown", 0) if same_day else 0) + unknown, |
). A spend row written by the previous version the same day has no
unknown key; the first wake after the upgrade writes
0 there, so a day that already held unpriced calls reads as fully accounted. The mark cannot say "not counted before this version".
Separately, and on main: spent in the chat CLI reads total_cost_usd or usage.cost or 0 (
|
return sum(float(c.get("total_cost_usd") or (c.get("usage") or {}).get("cost") or 0) for c in calls) |
), so an envelope whose total is a true zero beside a non-zero
usage.cost is billed at
usage.cost; the documented order is total first.
Done when
A row missing the key on the same day carries a reading that says its earlier calls were not counted (a None/"unmeasured" the readers render), or the record says the day of the upgrade reads as partial by rule; spent falls back only when the total is absent (is None), with a test for a zero total beside a usage cost.
Read at a18a2a94904b. The record's wording wins over this summary; when they differ, the record is the spec.
Source
What the code does
On #75's head the accumulation reads
"unknown": (spend.get("unknown", 0) if same_day else 0) + unknown(lion1/hub/agent/agent.py
Line 1276 in 9029fb6
unknownkey; the first wake after the upgrade writes0there, so a day that already held unpriced calls reads as fully accounted. The mark cannot say "not counted before this version".Separately, and on main:
spentin the chat CLI readstotal_cost_usd or usage.cost or 0(lion1/apps/cli/lion_cli/chat.py
Line 187 in a18a2a9
usage.costis billed atusage.cost; the documented order is total first.Done when
A row missing the key on the same day carries a reading that says its earlier calls were not counted (a
None/"unmeasured" the readers render), or the record says the day of the upgrade reads as partial by rule;spentfalls back only when the total is absent (is None), with a test for a zero total beside a usage cost.Read at
a18a2a94904b. The record's wording wins over this summary; when they differ, the record is the spec.