Closed
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codepm-stack (Pad/Grist) in developing-today/codeeffort/sSmall: expected under 2 hours of workSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)Something isn't working (prefixed form of the classic bug label)priority/highImportant and time-sensitiveImportant and time-sensitivesource/queue-workerFiled or worked by the queue/worker pilotFiled or worked by the queue/worker pilottask/small-fixQueue packet kind: bounded fix with reproduction and targeted testsQueue packet kind: bounded fix with reproduction and targeted tests
Description
Why
Follow-up to #5468. The Atlas writer and the cleanup/remediation are already identified there, but the quota feed no longer provides a fresh storage or rows-read window, so the 5 GB storage state and the over-limit monthly rows-read state cannot be verified.
This is a quota-measurement fix only. It does not authorize deleting or rewriting Atlas data, changing a Turso plan, or spending money.
Evidence at triage
- Laptop
quota-current.jsonat2026-11-05T13:00:15.401Z: the Turso row isstate=ok,source=opencode-quota, but contains only databases (44/100), rows-written (1,672,071/10,000,000), and sync (0/3 GB). Storage and rows-read are absent. pm-stack/aggregator/src/quota-gather-map.tsdefinesentryFromTurso()to mapstorage_bytesandrows_read, but repository search found no runtime call site; the gatherer currently maps provider results withentryFromResult().pm-stack/aggregator/src/quota-current.ts:432-468overlays the latest fresh Turso entry by replacing the card's metrics with the windows present in that entry. A partial fresh entry can therefore hide previously dated storage/read metrics.- The earlier 2026-11-05 00:27Z measurement recorded 7.358009 GB storage and 821,437,321 rows-read; the 02:15Z read still recorded ~165.6% rows-read but omitted storage and rows-read windows. Those over-limit measurements are not evidence of present recovery.
- Related: fix(quota-plane): quota-gatherer failing every tick since 2026-11-04T18:45Z — auth.openCodeLocalCredentialSource is not a function #5638 records the gatherer import outage and a successful recovery at 02:21Z; the current 13:00Z sample confirms the feed is ticking but still partial.
Acceptance
- The live quota path provides authoritative Turso storage and rows-read measurements when the service response carries them, with source and measured-at timestamps preserved.
- Missing metrics are represented as missing/stale, never as zero or as proof the issue recovered; a partial fresh Turso row does not silently erase the last dated storage/read values.
- Add targeted fixtures/tests for complete, partial, and error Turso reads and the SaaS-card overlay behavior.
- Keep credentials runtime-resolved and out of source, logs, packets, and comments. No plan changes, purchases, or Atlas data mutations.
Scope
Include the quota gatherer/provider wiring and its mapping/overlay tests under pm-stack/aggregator/.
Exclude changes to the Atlas producer or mirrored data, other providers, and plan/billing changes. Validate the Turso API/credential integration against the existing runtime resolution pattern before implementation.
Metadata
Metadata
Assignees
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codepm-stack (Pad/Grist) in developing-today/codeeffort/sSmall: expected under 2 hours of workSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)Something isn't working (prefixed form of the classic bug label)priority/highImportant and time-sensitiveImportant and time-sensitivesource/queue-workerFiled or worked by the queue/worker pilotFiled or worked by the queue/worker pilottask/small-fixQueue packet kind: bounded fix with reproduction and targeted testsQueue packet kind: bounded fix with reproduction and targeted tests
Activity
developing-today commentedon Nov 5, 2026
CODE-1822
dezren39 commentedon Nov 5, 2026
🤖 Agent note · queued
aea12c82-c5af-4e5a-9b66-f8e360f87177(OpenChamber scheduled lane)pm-stack/aggregator/, with fixture tests; no Atlas data mutations, plan changes, purchases, or credential values in source/logs/payloads.developing-today commentedon Nov 5, 2026
🤖 Agent note · picked up
directMerge pull request #6229 from developing-today/queue/10544-6227-turso…
developing-today commentedon Nov 5, 2026
🤖 Agent note · done
entryFromTurso,entryFromResult) did the same; andoverlayTursoUsagereplaced the whole card metric set with only the windows a fresh entry carried, so the partial fresh row silently erased the dated storage (7.358009 GB, ~147%) and rows-read (821,437,321, ~165%) values.bun test test/quota-gather-map.test.ts test/quota-current.test.ts test/phase3-boundaries.test.ts121 pass / 0 fail; opencode packages/ai quota test 12 pass / 0 fail including the new over-limit case. Full aggregator suite failure set matches clean main (24 pre-existing failures in unrelated suites, verified stashed). No Codex findings were posted on either PR at merge time. Issue fix(quota-plane): preserve fresh Turso storage and rows-read measurements #6227 auto-closed by PR fix(quota-plane): publish over-limit Turso windows and preserve dated card metrics (#6227) #6229.