Skip to content

config: drop the secret-name overrides - #861

Merged
max-sixty merged 2 commits into
mainfrom
secret-name-constants
Aug 6, 2026
Merged

max-sixty merged 2 commits into
mainfrom
secret-name-constants

Conversation

@max-sixty

@max-sixty max-sixty commented Aug 6, 2026 •

Copy link
Copy Markdown
Owner

secrets.bot_token, .claude_token, .anthropic_api_key and .openai_key renamed the four operational secrets per adopter. No config anywhere set one — every adopter and tend itself run the defaults, and the only thing exercising the path was a test fixture.

The case they existed for is closed. The overrides let an adopter whose repo already held a differently-named PAT point tend at it rather than minting a duplicate; since the operational secrets moved into the tend environment, install-tend creates that environment and fills it from scratch, so there is no pre-existing secret whose name is worth keeping. An org-level copy is an explicit check_secrets failure rather than a stand-in, so that route is closed too. install-tend's §1 was still telling adopters to reach for the override in exactly the case that no longer works.

The names become module constants in config.py. The templates read them as Jinja globals, following tend_environment, so the names tend check looks for and the names the workflows read cannot drift; check_claude_auth and check_codex_auth no longer need a Config at all. The secrets.allowed refusal now intersects against OPERATIONAL_SECRETS and behaves as before. A leftover override key fails with the rename to make, rather than being warned past into workflows that read a secret the adopter doesn't have.

test_custom_secrets had nothing left to assert; in its place test_workflows_read_only_the_operational_secrets checks, per harness, that every stored secret a workflow reads is one tend check verifies — the bot token plus that harness's own auth secret, so a claude workflow reading secrets.OPENAI_API_KEY fails as surely as one reading a name nothing defines.

Rendered YAML is byte-identical — every regtest output is unchanged, so adopters see no diff on their next regen. 338 tests pass and pre-commit run --all-files is clean. uvx-equivalent tend init --dry-run against this repo's config emits TEND_BOT_TOKEN, CLAUDE_CODE_OAUTH_TOKEN, ANTHROPIC_API_KEY and GITHUB_TOKEN and nothing else; tend check reports the same two pre-existing failures on CLAUDE_CODE_OAUTH_TOKEN still sitting at repo level, which are the outstanding half of the credential migration TODO.md tracks and untouched here.

This was written by Claude Code on behalf of max-sixty

`secrets.bot_token`, `.claude_token`, `.anthropic_api_key` and
`.openai_key` renamed the four operational secrets per adopter. No
config anywhere set one — every adopter and tend itself run the
defaults, and the only thing exercising the path was a test fixture.

The case they existed for is closed. The overrides let an adopter whose
repo already held a differently-named PAT point tend at it rather than
minting a duplicate; since the operational secrets moved into the `tend`
environment, `install-tend` creates that environment and fills it from
scratch, so there is no pre-existing secret whose name is worth keeping.
An org-level copy is an explicit `check_secrets` failure rather than a
stand-in, so that route is closed too.

The names become module constants. The templates read them as Jinja
globals, following `tend_environment`, so the names `tend check` looks
for and the names the workflows read cannot drift; `check_claude_auth`
and `check_codex_auth` no longer need a `Config` at all. The
`secrets.allowed` refusal now intersects against `OPERATIONAL_SECRETS`
and behaves as before. A leftover override key fails with the rename to
make, rather than being warned past into workflows that read a secret
the adopter doesn't have.

Rendered YAML is byte-identical — every regtest output is unchanged.
`tend init --dry-run` against this repo's config emits the same four
names, and `tend check` reports the same two pre-existing failures on
`CLAUDE_CODE_OAUTH_TOKEN` still sitting at repo level.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

@tend-agent tend-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new invariant test is parameterized on harness but its expected set isn't, so a template naming the other harness's auth secret still passes — the docstring's "a secret that nothing provisions" case. Adding x: ${{ secrets.<<claude_token_secret>> }} to the codex branch of agent_step passes today's assertion; with the two suggestions below it fails as tend-review.yaml reads a secret the codex harness does not provision: ['CLAUDE_CODE_OAUTH_TOKEN']. 338 tests pass with both applied.

Comment thread generator/tests/test_generate.py Resolved
Comment thread generator/tests/test_generate.py Resolved
`tend check` verifies the bot token plus the selected harness's auth
secret, so `<= OPERATIONAL_SECRETS` accepted a claude workflow reading
`secrets.OPENAI_API_KEY`, and the reverse — the same empty-token failure
the test claims to catch, and the reason the parametrize did no work.

Confirmed by adding `x: ${{ secrets.<<claude_token_secret>> }}` to the
codex branch of `agent_step`: it passes the old assertion and fails the
new one as `tend-review.yaml reads a secret the codex harness does not
provision: ['CLAUDE_CODE_OAUTH_TOKEN']`.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 3b46066 into main Aug 6, 2026
8 checks passed
@max-sixty
max-sixty deleted the secret-name-constants branch August 6, 2026 04:23
@max-sixty max-sixty mentioned this pull request Aug 12, 2026
max-sixty added a commit that referenced this pull request Aug 12, 2026
Release 0.1.15: version bump, lockfile, and the CHANGELOG section the
release workflow publishes verbatim as the GitHub Release notes.

84 commits since 0.1.14. The adopter-facing headlines: a maintainer can
now release the spike rate limit by closing the `tend-rate-limit` issue
it files ([#874](#874));
`tend-review` folds a mid-review push into the running session behind an
examined-HEAD gate instead of cancelling it
([#903](#903));
`credential-environments` reads five repo shapes it previously misread;
and the four `secrets.*` name overrides are gone, with a leftover key
failing on the rename to make
([#861](#861)).

Six PRs in the range are deliberately uncited in the notes: the 0.1.14
workflow regeneration, a `TODO.md` narrowing, a `consumers.json`
refresh, a skill-preamble version drop, and
[#902](#902) with its revert
[#904](#904), which cancel out.
Every other PR in `0.1.14..main` has a bullet, and every cited number
resolves to a merged PR.

The tag comes after this merges, so `max-sixty/tend/<harness>@0.1.15`
resolves before any workflow pins it.

> _This was written by Claude Code on behalf of max-sixty_
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.

2 participants