Repository navigation
Fix: Price rows booked at $0 before the price map loaded - #1002
Conversation
The price map loads in the background, so requests in the first seconds after start were stored partial at $0 (acc_fallback reason=unpriced) and under-counted total cost. The recorder now remembers the rows it wrote partial with billed tokens and no cost, and prices them from their own tokens once the model has a price. The monthly spend rollup follows. No request is held, so no latency is added. Refs #920 Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: DAVID BOAZ <[email protected]>
A/B result: the fix repairs the startup race; rows 9 and 20 did not reproduceI rebuilt the A/B harness (the old one was lost) and ran both variants in real time, 14 minutes each, with pauses of 330 to 400 s. The proxy fetches the real LiteLLM price map through a proxy that delays the fetch by 4 s, so the first requests hit the startup race.
Limits
Harness: Assisted-By: Claude (Anthropic AI) [email protected] |
boazdavid
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (glm, user of @boazdavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.241 | offload-review skill, @boazdavid's session | fresh | 2 of 2 | 1 of 2 | 67340e3ac59e |
blocking |
Verdict: blocking
Findings
-
dash/reprice.go:101-105 — a repriced row is marked
completewhile itscg_llm_cost_usdstays an unknown $0- What fails: a request with compaction calls, written before the price map loaded, has
CostUSD = 0andCGLLMCostUSD = 0(proxy/dashcapture.go:782-791 prices the cg half from the same unloaded map and leaves it 0 whencgPricedis false). The reprice setscost_usdand flipstoken_accountingtocomplete, but never pricescg_llm_cost_usd, and the cg token counts are not stored on the row, so no later pass can recover it. The schema's own rule (dash/schema.go:55-57) says a 0 cost column withtoken_accounting <> 'complete'must read as unknown, not as free. After the reprice the row reads complete, socg_llm_cost_usd = 0reads as "context-guru spent nothing on this request".metrics_export.goNetSavedUSDsubtractsCGLLMCostUSD, andtenant_spend/cg_tenant_cg_llm_cost_usdunder-count the same window the PR fixes. The unknown marker is removed while part of the cost is still unknown. - Proof: proxy/dashcapture.go:742-743 sets
priced = falsewhen the map has not loaded; proxy/dashcapture.go:782-791 then skipse.CGLLMCostUSD. dash/reprice.go:26-28 copies only the request's own token tiers, sopriceCoston the copy cannot compute a cg figure. dash/reprice.go:101-105 updatescost_usd,baseline_cost_usd,cache_saved_usd,billed_token_factor,token_accounting— notcg_llm_cost_usd. The insert schema (dash/store.go:580-601) stores no cg token counts, so the figure is unrecoverable after the write. - Fix: do one of these. (a) Carry the cg model and cg token tiers on the copy (the capture site has them at write time) and price
cg_llm_cost_usdin the same UPDATE. (b) Keep a marker: leave a flag or a distinct accounting value on rows whose cg half is unpriced, so readers can render it as unknown. Name the choice in the PR body either way; today it is in neither "Change" nor "Not fixed".
- What fails: a request with compaction calls, written before the price map loaded, has
-
dash/reprice.go:22 — a bypassed request counted late is never repriced, so it stays partial at $0 forever
- What fails: a bypassed request has
TokensBefore = 0at write time, sopriceCostlabels itAccountingMissingwhen the price is unknown (dash/event.go:887-894).noteUnpricedrequiresAccountingPartial, so the row is never queued. The count worker then fillstokens_beforeand flips the row topartial(dash/store.go:1165-1171). The row now has billed tokens, a model, and cost $0 — exactly the case the PR says it fixes ("rows this process wrote with billed tokens and no price") — but it is no longer inunpricedand nothing re-examines it. It stays $0 for the life of the database. - Proof: dash/event.go:887-894 chooses
AccountingMissingwhenTokensBefore <= 0. dash/reprice.go:22 returns early one.TokenAccounting != AccountingPartial. dash/store.go:1168 setstoken_accounting = 'partial'after the write, andnoteUnpricedruns only once, at write time (dash/capture.go:553). - Fix: also treat a late-counted bypass row as unpriced. Either queue a row in
countLoop/setBypassTokenswhen it flips topartialat $0 with billed tokens, or make the reprice pass find such rows in the database. If you choose to leave it out, name it under "Not fixed" in the PR body.
- What fails: a bypassed request has
Non-blocking
- dash/reprice.go:33-35 — the
maxUnpricedeviction (drop the oldest at 4096) has no test. The main pass is tested; the bound is not. - dash/reprice.go:109 —
res.RowsAffected()error is discarded. On errornreads 0, the row is dropped fromkeep, and it is never retried, so it stays $0 with no log line. Rare, but a silent drop. - dash/reprice.go:82-85 — re-appending
keepin front ofr.unpricedcan push the list pastmaxUnpriced; the cap is trimmed only one row per new write. A soft overrun, bounded by one pass's keeps. - dash/capture.go:489 — the comment "Nothing else writes to the database" is now stale:
repriceLoopwrites too, ascountLoopand the migrations already did. - Rows waiting in
unpricedatCloseare dropped. They become "rows from a previous process", which the PR body names as not fixed, so this stays inside the stated scope.
What I checked
- The full diff of 67340e3 against b49cbeb, and the code around each change:
dash/capture.go,dash/reprice.go,dash/reprice_test.go,cmd/context-guru-proxy/main.go,docs/data-dependence.md. - The write-time pricing path:
dash/event.goPrice/priceCost,dash/accountant_price.goPriceMode,proxy/dashcapture.gofinish(usage, pricer, cg cost, rejected requests). - The store:
insertBatchand itstenant_spendupsert,monthKey,setBypassTokens, therequestsschema (id INTEGER PRIMARY KEY AUTOINCREMENT, so no id reuse across the janitor's deletes), WAL andbusy_timeoutin the DSN. - Concurrency:
unpricedMuswap inrepricePassagainstnoteUnpricedon the writer goroutine;wg/doneshutdown ofrepriceLoop;modelinfo.Pricer/Chain.Priceandlitellm.Priceare in-memory lookups, so the pass never blocks on network. - The guard in
applyReprice(token_accounting = 'partial' AND cost_usd = 0): no double rollup, no overwrite of a row priced another way, no effect on rows from another process. - Data dependence: the
unpricedcopy holds only ids, timestamps, tenant, model, and token counts — metadata only.docs/data-dependence.mdhas the matching row. - The PR body: it names the behavior change (stored history and monthly spend go up) and asks the owner, as CLAUDE.md requires. Both findings above are cases the body does not name.
- Read-time consumers of
token_accounting(spendexplain.go,adaptcompaction.go,adapttools.go,kvcache.go): a repriced row now counts as complete for them, which is the intended direction. - The test's arithmetic against
Price.CostWithCacheWrite1h, and its assertions for the no-token row and the pre-process row. - Live tests were not run (not approved); this is a code read only.
boazdavid
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 1 (glm, user of @boazdavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.241 | offload-review skill, @boazdavid's session | fresh | 1 of 2 | 1 of 2 | 67340e3ac59e |
blocking |
Verdict: blocking
Findings
- dash/reprice.go:22 — bypassed requests keep the #920 defect: the reprice never picks them up
- What fails: a request that runs in bypass mode while the price map has not loaded is written with
token_accounting = 'missing', not'partial'. It has billed tokens andcost_usd = 0.noteUnpricedruns at write time and requiresAccountingPartial, so it skips the row. The count worker flips the label to'partial'only later (setBypassTokens, dash/store.go:1165). By thennoteUnpricedhas already run, so the row never enters the queue. It stays at $0 forever. This is the exact defect the PR says it fixes: "Rows this process wrote with billed tokens and no price are priced once Prices knows the model." - Proof: the write-time label comes from
priceCost(dash/event.go:887-894): no price andTokensBefore == 0givesAccountingMissing. A bypassed request hasTokensBefore == 0at write time, becausePipeline.Runreturns early on bypass and leaves the count at zero (components/pipeline.go:82-90), and the count is filled off-path (apply/apply.go:819setsBypassCount;dash/capture.goenqueueCount). The filter at dash/reprice.go:22 (e.TokenAccounting != AccountingPartial) then excludes the row. The store comment confirms the sequence: "Priced with the count still unknown, such a row is labelled 'missing'; with a count it is 'partial'" (dash/store.go:1162-1164). - Fix: also enqueue rows with
AccountingMissingwhen they have billed tokens andcost_usd = 0(the reprice's ownWHERE token_accounting = 'partial'guard must then accept both labels), or note the row whensetBypassTokensflips it to'partial'. Add a test with a bypassed event that hasBypassCountand a late price.
- What fails: a request that runs in bypass mode while the price map has not loaded is written with
Non-blocking
- The reprice does not recompute
cg_llm_cost_usdfor the same rows. When the price map is late, the cheap-model call cost also stays 0 (proxy/dashcapture.go:782-792skips it when not priced), andtenant_spendmisses that side too. The PR targets provider-billed cost, so this is a known limit. Say it in the PR or the code comment if it stays. - No test covers
maxUnpriced(the drop-oldest bound) or theRowsAffected() == 0path inapplyReprice(a row changed or deleted between note and pass). Both paths are simple, but they are new behavior with no test. - Process check, per CLAUDE.md's behavior-change rule: rows that read "unknown cost" now show a priced cost, and
tenant_spend— the number the spend cap reads — now counts them. Name this change at the top of the PR (who it affects, old and new behavior), and have the human confirm it. I did not read the PR body in round 1, so I cannot verify it is there.
What I checked
- The full diff:
cmd/context-guru-proxy/main.go,dash/capture.go,dash/reprice.go,dash/reprice_test.go,docs/data-dependence.md. - The pricing path end to end:
proxy/dashcapture.gofinishandPriceMode(price, usageOK && priced),dash/accountant_price.goPriceMode/accOverride,dash/event.goPrice/priceCost,internal/modelinfoPrice.Zero/CostWithCacheWrite1h/Pricer/Chain.Price, andcmd/context-guru-proxy/main.gomodelWindows/priceResolver. I confirmed that apartialrow with billed tokens can only be partial because no link could price the model (usage is zero unlessusageOK, and rejected requests book no saving), so forcingaccountingComplete = truein the reprice is right for the rows it touches. - Double-count risk on
tenant_spend: the write-time insert addsCostUSD + CGLLMCostUSD(0 for these rows), andapplyRepriceadds the repricedCostUSDonce, in the same transaction as the row update, guarded bytoken_accounting = 'partial' AND cost_usd = 0. Ids areAUTOINCREMENT, so a reused id cannot hit another row. No double count found. - Savings side: a repriced row gets
baseline_cost_usd = cost_usdand books no saving. This is correct — the accountant result is not stored, so the saving cannot be re-derived. The row's savings read as zero, not as unknown; the cost side is honest. - Races:
noteUnpriced(writer goroutine) andrepricePassshareunpricedunderunpricedMu; DB work runs outside the lock;repriceLoopis counted inwgbeforeNewRecorderreturns, soClosecovers it.setBypassTokensandapplyRepricecannot corrupt each other's label flips (the CASE guard insetBypassTokensonly fires on'missing'). - Fail-open: an
applyRepriceerror logs a warning and keeps the row queued; no request path is touched; the copy kept inunpricedcarries counts and ids only, no content. The data-dependence row is updated and stays at the metadata level. - The test itself: I traced the arithmetic (
CostWithCacheWrite1hwithCacheWrite1h = 0), the late-loader sequencing, and the three control rows (noTokens,hist). The assertions match the code. Live tests were not run; Go is not installed here.
…ion call unknown Review of #1002, round 1. - A request run in bypass mode before the price map loaded is written "missing" and becomes "partial" only when the count worker fills in its token count, after the reprice queue was fed. It never entered the queue and stayed $0. The queue and the update guard now take "missing" too. - A row whose compaction calls could not be priced (Event.CGCostUnpriced, set at capture) is no longer repriced. Repricing it marked the row complete while cg_llm_cost_usd was still an unknown $0, which readers take for "context-guru spent nothing". It stays partial at $0, which they take for unknown. - A RowsAffected error is returned, so the row is kept and retried. - Rows put back by a pass that found no price can no longer take the queue past maxUnpriced. - The stale "nothing else writes" comment is corrected. Refs #920 Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: DAVID BOAZ <[email protected]>
Replies to the round 1 findingsCommit 2fe288d fixes both blocking findings. I checked each claim in the code before I changed it. Finding 1 (both reviewers): a bypassed row is never repriced. Fixed.
Finding 2 (reviewer 2; non-blocking for reviewer 1): a repriced row hides an unknown compaction cost. Fixed with option (b), a marker. No schema change.
Non-blocking points
Checks: |
boazdavid
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (glm, user of @boazdavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.241 | offload-review skill, @boazdavid's session | resumed | 2 of 2 | 2 of 2 | 2fe288dddff4 |
approve |
Verdict: approve
Findings
None.
Round 1 findings, re-checked
- cg_llm_cost_usd read as free under a
completelabel (my finding 1) — fixed. The capture site now setsEvent.CGCostUnpricedwhen compaction calls could not be priced (proxy/dashcapture.go:789-793).noteUnpricedskips such a row (dash/reprice.go:27), so it stays partial at $0, which readers take for unknown. That is my option (b), with no schema change. The flag isjson:"-"and absent from the insert, so nothing is stored and the data-dependence row stays true. Verified: the flag is set afterPriceMode(proxy/dashcapture.go:778), on a fresh event per request, so no stale carry-over. New testTestRecorderLeavesARowWithAnUnpricedCompactionCallUnknowncovers it. - A bypassed row counted late was never repriced (my finding 2; reviewer 1's finding 1) — fixed.
noteUnpricednow queuesmissingrows too (dash/reprice.go:26), and the update guard takes both labels (dash/reprice.go:111-113). I checked both orderings againstsetBypassTokens(dash/store.go:1165-1171): if the reprice completes the row first, the worker'sCASE WHEN token_accounting = 'missing'leavescompletealone and only fillstokens_before; if the worker runs first, the row ispartialand still matches the guard. Amissingrow whose count never arrives is also repriced, which matches write-time behavior (a known price completes such a row withtokens_before = 0too). New testTestRecorderRepricesABypassedRowBookedBeforeThePriceMapLoadedcovers it. - Non-blocking points — all addressed.
TestUnpricedQueueIsBoundedcovers the cap and found a real overrun (4116 rows after a no-price pass); the re-queue now trims to the cap, oldest first (dash/reprice.go:90-92). TheRowsAffectederror is returned, so the row is retried (dash/reprice.go:117-120). The stale writer comment is corrected (dash/capture.go:487-488).
Non-blocking
- The fix for finding 1 leaves a named gap: a request that made compaction calls before the price map loaded is not repriced at all, so its provider cost also stays $0. The author named this in the reply. The row reads as unknown, not as free, so the failure direction is safe. Option (a) from my round 1 (store the cg model and token tiers, price both halves) closes it; worth a follow-up issue.
- The A/B run in the comments exercised the startup race only. The bypassed and unpriced-cg paths are covered by unit tests, not the live run.
- The author's A/B report says rows 9 and 20 of the original run did not reproduce, so this PR does not close #920. Stated plainly in both the PR body and the comment. Nothing to check further.
What I checked
- Last review: round 1, 67340e3, 2026-11-10T09:16:03Z
- New commits read: 1 (2fe288d "fix(dash): Reprice bypassed rows; leave rows with an unpriced compaction call unknown")
- Read in full: 2 reviews, 2 comments, 0 inline comments (from the three files)
- New items since my last review: the author's reply comment (2026-11-10T09:26:41Z) — I checked each claim against the code; commit 2fe288d — full diff and the changed files around each change. The A/B comment (09:07:12Z) predates my round-1 review but was unread then; I read it in full now.
- The full diff of 2fe288d:
dash/capture.go,dash/event.go,dash/reprice.go,dash/reprice_test.go,proxy/dashcapture.go. - The final state of
dash/reprice.goin full: the queue gate, the copy, the pass, the cap trim, and theapplyRepricetransaction with the two-label guard and the checkedRowsAffected. - The
CGCostUnpricedflag: set only inside the cg-calls block at capture, never stored, never read except bynoteUnpriced. No other event source sets it, and pings carry no cg calls. - The three new tests: traced the setup and assertions of each against the code paths they exercise, including the direct queue manipulation in
TestUnpricedQueueIsBounded(safe: the reprice ticker is one hour, so no concurrent pass). - Both orderings of
setBypassTokensagainstapplyReprice, as described above. - Reviewer 1's round-1 review: their finding 1 is my finding 2, fixed as above; their non-blocking points (cg cost, cap and
RowsAffectedtests, the process check) are all addressed — the PR body names the behavior change and the owner decision, which I verified in round 1. - Live tests were not run (not approved); this is a code read only.
boazdavid
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 1 (glm, user of @boazdavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.241 | offload-review skill, @boazdavid's session | resumed | 1 of 2 | 2 of 2 | 2fe288dddff4 |
approve |
Verdict: approve
Findings
None.
Earlier findings
- Mine, round 1 — bypassed requests never entered the reprice queue. Fixed in 2fe288d.
noteUnpricednow queuesmissingrows too (dash/reprice.go:26), andapplyReprice's guard takes both labels (dash/reprice.go:111-113). I traced the ordering: the row is queued at write time asmissing, the count worker may flip it topartialbefore or after a pass, and both orders land right —setBypassTokens's CASE only fires onmissing, and the reprice'sIN ('partial','missing')matches either. The new testTestRecorderRepricesABypassedRowBookedBeforeThePriceMapLoadedcovers the sequence. - Reviewer 2, round 1, finding 1 — a repriced row hid an unknown
cg_llm_cost_usd. Fixed with their option (b). I checked it myself:proxy/dashcapture.gosetsEvent.CGCostUnpricedwhen compaction tokens exist and the cg model has no price,noteUnpricedskips such a row (dash/reprice.go:27), and it stayspartialat $0, which readers take for unknown. The consequence is named by the author: such a row is not repriced at all, so its provider cost stays unknown. That is the conservative direction, and option (a) remains open for later. I accept it. - Reviewer 2, round 1, finding 2 was the same bypass defect as my finding 1. Fixed as above.
- My non-blocking points. All addressed:
TestUnpricedQueueIsBoundedcovers themaxUnpricedbound and exposed a real overrun (a pass that found no price could re-queue past the cap), now trimmed oldest-first (dash/reprice.go:90-92). TheRowsAffectederror is returned and the row retried (dash/reprice.go:117-120). The stale "nothing else writes" comment is corrected. My process point is satisfied: the PR body names the spend increase under "Decision for the owner" and asks for the human yes, as CLAUDE.md requires. Mycg_llm_cost_usdnote became reviewer 2's finding, fixed as above.
Non-blocking
- The PR body's "Change" list is now behind the code: it does not name the bypassed-row fix or the
CGCostUnpricedcarve-out. The reply comment documents both. Update the body so a reader who sees only the description gets the full behavior. - The known gap stands, named by the author: a request whose compaction call could not be priced is not repriced, so its provider cost also stays unknown. Option (a) — store the cg token tiers and price both halves — would close it.
- I did not run the tests. Go is not installed here and live tests are not approved. The author reports
go test ./dash ./proxy,go vetandgofmt -lclean.
What I checked
- Last review: round 1, 67340e3, 2026-11-10T09:17:03Z.
- New commits read: 1 — 2fe288d "fix(dash): Reprice bypassed rows; leave rows with an unpriced compaction call unknown".
- Read in full: 2 reviews, 2 comments, 0 inline comments (from the three files; the inline list is empty).
- New items since my last review: the author's reply comment at 2026-11-10T09:26:41Z (checked every claim in the code — all hold), and commit 2fe288d (reviewed below). The A/B comment at 09:07:12Z predates my round-1 review; I read it in full now: it measures the startup race repaired and reports rows 9 and 20 as not reproduced, a null result the PR body already carries under "Not fixed".
- The new commit's diff in full:
dash/capture.go(comment),dash/event.go(CGCostUnpriced, not stored,json:"-"),dash/reprice.go(queue both labels, cap trim, error return, guardIN (?, ?)),dash/reprice_test.go(three new tests),proxy/dashcapture.go(theelsethat sets the marker). - The new
missingacceptance for harm: amissingrow with billed tokens is missing only because no price link answered (usage is zero unlessusageOK), so repricing it is the write-time arithmetic.setBypassTokensandapplyRepricecannot corrupt each other's label in either order.tokens_beforeis filled by the count worker regardless of the label. - The
CGCostUnpricedgate for holes: it is set only when compaction tokens exist and the cg half has no price; a row with a priced main model is complete at write and never queued; a row with a priced cg half and an unpriced main model is queued and repriced with both halves known; a call with no tokens books a true $0. - The new tests' logic and arithmetic, including the hardcoded id 1 (first insert into a fresh
AUTOINCREMENTdatabase) and the directrepricePasscall with a 1-hour ticker that cannot fire during the test. - The final state of
dash/reprice.go,dash/capture.go:485-560,dash/event.go:288-296,proxy/dashcapture.go:782-794, and the PR title and body.
Bring the PR up to date with main; no conflicts, no hand resolution. Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
One conflict in docs/data-dependence.md: both sides edited the Dashboard database row. Kept main's text and added the #920 sentence. Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
Merge of main
Tests on the merged tree (shared box,
|
Bring in #720; no conflict, no hand resolution. Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
Merge of main (#720)
|
…tartup (#1172) The reprice pass (#1002) also prices a row's compaction call. A row written in the first seconds after a start, before the price map loads, for a request that also made compaction calls, stayed partial at $0 for good: neither cost_usd nor cg_llm_cost_usd was priced. Behavior change: those dashboard rows. Old: partial at $0 for good. New: once the map loads, the reprice pass prices both halves, marks the row complete, and adds both halves to tenant_spend. Turn it off: no separate switch; Options.Prices = nil turns off the whole reprice pass, as before. Owner's yes, 2026-11-16, in the integrator session: "yes" (to the behavior changes of #1150, #1173, #1165, #1139, #1172 and #1140). Data dependence: unchanged (metadata only). Row: docs/data-dependence/features/dashboard-database.md. Reviews: 2 offload review rounds (Claude backend). Round 2: both approve at df9c251, which is the PR head. CI passed on a fresh merge with main after #1150 and #1165 (the eval box was down; owner: merge on CI and reviews until it is back). Signed-off-by: DAVID BOAZ <[email protected]> Assisted-By: Claude Opus 5.5 <[email protected]>
Problem
The price map loads in the background. Requests in the first seconds after start are stored
token_accounting=partialat cost $0 (acc_fallback reason=unpriced), so total cost under-counts the bill. Refs #920.Change
repriceLoop(dash/reprice.go, every 15 s) prices them from their own tokens oncePrices.Priceknows the model. It updatescost_usd,baseline_cost_usd,cache_saved_usd,billed_token_factorandtoken_accounting=complete, and thetenant_spendrollup in the same transaction.missingand becomespartialonly when the count worker fills in its token count, so the queue and the update guard take both labels.Event.CGCostUnpriced, set at capture, not stored) is not repriced. It stayspartialat $0, which readers take for unknown. Repricing it would mark the row complete whilecg_llm_cost_usdwas still an unknown $0.Not fixed
Decision for the owner
Repricing changes stored history:
cost_usdgoes from 0 to a real value, so monthly spend goes up. This needs a human yes before merge.Tests
TestRecorderRepricesRowsBookedBeforeThePriceMapLoaded(written first; failed to compile until the options existed): partial at $0 before the load, priced after, baseline andtenant_spendfollow, rows with no tokens and rows from before the start are untouched.go test ./dash ./proxypasses.go vetandgofmt -lare clean.go test ./cmd/context-guru-proxyhas 2 failures (TestPreflightReadsKeyEnvFromConfigNotComments,TestPreflightResolvesToolsOnTheServicePATH,install.sh: in_service_path: command not found). The agent reports they fail the same way without this change; I did not confirm it.Assisted-By: Claude (Anthropic AI) [email protected]