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(quota-plane): adapter — Claude via claude.ai session (usage API) · Issue #1163 · developing-today/code

feat(quota-plane): adapter — Claude via claude.ai session (usage API) #1163

New issue
Copy link
New issue
Copy link
Closed
Closed
feat(quota-plane): adapter — Claude via claude.ai session (usage API)#1163
Copy link
Assignees
dezren39
Labels
effort/mMedium: expected under 1 day of workkind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedmeta/follow-upFollow-up spun out of earlier workmode/onlineFully doable remotely: design, config, code, cloudpriority/normalOrdinary priority (the default)source/humanFiled directly by a humanstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 27, 2026
Issue body actions

Priority P1 — order 5c. Horizon: Month. Design: quota-plane-design-2026-10-26.md (usage-billing-hub goal files), Stage 2. Parent context: epic #1047. (§2) — on the framework + gatherer from this epic.

Claude adapter: claude.ai session -> the usage API behind Settings -> Usage (5h %, weekly %, reset). SSO is Google (per Drew's SSO-first rule) at capture time. Replaces the manual Settings read.
Acceptance: Claude Pro windows current on the tick; session expiry raises re-login, never zeros.

Acceptance criteria

  • Claude Pro usage windows (5h %, weekly %, reset) are current on the quota-plane tick via the claude.ai usage API — restating the body's Acceptance line as the criteria section.
  • Session expiry raises a re-login state, never zeros.
  • The adapter runs on the framework + gatherer from epic epic(usage-hub): SaaS/cloud services completion — v2 live collectors, daily console reads, v3 reconciliation #1047 (Stage 2) without a manual Settings -> Usage read.

Activity

Next
  1. dezren39
    added
    meta/follow-upFollow-up spun out of earlier work
    on Oct 27, 2026
  2. developing-today commented on Oct 27, 2026

    @developing-today
    developing-todayBot
    on Oct 27, 2026 – with developing.today
    Contributor
    More actions

    CODE-299

  3. github-actions
    assigned
    dezren39
    on Oct 27, 2026
  4. dezren39 commented on Oct 27, 2026

    @dezren39
    dezren39
    on Oct 27, 2026
    MemberAuthor
    More actions

    REVIEW FINDING (2026-10-26): this provider's adapter ALREADY EXISTS in OpenChamber's quota module (server/lib/quota/providers). Re-scope from "build adapter" to: wire the existing provider into the quota gatherer (#1151), verify it against the live account on the gatherer host (credential provenance is the open question, per #1155), fix gaps found, and confirm its output shape maps onto quota-current. Keep this issue open until the provider is arriving on the 15-minute tick.

  5. dezren39
    added
    kind/featureNew feature or capability request
    priority/highImportant and time-sensitive
    effort/mMedium: expected under 1 day of work
    source/humanFiled directly by a human
    status/needs-triageNot yet triaged; needs a first look
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 28, 2026
  6. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    Intake review

    • Related: epic epic(usage-hub): SaaS/cloud services completion — v2 live collectors, daily console reads, v3 reconciliation #1047 (quota plane, Stage 2, order 5c); design quota-plane-design-2026-10-26.md in the usage-billing-hub goal files (§2); sibling adapters feat(quota-plane): adapter — ClinePass via dashboard session token #1159 (ClinePass, 5a), feat(quota-plane): adapter — OpenCode Go console, per-workspace windows #1161 (OpenCode Go, 5b), feat(quota-plane): adapter — Command Code via CLI/app credential #1165 (Command Code, enriched last run).
    • Still live: a merged-PR search for a Claude quota adapter found no resolving PR; the issue carried only meta/follow-up before this pass.
    • Notes: the body states "Priority P1" in prose — normalized here to priority/high. Its Acceptance line has been expanded into the appended ## Acceptance criteria section (original body preserved verbatim above it).
    • Risks: the capture route is the unknown — SSO is Google at capture time (Drew's SSO-first rule), and claude.ai session lifetime will decide how often the re-login state fires; the never-zeros rule on expiry is load-bearing because a zeroed Claude window would corrupt placement decisions downstream (feat(quota-plane): OpenCode pools consume quota-current — measured placement, rotation, demotion #1157).
    • Suggested approach: probe the usage API shape behind Settings -> Usage first, then build on the epic(usage-hub): SaaS/cloud services completion — v2 live collectors, daily console reads, v3 reconciliation #1047 framework like the sibling adapters, with the expiry path tested explicitly.
    • Labels normalized by fleet monitor: kind/feature, priority/high (P1 in body), effort/m, source/human, status/needs-triage, meta/enriched.
  7. dezren39
    added
    mode/onlineFully doable remotely: design, config, code, cloud
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Nov 1, 2026
  8. 258 remaining items

    Load more actions
  9. dezren39
    added
    status/parkedDeliberately paused with a recorded resume condition
    priority/normalOrdinary priority (the default)
    and removed
    queue/claimedQueue worker lifecycle state
    priority/highImportant and time-sensitive
    on Nov 10, 2026
  10. developing-today
    added
    status:in-review
    on Nov 11, 2026
  11. dezren39 commented on Nov 11, 2026

    @dezren39
    dezren39
    on Nov 11, 2026
    MemberAuthor
    More actions

    state: parked (CI wait)
    task 6553 (small_fix) — issue #1163 — lane code-e, 2026-11-11

    Implemented the Claude adapter and opened PR #8480: pm-stack/aggregator/src/claude-adapter.ts on the #1153 framework (ClinePass #1159 template) reads the claude.ai usage API (organizations → usage), producing the 5h and weekly windows with resets as anthropic:claude-pro quota-current rows sourced from token-adapter/claude; expired sessions surface as session-expired + re-login with last-known retained, never zeros; credentials are CredentialRef-only and move only in the Cookie header. Fixture tests in test/claude-adapter.test.ts.

    Verification (laptop): targeted adapter suites 49 pass / 0 fail. Full aggregator suite: 1909 pass / 36 fail / 4 errors — and the identical 36 fail / 4 errors on the same tree with this PR's two files removed, so every full-suite failure is pre-existing and unrelated.

    Terminal for this shift: task 6553 parked as a CI wait on PR #8480. Resume: when PR #8480 checks complete and Codex findings (if any) are dispositioned, merge PR #8480 and complete task 6553 with outcome pr_opened/fixed_merged. Gatherer-tick activation stays gated on #1155 credential provenance, per the #1159 precedent recorded in the PR body.

  12. dezren39
    added 2 commits that reference this issue on Nov 11, 2026

    test(quota-plane): property coverage for the Claude parser invariants (…

    acb9b63

    Merge pull request #8480 from developing-today/queue/6553-1163-claude…

    875cced
  13. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 11, 2026
  14. developing-today
    closed this as completedon Nov 11, 2026
  15. dezren39
    removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Nov 11, 2026
  16. dezren39 commented on Nov 11, 2026

    @dezren39
    dezren39
    on Nov 11, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done (resumed, Codex P1 fixed, merged)

    • Agent: repo-worker-code (queue task 6553, lane code-n)
    • Session: Muse scheduled lane N, 2026-11-11T04:11Z
    • Outcome: PR feat(quota-plane): Claude adapter — claude.ai usage API windows (#1163) #8480 MERGED (merge commit 875cced); this issue auto-closed by the PR.
    • Resume state found: lane code-e had implemented the Claude adapter and parked task 6553 as a CI wait (checks still queued in the fleet CI backlog at merge time). This lane reviewed the PR, dispositioned its one Codex finding, and merged on local verification per standing merge authority.
    • Codex P1 (comment 4533468871) — fixed: commit acb9b63 adds a seeded property sweep to test/claude-adapter.test.ts (token-adapter precedent, seed 0x1163) with the three named invariants as oracles: accepted percentages finite/in 0..100 and equal to the clamped raw value; malformed utilization never becomes a successful zero reading (no usable window → AdapterError); failed collection retains the previous entry verbatim. Disposition replied on the thread (comment 4533908538).
    • Verification: bun test test/claude-adapter.test.ts — 14 pass / 0 fail (1699 expect() calls); test/token-adapter.test.ts — 19 pass / 0 fail. (Code-e's earlier verification stands for the adapter itself: targeted suites 49 pass; full-suite failures A/B-proven pre-existing.) Adapter and property tests verified present on main post-merge.
    • Activation note (unchanged, by design): the gatherer activates this adapter only when a credential reference is configured; live-account activation stays gated on audit(quota-plane): name the two token-exception providers definitively #1155 credential provenance, per the PR body.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

effort/mMedium: expected under 1 day of workkind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedmeta/follow-upFollow-up spun out of earlier workmode/onlineFully doable remotely: design, config, code, cloudpriority/normalOrdinary priority (the default)source/humanFiled directly by a humanstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.