Skip to content

Per-account usage as the general case: rows keyed by the shared identity, readers never refresh, and the quota surface is declared per credential #7

Description

@iceteaSA

Third of four cross-linked design filings (commons#13 = shared identity type, claustrum#5 = custody, astrocyte gets adoption). This one formalizes what this board already half-decided across #1, #5, and #6 — per-account rows exist for openai today; the ask is that they become the general case, on the shared convention, with the read-only discipline stated as a contract.

Three asks, each finishing a thread you already started

1. Rows keyed (provider axes, account_ref) for every provider — aggregation is consumer policy. Our deployment runs 3 openai accounts, 2 anthropic, 4 antigravity, and is adding a second synthetic pack; the consumer side (router guards) wants best-account vs sum decisions per provider, which only works if insula serves facts per account and never pre-aggregates. The identity spelling comes from commons#13 (note its leading finding: provider is two namespaces — your lane names vs the catalog slug — carry both named, never one field guessed at). account_ref arrives with its origin (Declared/Inferred{basis}/Unlabeled) so a consumer can audit what it's standing on; your labeled-AND-unlabeled-in-one-response behavior (the astrocyte#1 trap-3 sharpening) becomes typed rather than conventional.

2. Readers never refresh — GAP-1/2's decline promoted from decision to design rule. You declined intrusive OAuth reads because a second refresher breaks the first's token family (rotation). That reasoning is now the fleet invariant (claustrum#5: exactly one refresher per credential, the custodian). Insula's contract: read custodian state or vault mirrors, never touch a refresh endpoint. This also makes the future rotation-push consumption (your #5 events discussion — claustrum emitting credential-rotated per-route) a pure win: you re-read on push instead of polling, still without ever refreshing.

3. The quota surface is declared per credential, not discovered per incident. The two-surfaces pattern (#1's xai finding: OAuth for traffic, grok.com cookies for billing, empirically non-substitutable; minimax same shape, api_key + coding-plan cookie) becomes a purpose field on the credential surface (commons#13: traffic | quota_billing | both). Insula selects the quota_billing surface by declaration instead of learning it from a credential_unusable incident per provider — which is exactly how the xai lane was discovered, and #6's provider-invariants doc exists because that discovery cost was real. Your probe-the-billing-endpoint-first documented step stays as the verification of a declaration, rather than the discovery mechanism.

What this does NOT ask

No push transport (your #5 sequencing stands — stale disclosure shipped first, events later if ever; the cursor alternative remains acceptable at our stakes). No changes to window semantics, stale, or completeProviders. No insula-side account inference — where a source reports no account, the row carries Unlabeled honestly rather than a guessed ref (a credential that reached no account must not create or refresh identity, which is your own rule from the astrocyte thread, typed).

Sequencing suggestion: this lands after commons#13 settles the type (the two-namespace provider question especially — your lane names are one of the three namespaces in play), and independently of claustrum#5's phase 2; asks 1 and 3 are useful with today's custody arrangement.


Cross-references: cortexkit/commons#13 (identity type this keys on) · cortexkit/claustrum#5 (custody + the rotation events consumed here) · cortexkit/astrocyte#7 (the other consumer's adoption) · harness side: iceteaSA/openai-auth#1, iceteaSA/anthropic-auth#1, iceteaSA/antigravity-auth#1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions