GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(usage-hub): Turso org-usage collector in the quota gatherer (#1049) by dezren39 · Pull Request #2366 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Oct 29, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Closes the build half of #1049 (queue task 2984; route verification was triage task 2311).

What

  • src/quota-gather-map.ts — entryFromTurso: maps a Turso org usage + subscription read onto a quota-current entry (serviceId: "turso", so the §4 pct snapshot records continue the SaaS card's series). Windows carry used value (counts/rows raw, storage + sync in GB), % of the Starter Free limits from the issue (100 DBs, 5 GB storage, 500M rows read, 10M rows written, 3 GB sync), and the subscription current_billing_period_end as resetsAt (cycle end). Missing metrics are omitted — never zeroed; an unusable/failed read is an error entry (previous dated value stands, flagged) — never a fresh-looking zero.
  • scripts/gather-quota.ts — runTurso: per tick, resolves the platform token from Bitwarden by name only (turso.platform-api-token-muse-cli, the collect-fleet-feed bws pattern; laptop ~/.config/bws/access-token + sandbox paths both handled; TURSO_API_TOKEN env override for manual runs), then GET /v1/organizations/{slug}/usage + /subscription (TURSO_ORG_SLUG default dezren39). Any failure degrades only Turso's own entry, like every other provider. The token value never appears in code, logs, snapshots, or this PR.
  • test/quota-gather-map.test.ts: 3 new tests pinned to the triage-verified live values (rows_read 1,905,385; rows_written 30,026; storage 1,053,323,264 B; sync 30,408,704 B; 3 DBs; period 2026-10-01T04:00Z → 2026-11-01T04:00Z).

Verification

  • Targeted: bun test test/quota-gather-map.test.ts — 14/14 pass (laptop); bunx tsc --noEmit clean.
  • Full aggregator suite: 344 pass, 1 fail pre-existing on clean main (attention action-controls badges, design+impl(aggregator): triage actions on /attention - acknowledge, snooze, escalate, answer - orchestrator-mediated #1152/impl(aggregator): session actions from /sessions and /attention - poke, answer, stop - keeper/orchestrator-mediated #1156 — fails identically without this change).
  • Live gather from this branch (worktree outputs redirected): turso ok 1143ms, entry populated — planLabel starter, databases 3% · storage 21.066% · rows-read 0.381% · rows-written 0.3% · sync 1.014%, resetsAt 2026-11-01T04:00:00.000Z — and 5 §4 snapshot records appended (turso/{databases,storage,rows-read,rows-written,sync}, source api).

Deploy note: no unit changes needed — the gatherer service runs gather-quota.ts from the primary checkout, so this takes effect on the next tick after merge + pm-git-sync.

🤖 Queue worker (repo-worker-code), Lane C — task 2984


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@dezren39
feat(usage-hub): Turso org-usage collector in the quota gatherer (#1049)
fce3002
Adds a Turso source to the Stage 2 quota gatherer: GET /v1/organizations/{slug}/usage + /subscription (route verified live 2026-10-29, triage task 2311), token resolved from Bitwarden by name (turso.platform-api-token-muse-cli; value never logged/stored), mapped by entryFromTurso in quota-gather-map.ts onto a quota-current entry (serviceId turso) vs Starter Free limits (100 DBs, 5 GB storage, 500M rows read, 10M rows written, 3 GB sync) with the subscription current_billing_period_end as cycle end. recordsFromEntries appends the section-4 pct snapshot records per changed metric, so daily deltas derive from consecutive snapshots. Failures degrade to an error entry (previous dated value stands, flagged) — never zeros; missing metrics are omitted, never zeroed.

Tests: quota-gather-map.test.ts +3 Turso tests (verified-live fixture values) — 14/14 pass on laptop; tsc clean. Full aggregator suite: 344 pass, 1 pre-existing fail (attention action badges, fails identically on clean main). Live gather from this worktree: turso ok in 1.1s, planLabel starter, resetsAt 2026-11-01T04:00:00Z, 5 turso snapshot records appended.
@dezren39
dezren39 requested a review from a team as a code owner October 29, 2026 15:42
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 45 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 15094e53-1ddc-45a0-bf6a-31b92c978d7a
Commits

Reviewing files that changed from the base of the PR and between 5a34fa7 and c05770c.

Files selected for processing: 6
  • pm-stack/aggregator/scripts/gather-quota.ts
  • pm-stack/aggregator/src/quota-current.ts
  • pm-stack/aggregator/src/quota-gather-map.ts
  • pm-stack/aggregator/src/sources/live.ts
  • pm-stack/aggregator/test/quota-current.test.ts
  • pm-stack/aggregator/test/quota-gather-map.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T16:26:10.804778Z c05770c Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 29, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fce30029ee

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pm-stack/aggregator/scripts/gather-quota.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pm-stack/aggregator/src/quota-gather-map.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pm-stack/aggregator/scripts/gather-quota.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
fix(usage-hub): address Codex review on the Turso collector (PR #2366)
c05770c
1. SaaS consumer: overlayTursoUsage in quota-current.ts applies the gatherer Turso entry to the usage() SaaS card (fresh ok replaces metrics/stamp/cycle end; error or stale keeps the dated card plus a dated conflict flag), wired into both live usage() paths in sources/live.ts. 2. Snapshot units: turso databases/storage/sync records now carry native values+units (count/GB) matching the recordsFromSaasServices series instead of pct on the same metric ids; rows stay pct (no native rows series/unit exists). 3. Timeout: the Turso fetch AND its body parse run inside withTimeout with an AbortSignal, so a stalled body cannot hang the tick.

Tests: +3 overlayTursoUsage tests; Turso record expectations updated. Targeted files 51/51 pass, tsc clean, full suite 347 pass / 1 pre-existing fail (attention badges, also on clean main). Live gather re-verified: 5 turso records appended in native units with resetsAt 2026-11-01T04:00:00Z.
@dezren39 dezren39 mentioned this pull request Oct 29, 2026
feat(usage-hub): v2 Turso usage collector — verify org usage route, daily read #1049
Closed
@dezren39

dezren39 commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

@codex review

Codex findings from the fce3002 review are fixed in c05770c and each thread has a disposition reply (all three addressed in code + tests). Please re-review the current head.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: c05770cee7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 added this pull request to the merge queue Oct 29, 2026
@github-actions github-actions Bot assigned dezren39 Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to Branch Protection failures Oct 29, 2026
You're not authorized to push to this branch. Visit "About protected branches" for more information.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 added this pull request to the merge queue Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to Branch Protection failures Oct 29, 2026
You're not authorized to push to this branch. Visit "About protected branches" for more information.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 added this pull request to the merge queue Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to Branch Protection failures Oct 29, 2026
You're not authorized to push to this branch. Visit "About protected branches" for more information.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Oct 29, 2026
feat(usage-hub): snapshot retention — 13-month raw, monthly rollups, backup check #1117
Closed
@dezren39
dezren39 added this pull request to the merge queue Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to Branch Protection failures Oct 29, 2026
You're not authorized to push to this branch. Visit "About protected branches" for more information.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Oct 29, 2026
ci: Actions check runs stuck in queued across PRs — no runner pickup since ~05:00Z 2026-10-28 #1599
Closed
@dezren39
dezren39 added this pull request to the merge queue Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to Branch Protection failures Oct 29, 2026
You're not authorized to push to this branch. Visit "About protected branches" for more information.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Oct 29, 2026
feat(usage-hub): v2 Supabase usage collector — Management API scope + muse-dev metrics #1050
Closed
@dezren39
dezren39 added this pull request to the merge queue Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to Branch Protection failures Oct 29, 2026
You're not authorized to push to this branch. Visit "About protected branches" for more information.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 added this pull request to the merge queue Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to Branch Protection failures Oct 29, 2026
You're not authorized to push to this branch. Visit "About protected branches" for more information.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 added this pull request to the merge queue Oct 29, 2026
@dezren39 dezren39 mentioned this pull request Oct 29, 2026
ci: merge queue ejects every PR — no merge since #2233 (10:57Z), entries dropped 2-6 min into AWAITING_CHECKS #2403
Closed
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to Branch Protection failures Oct 29, 2026
You're not authorized to push to this branch. Visit "About protected branches" for more information.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 added this pull request to the merge queue Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to Branch Protection failures Oct 29, 2026
You're not authorized to push to this branch. Visit "About protected branches" for more information.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit f265e44 Oct 30, 2026
3 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/2984-1049-turso-collector branch October 30, 2026 01:05
This was referenced Nov 21, 2026
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
Audit programme: seven-lane review of PRs, issues and designs (2026-11-23) #13871
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dezren39 dezren39

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.