Skip to content

Claude auth billing - #354

Open
davidabram wants to merge 6 commits into
mainfrom
claude-auth-billing
Open

davidabram wants to merge 6 commits into
mainfrom
claude-auth-billing

Conversation

@davidabram

Copy link
Copy Markdown
Member

No description provided.

Define the detector, persistence, hook integration, and context synchronization
work needed to record Claude session authentication observations while preserving
existing model-state behavior and deferring export changes.

Plan: claude-auth-billing-observations
Tasks: T01–T05

Co-authored-by: SCE <sce@crocoder.dev>
davidabram and others added 5 commits November 20, 2026 17:39
Implement a pure, presence-only detector for documented Claude Code environment signals, with cloud-provider precedence, provider-conflict handling, custom gateway classification, stable enum mappings, and inferred/unknown confidence. Cover precedence, empty/falsy values, billing limitations, and all signal combinations with unit tests.

Completes plan `claude-auth-billing-observations` task T01.

Co-authored-by: SCE <sce@crocoder.dev>
Add migration 008 for Claude session auth state and let hook runtime accept the exact pre-008 migration ledger while setup and doctor remain strict. Reject other missing or unexpected migrations, and cover compatibility, constraints, setup, doctor, and invalid-ledger cases with tests.

Plan: claude-auth-billing-observations
Task: T02

Co-authored-by: SCE <sce@crocoder.dev>
Add typed RepositoryAgentTraceDb upsert/read helpers for Claude session auth state, with null-safe change-only updates and pre-008 migration compatibility. Parse persisted enum values strictly and cover replay, mutation, isolation, invalid data, and legacy-ledger behavior with tests.

Plan: claude-auth-billing-observations, T03

Co-authored-by: SCE <sce@crocoder.dev>
Record inherited Claude authentication configuration for every valid SessionStart in the local agent-trace database while keeping model-state persistence independent and fail-open. Reuse canonical session IDs, classify only environment-variable presence, and log auth write failures without exposing credentials; add regression coverage and document the local-only hook contract.

Plan: claude-auth-billing-observations (T04)
Complete the Claude session auth state plan by documenting migration-008 hook compatibility and local-only export boundaries, and align glossary and export-reader context with the implemented register. Mark T05 and its validation evidence complete so durable context records the detector classification, persistence behavior, and current limitations.

Plan: claude-auth-billing-observations (T05)

This branch has not been deployed

No deployments
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.

1 participant