Repository navigation
Add two optional direct Anthropic Console key stores - #930
Merged
Merged
Conversation
seathatflowsinourveins
force-pushed
the
codex/ns2604-anthropic-keys-20261009
branch
from
October 9, 2026 14:17
ea4f1f6 to
2d6c1cd
Compare
seathatflowsinourveins
marked this pull request as ready for review
October 9, 2026 14:31
seathatflowsinourveins
deleted the
codex/ns2604-anthropic-keys-20261009
branch
October 9, 2026 14:31
seathatflowsinourveins
added a commit
that referenced
this pull request
Oct 11, 2026
…mbers CI (validate-shard-5, run 38164637938, at a2410e2) failed tests.test_upstream_surface_watch DispositionCitationTests.test_every_cited_line_names_the_key five times. The two runbook lines this PR adds moved docs/secret-storage.md lines 1713, 1715 and 1726 to 1715, 1717 and 1728, and catalogs/foundation/upstream-surface-dispositions.json cites those lines by number. The five sources are rebound, as #930 did for its rows; the module passes again (114 tests, skipped 6). The guard's pointer comment and pattern now fit the five lines they had at the base, so every later line keeps its number and the unpinned citations of the guard in docs/decisions/2026-10-08-guard-hook-fails-closed.md (lines 5184-5188 and 5208-5213) still hold. The pattern itself is unchanged. SHA256SUMS carries the new guard hash, and the three changed files are re-registered. Co-Authored-By: Claude Opus 5.5 <[email protected]>
5 tasks done
seathatflowsinourveins
added a commit
that referenced
this pull request
Oct 11, 2026
docs/secret-storage.md gains rows for anthropic-api-5 to anthropic-api-10 and a "Key practice (2026-10-10)" section, the repository copy of the command center's record. It covers slot purposes by organization id prefix, one purpose per slot, hidden-prompt storage, per-command use, main-only environment secrets for CI, the health check, tracking, rotation, spend control, and fill-first failover with anthropic-api-3 kept for CI. Owner direction is attributed, not quoted; account names and balances are left out. The no-Admin-API and cache-isolation statements quote Anthropic's Admin API, Usage and Cost API and prompt-caching pages, read 2026-10-10. The gh stdin statement quotes the installed gh 2.102.0 help. The inventory gives anthropic-api-3 its purpose (CI Claude review, the main-only claude-review environment secret) and a rotation step that resets that secret. The notes of anthropic-api-3 and anthropic-api-4 mark "no Anthropic key is stored in GitHub" as superseded under the owner's ruling of 2026-10-10 (PR #968). No other entry changes. The new decision record names the evidence, alternatives, overturn conditions and SOTA sources. As in #930, the harness-defaults correction row now covers every slot, and the five secret-storage line citations in upstream-surface-dispositions.json move by the 122 inserted lines. Co-Authored-By: Claude Opus 5.5 <[email protected]>
seathatflowsinourveins
added a commit
that referenced
this pull request
Oct 11, 2026
…ard reads a one-letter pointer suffix (#1014) * Credential inventory: alpaca-paper-c slot for paper account C; the guard reads a one-letter pointer suffix Adds the account-C paper credential slot that the command center allocated on 2026-10-11 for the agent-run paper lane C of us-equities-trading (session-scopes/paper-agent-native): inventory id alpaca-paper-c, lane us-equities-paper-c, store <store>/alpaca-paper-c.env, pointer PAPER_ENV_FILE_C, the variables, optional variables and public variables of alpaca-paper-2, status optional, and no loader or consumer until the change that activates account C names one. The owner enters the keys from their own terminal; no store file was created or read. Guard: POINTER_VARIABLE took a numeric suffix only, so the word boundary after PAPER_ENV_FILE failed before `_C` (`_` is a word character: CPython Doc/library/re.rst, the `\b` and `\w` entries, v3.13.16 at cbc944f4bc59), and a reader, a redirect, a traced source and a declare -p or %ENV dump after sourcing "$PAPER_ENV_FILE_C" each passed while the account-1 and account-2 forms were blocked. The suffix may now also be one uppercase letter, which closes the recorded `$PAPER_ENV_FILE_B` gap too; a longer suffix (`_AB`) stays a recorded gap. Failing first, with the base guard and set_credential.py and the new inventory row and test rows: tests.test_secret_path_guard rc=1 with 41 failures (test_inventory_pointer_variables_are_guarded for PAPER_ENV_FILE_C, the ten new BLOCKED rows in test_blocked_commands, and their 20 rtk-proxy and 10 keyring-exec derivations; each new BLOCKED row returns None from the base guard), and tests.test_credential_tools rc=1 with 1 failure (test_account_c_paper_slot_gets_the_same_prefix_hint). Both pass with the change. Also: KEY_PREFIX_HINT gains alpaca-paper-c: PK, so a live-shaped AK key id is flagged at entry; the runbook gets the table row and the shell-profile pointer line; INJECTABLE_IDS and the public-variable classification name the new id; a status test mirrors account 1; the value-free receipt test plants the new store file; SHA256SUMS carries the new guard hash; and the changed registered files are re-registered in manifests/evidence.json. After merge, a host reinstalls the guard with tools/adoption/install_claude_profile.py --only guard (tests.test_secret_path_guard.test_host_profile_copy_is_verbatim fails locally until then and skips in CI). Co-Authored-By: Claude Opus 5.5 <[email protected]> * Rebind the shifted secret-storage citations; keep the guard's line numbers CI (validate-shard-5, run 38164637938, at a2410e2) failed tests.test_upstream_surface_watch DispositionCitationTests.test_every_cited_line_names_the_key five times. The two runbook lines this PR adds moved docs/secret-storage.md lines 1713, 1715 and 1726 to 1715, 1717 and 1728, and catalogs/foundation/upstream-surface-dispositions.json cites those lines by number. The five sources are rebound, as #930 did for its rows; the module passes again (114 tests, skipped 6). The guard's pointer comment and pattern now fit the five lines they had at the base, so every later line keeps its number and the unpinned citations of the guard in docs/decisions/2026-10-08-guard-hook-fails-closed.md (lines 5184-5188 and 5208-5213) still hold. The pattern itself is unchanged. SHA256SUMS carries the new guard hash, and the three changed files are re-registered. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
seathatflowsinourveins
added a commit
that referenced
this pull request
Oct 12, 2026
docs/secret-storage.md gains rows for anthropic-api-5 to anthropic-api-10 and a "Key practice (2026-10-10)" section, the repository copy of the command center's record. It covers slot purposes by organization id prefix, one purpose per slot, hidden-prompt storage, per-command use, main-only environment secrets for CI, the health check, tracking, rotation, spend control, and fill-first failover with anthropic-api-3 kept for CI. Owner direction is attributed, not quoted; account names and balances are left out. The no-Admin-API and cache-isolation statements quote Anthropic's Admin API, Usage and Cost API and prompt-caching pages, read 2026-10-10. The gh stdin statement quotes the installed gh 2.102.0 help. The inventory gives anthropic-api-3 its purpose (CI Claude review, the main-only claude-review environment secret) and a rotation step that resets that secret. The notes of anthropic-api-3 and anthropic-api-4 mark "no Anthropic key is stored in GitHub" as superseded under the owner's ruling of 2026-10-10 (PR #968). No other entry changes. The new decision record names the evidence, alternatives, overturn conditions and SOTA sources. As in #930, the harness-defaults correction row now covers every slot, and the five secret-storage line citations in upstream-surface-dispositions.json move by the 122 inserted lines. Co-Authored-By: Claude Opus 5.5 <[email protected]>
seathatflowsinourveins
added a commit
that referenced
this pull request
Oct 12, 2026
docs/secret-storage.md gains rows for anthropic-api-5 to anthropic-api-10 and a "Key practice (2026-10-10)" section, the repository copy of the command center's record. It covers slot purposes by organization id prefix, one purpose per slot, hidden-prompt storage, per-command use, main-only environment secrets for CI, the health check, tracking, rotation, spend control, and fill-first failover with anthropic-api-3 kept for CI. Owner direction is attributed, not quoted; account names and balances are left out. The no-Admin-API and cache-isolation statements quote Anthropic's Admin API, Usage and Cost API and prompt-caching pages, read 2026-10-10. The gh stdin statement quotes the installed gh 2.102.0 help. The inventory gives anthropic-api-3 its purpose (CI Claude review, the main-only claude-review environment secret) and a rotation step that resets that secret. The notes of anthropic-api-3 and anthropic-api-4 mark "no Anthropic key is stored in GitHub" as superseded under the owner's ruling of 2026-10-10 (PR #968). No other entry changes. The new decision record names the evidence, alternatives, overturn conditions and SOTA sources. As in #930, the harness-defaults correction row now covers every slot, and the five secret-storage line citations in upstream-surface-dispositions.json move by the 122 inserted lines. Co-Authored-By: Claude Opus 5.5 <[email protected]>
seathatflowsinourveins
added a commit
that referenced
this pull request
Oct 12, 2026
…ken health check (#969) * Add Anthropic API key slots anthropic-api-5 to anthropic-api-10 Stored through the credential terminal on the owner's direction (2026-10-10). No admin-key slots: every organization behind the stored keys is an individual account, and the Admin API is unavailable for individual accounts (Anthropic docs, read 2026-10-10). Data-only inventory entries; api-actions' PR adds the docs, evidence and tests. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Cover anthropic-api-5 to anthropic-api-10 in the runner tests The six slots added in the previous commit were not in INJECTABLE_IDS, so both inventory-driven set assertions failed at that commit. ANTHROPIC_IDS now lists all ten Anthropic slots; INJECTABLE_IDS and the same-grammar setter/runner test use it, so every slot is written through the hidden-prompt setter and injected through credential_run.py with synthetic values only. Failing-first: with the e1c88ff inventory the three affected tests fail (failures=14, errors=18: the setter and the runner refuse anthropic-api-5..10 as unknown ids, and both id sets differ); with this branch's inventory they pass. The previous commit changed adoption/credential-inventory.json without its evidence binding, so this commit registers it with the test file. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Add a no-token health check for the Anthropic key slots tools/credentials/anthropic_key_health.py ports the command center's anthropic_key_health.sh to the repository. For each anthropic-api slot in inventory order it runs credential_run.py <slot> --check (starts nothing), and for a stored slot runs the probe child through credential_run.py <slot> --only ANTHROPIC_API_KEY. The key reaches only the child's environment; the request headers go to the child as JSON on stdin, so no argv carries a value. The child sends GET /v1/models and GET /v1/organizations/me to the fixed API host, follows no redirect, reads no body, and prints statuses and the first eight characters of the anthropic-organization-id response header. The report never holds a key, an organization name or a response body. The port drops the script's organization-name read and its admin-key probe. HTTP handling follows tools/credentials/alpaca_rate_limit_probe.py; the header and endpoint are documented in the Claude API overview and the Admin API page (read 2026-10-10). Tests use a fake opener, a fake runner, and the real credential_run.py over a temporary store with a synthetic key; no test makes a network call. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Record the Anthropic key slots and the 2026-10-10 key practice docs/secret-storage.md gains rows for anthropic-api-5 to anthropic-api-10 and a "Key practice (2026-10-10)" section, the repository copy of the command center's record. It covers slot purposes by organization id prefix, one purpose per slot, hidden-prompt storage, per-command use, main-only environment secrets for CI, the health check, tracking, rotation, spend control, and fill-first failover with anthropic-api-3 kept for CI. Owner direction is attributed, not quoted; account names and balances are left out. The no-Admin-API and cache-isolation statements quote Anthropic's Admin API, Usage and Cost API and prompt-caching pages, read 2026-10-10. The gh stdin statement quotes the installed gh 2.102.0 help. The inventory gives anthropic-api-3 its purpose (CI Claude review, the main-only claude-review environment secret) and a rotation step that resets that secret. The notes of anthropic-api-3 and anthropic-api-4 mark "no Anthropic key is stored in GitHub" as superseded under the owner's ruling of 2026-10-10 (PR #968). No other entry changes. The new decision record names the evidence, alternatives, overturn conditions and SOTA sources. As in #930, the harness-defaults correction row now covers every slot, and the five secret-storage line citations in upstream-surface-dispositions.json move by the 122 inserted lines. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Apply the owner's revised fill-first order and anthropic-api-3's purpose The owner revised the fill-first order at about 15:12Z on 2026-10-10 (relayed by the command center). The order is now anthropic-api-4, anthropic-api-3, anthropic-api-5, anthropic-api, anthropic-api-2, then anthropic-api-6 to anthropic-api-10 as stored. anthropic-api-3 serves the CI Claude review first and local quality work second; it is no longer kept out of the order. Its key remains the main-only claude-review environment secret. The key practice section, the practice table (anthropic-api-5 now follows anthropic-api-3), the credentials table row, the inventory label and notes of anthropic-api-3, and the decision record follow the revision. The decision record also adds an overturn condition for CI credit drawn down by local work, and corrects the CPython citation range to L623-L656. The five secret-storage line citations in upstream-surface-dispositions.json follow the doc's line count. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Rewrap two key-practice paragraphs Two paragraphs of the key practice section carried uneven line breaks from earlier edits; the text is unchanged. The rewrap removes one line, so the five secret-storage line citations in upstream-surface-dispositions.json move up by one. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Cite the refreshed key-practice record The command center refreshed its record to the 15:12Z fill-first order; the decision cites the new sha256. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Check the inventory first, and fail a probe that failed The co-op's GPT read at 445c61c (2 P2): - slots() now applies scripts/credential_status.py's inventory check, as the credential runner does, and refuses an anthropic-api entry in another shape or an inventory with none: exit 1 before any slot is checked, naming counts and inventory ids only. Before, entries: [] or an entry with no variables gave an empty report and exit 0. - probe_slot() fails a child that exited nonzero or was killed (CompletedProcess.returncode, CPython 3.13.16 Lib/subprocess.py:484) before reading its output, and a line that reports an error is probe_failed whatever status it printed. Before, a 200 line followed by exit 7, a signal, or an error passed with exit 0. - docs/secret-storage.md says so; the catalog's five citations of its later lines move by the four lines added. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Scope
Add optional
anthropic-api-3andanthropic-api-4as separate Console-key stores for direct Anthropic consumers. Both reuse the existing hidden-prompt setter and selected-id runner, withANTHROPIC_API_KEYinjected per command. The declarations mirror #889; full feature and batch acceptance remains separate.22e3ef6ffd53b09f3cb335c46f7c696093521274.lane:foundation.SOTA sources
adoption/credential-inventory.json:222,catalogs/foundation/upstream-surface-dispositions.json:206,docs/decisions/2026-10-08-anthropic-api-second-key.md:12,docs/harness-defaults.md:93,docs/secret-storage.md:24,manifests/evidence.json:5263,tests/test_credential_run.py:39and:383. The new decision records every mirror citation.tools/credentials/credential_run.py:151,scripts/hooks/secret_path_guard.py:202and:229. ExistingSECRET_NAMESand store-root rules already cover both entries.Evidence-class table
tests.test_credential_run, 94/94 passed; generated values in temporary storespython3 scripts/validate.py, rc0; 70 components, 10940 hashed files, 4 profiles, 239 receiptsGateway feature-parity failure is a reported coordination input. Account credit, billing, workspace scope and direct feature/Batches acceptance were not tested by this change.
Local commands run
Each module ran under
timeout 600, nice/ionice, at concurrency two. All returned rc0; skipped cases are listed as unexecuted.The designated CC pre-cue script,
command-center/cc-tools/base_tests_at_head.sh(SHA256
249a427f6bae4f413c1d35250d35d5c9e91359f881dc5ad1974a3a38c6a44115,3247 bytes), ran the merge-base copy of the one modified existing test file
against this head. It returned rc1: 94 baseline tests, two failing ids:
tests.test_credential_run.InjectionTests.test_only_the_selected_entrys_own_pointer_variables_stay_in_the_childtests.test_credential_run.InventoryAndGrammarTests.test_every_injected_name_is_masked_or_publicBoth base assertions at
tests/test_credential_run.py:498and:2154require the exact old
INJECTABLE_IDSset. The head adds onlyanthropic-api-3andanthropic-api-4to that expected set, with no removals.These are the declared expectation changes; current-head credential tests
pass 94/94. The CC accepted pre-cue rc1 as the declared exact-set change
in coordination decision 2026-10-09, about 12:47Z, item 3. The execution result
remains rc1. The designated GPT and CC reads remain before CC landing.
tests.test_credential_toolstests.test_credential_statustests.test_credential_boot_receipttests.test_credential_runtests.test_canary_prooftests.test_secret_path_guardtests.test_new_wsl_definitive_defaultstests.test_codex_worker_lanetests.test_host_requeststests.test_evidence_manifesttests.test_validatetests.test_catalog_freshness_proposeDecision record
docs/decisions/2026-10-09-anthropic-api-additional-keys.md records the reference implementation, alternatives, evidence boundaries and conditions for reconsideration.
Host evidence
No
evidence/hosts/files or host-receipt platform status changes. Credential contents are entered by the owner through the CC's hidden prompt and stay outside the repository. Both new entries are optional. The CC's coordination decision on 2026-10-09, about 12:47Z, item 3 supersedes the dated decision record's earlier publication prerequisite: publication proceeds without waiting foranthropic-api-4, which may be stored before or after landing. Agents do not verify credential values.python3 scripts/host_receipts.py validatepasses for every new/changed receipt. N/A: no host receipt changed.scripts/host_receipts.py review) or explicitly requested in this PR. Designated co-op and CC reads requested for this draft.platform_statuschange is made from a host receipt alone.Checklist
permissions: {}and grant each job only what it needs. N/A: no workflow changed.