Repository navigation
docs(ci): record the model credential as environment-scoped - #3760
Merged
Merged
Conversation
CLAUDE_CODE_OAUTH_TOKEN moves from repo level into the tend environment, leaving CODECOV_TOKEN as the only repo-level secret. Every job that reads the model credential already names environment: tend, so the readers are unchanged. The environment-protection lead said "credentials that grant write access", which never described the set: the model credential grants no repo write, and now sits in an environment. It states the set directly instead. Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
worktrunk-bot
left a comment
Collaborator
There was a problem hiding this comment.
Reviewing as a draft — flagging anything that looks worth a quick fix. Mark ready for a full review.
One note on the Read by cell the PR is rewriting for clarity: the semicolons fix the exclusion-list misreading, but the remaining ambiguity is scope. append-gist and create-issue-on-benchmark-failure live in benchmarks.yaml, create-issue-on-nightly-failure in nightly.yaml — none of them are tend-*.yaml jobs, and nothing in the cell says so, so a reader still has to grep to find out whether the leading every tend-*.yaml job clause was meant to cover them.
| | Environment | Admits | Secret | Read by | | ||
| |-------------|--------|--------|---------| | ||
| | `tend` | `main` | `TEND_BOT_TOKEN` | every `tend-*.yaml` job but `relay`, `append-gist`, both `create-issue-on-*-failure` jobs | | ||
| | `tend` | `main` | `CLAUDE_CODE_OAUTH_TOKEN`, `TEND_BOT_TOKEN` | every `tend-*.yaml` job except `relay`; `append-gist`; both `create-issue-on-*-failure` jobs | |
Collaborator
There was a problem hiding this comment.
Suggested change
| | `tend` | `main` | `CLAUDE_CODE_OAUTH_TOKEN`, `TEND_BOT_TOKEN` | every `tend-*.yaml` job except `relay`; `append-gist`; both `create-issue-on-*-failure` jobs | | |
| | `tend` | `main` | `CLAUDE_CODE_OAUTH_TOKEN`, `TEND_BOT_TOKEN` | every `tend-*.yaml` job except `relay`; plus `append-gist` and `create-issue-on-benchmark-failure` in `benchmarks.yaml`, and `create-issue-on-nightly-failure` in `nightly.yaml` | |
This was referenced Aug 7, 2026
max-sixty
marked this pull request as ready for review
August 7, 2026 07:32
worktrunk-bot
approved these changes
Aug 7, 2026
max-sixty
pushed a commit
that referenced
this pull request
Aug 7, 2026
Nightly sweep finding: the last paragraph of "Environment protection" in `.github/CLAUDE.md` describes a gap that closed the same night it was written. #3748 added the paragraph saying the generated `tend-*.yaml` files "still carry the bare `environment: tend`" and that `tend check`'s `environment-deployments` "fails until a `uvx tend@latest init` regen lands them on tend ≥ 0.1.14". #3749 merged 3 hours later and did exactly that regen — every generated job now reads `{name: tend, deployment: false}`, and tonight's `tend check` reports `environment-deployments` as `PASS`. Left as-is, the file tells the next reader to expect a failure that no longer happens and a regen that already ran. The rewrite keeps the durable half — the generated files aren't hand-edited, because `uvx tend@latest init` overwrites them — and states the resolution instead of the pending action. <details><summary>Evidence</summary> Current state of the generated files (all eight are identical in shape): ``` $ grep -A2 'environment:' .github/workflows/tend-nightly.yaml environment: name: tend deployment: false ``` Tonight's `tend check`, run by the nightly sweep: ``` PASS environment-deployments — No job files a deployment for the 'tend' environment ``` The three checks still failing (`credential-environments`, `claude-auth`, `repo-secret-allowlist`) are tracked in #3729 and are repository-settings changes, unrelated to this file. #3760 edits the same section but not these lines, so the two don't conflict. </details> No test accompanies this — it's a documentation-only change to a file no test reads. Co-authored-by: worktrunk-bot <[email protected]>
This branch was previously deployed
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.
Documents
CLAUDE_CODE_OAUTH_TOKENmoving out of repo-level storage and into thetendenvironment — the last operational secret still sitting where any workflow the repo runs could read it, and the remainingrepo-secret-allowlistfailure after #3748. The environment copy is set; the repo-level copy is deleted once this PR's owntend-reviewrun comes back green.That run is the verification. An environment secret outranks a repo-level one of the same name, so a job naming
environment: tendalready reads the new value while both exist — which means the credential is exercised end to end before anything is removed, rather than after.Nothing about who reads the token changes. All eight readers —
triage,handle,fix-ci,nightly,review-runs,notifications,weekly,review— already declareenvironment: tend.The lead sentence of "Environment protection" claimed environments hold "credentials that grant write access". That was never the set — the model credential grants no write access to anything in this repo, and it now lives in one. It states the set directly instead, with the reason
CODECOV_TOKENstays outside it.The
tendrow's "Read by" cell also picks up semicolons.every tend-*.yaml job but relay, append-gist, both create-issue-on-*-failure jobsreads as one four-item exclusion list, which would sayappend-gistdoesn't read the token — it does.