Skip to content

Provider accounts P12: docs + moduledocs — retire the "quota is per workspace" mental model - #2003

Merged
ryanrborn merged 10 commits into
mainfrom
chore/1858-provider-accounts-p12-docs-moduledocs-retire
Sep 23, 2026
Merged

ryanrborn merged 10 commits into
mainfrom
chore/1858-provider-accounts-p12-docs-moduledocs-retire

Conversation

@ryanrborn

@ryanrborn ryanrborn commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Summary

Phase P12 of the provider-account design (P0–P11 shipped) — documentation-only updates to retire "per-workspace" mental models from moduledocs and operator-facing guides.

Updated:

Test plan

  • grep -r "per workspace\|workspace-scoped" apps/*/lib | grep -i quota returns only legitimate hits (spend-cache memoization, workspace max_concurrent ceiling shares)
  • docs/provider-account-design.md Status line now accurately describes opt-in nature and documents P4 reversal
  • README section 3.4 "Account-model path" documents arb account create, arb account attach, and arb account rotate with correct CLI syntax
  • apps/arbiter_cli/lib/arbiter_cli/cmd/{quota,usage,account}.ex moduledocs verified to describe account model (no code changes)
  • mix compile --warnings-as-errors passes (no code changes, only docs/comments)
  • No unintended code changes outside docs/ and doc comments

References

Task: bd-3usjdj
Closes #1858


🤖 Generated with Claude Code

…orkspace" mental model

- Update `docs/provider-account-design.md` Status line from "design proposal" to "implemented" (P0–P11 all shipped as of 2026-09-23)
- Remove "until P7" reference from `Arbiter.Quota.serialize/3` docstring since P7 has shipped
- Rename CloudProbe section heading from "What a refresh does per workspace" to "Refresh strategy" to reflect account-focused Anthropic polling while keeping per-workspace fanning for other providers
- Update `arb quota` moduledoc to say snapshots are stored "per account" instead of "per workspace"
- Update workspace concurrency config UI to mention the account ceiling (P8) as part of the effective cap formula

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
ryanrborn and others added 6 commits September 23, 2026 12:50
- Update design doc Status line to note account model is opt-in
  (`:provider_accounts_enabled` defaults false)
- Add "What P4 actually shipped" section documenting the deferred
  destructive step (flagged off per #1947 reversal commit 7eaaaaf)
- Add account-model path subsection to README explaining
  `arb account attach` / `arb account rotate` as alternative to
  install-wide token setup (requires `:provider_accounts_enabled`)
- Clarify precedence and use-case for account-scoped credentials

Addresses reviewer findings from P12 acceptance criteria:
- Verifies Status line reflects actual implementation state
- Documents the one significant design deviation (P4 deferral)
- Provides operators the account-model onboarding docs named in task
The example was showing an incorrect command line:
  arb account rotate <workspace> claude --token <your-long-ttl-token>

This doesn't match the real CLI signature which is:
  arb account rotate <ref> --kind oauth_token|api_key|cli_credentials_file
                           --env-var VAR (--secret VALUE | --secret-file PATH | -)

The correct example is:
  arb account rotate claude:my_account --kind oauth_token --env-var CLAUDE_CODE_OAUTH_TOKEN --secret <your-long-ttl-token>
…e shipped annotations

- Fix stale :provider_accounts_enabled comment in config/config.exs: it previously
  claimed "nothing reads it yet" but P3+ actually source credentials from accounts
  when the flag is true. Update to reflect current behavior and the fallback chain.
- Add (**shipped**) annotations to phase table (§10) for P0, P1, P2, P4, P6, P9
  for consistency with Status line asserting "P0–P11 all shipped". Use bd-...
  issue IDs where available (P2: bd-77j2if, P4: bd-6yb06i).

Addresses reviewer findings from P12 acceptance criteria round 2.
Add (**shipped**) annotation to P7 row in the phase table (§10) for consistency
with Status line asserting "P0–P11 all shipped". P7 (account-wide quota hold:
QuotaGate callback takes an account) was delivered in #1949.

Addresses final reviewer finding from P12 acceptance criteria round 2.
…e moduledoc

The gate.ex moduledoc opening description said the gate "reads the latest quota
snapshot for the workspace" (P5/P7-era phrasing), contradicting the correct
account-keyed lookup in the same file and the actual call site at
Worker.Dispatch.dispatch/2 (which uses account_id).

Reword to "for the account whose credential this dispatch will authenticate
with" to reflect the account model introduced in P5 and clarify the semantic.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ryanrborn and others added 3 commits September 23, 2026 13:37
:sys.get_state(Drain.Registry) hits the Registry's supervisor, so it
never waited for the partition that processes the killed caller's :EXIT;
the status read could race the cleanup and see :draining in CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ryanrborn
ryanrborn merged commit 3b57121 into main Sep 23, 2026
5 checks passed
@ryanrborn
ryanrborn deleted the chore/1858-provider-accounts-p12-docs-moduledocs-retire branch September 23, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provider accounts P12: docs + moduledocs — retire the "quota is per workspace" mental model

1 participant