fangorn/ex_git_objectstore
public
ref:aa652cbbee354082e2ef6e087e0068d3ec0b0ae2
feat(ci): bump Anvil's pin with the job token, not a provisioned secret
Requires fangorn/anvil#245. DO NOT MERGE before that deploys — the currently
deployed parser rejects an unknown top-level `permissions:` key, which would
fail validation on every run in this repository. Verified against
origin/main's parser: `["top-level: unknown key 'permissions'"]`.
`bump-anvil-pin` needs write access to fangorn/anvil, which an Anvil job token
could not have: it is scoped to the repository that dispatched it. The stopgap
was ANVIL_PIN_BUMP_TOKEN, a separately provisioned CI secret — a long-lived
credential carrying a human's full authority across every repo they can reach,
with nothing recording what it was for. It was never provisioned, so the step
has been failing loudly since it landed (#51).
Anvil now supports cross-repo grants. The top-level `permissions:` block asks
for contents/pull_requests on fangorn/anvil, an admin there approves the
request once from the repo's settings, and the ordinary injected ANVIL_TOKEN
carries those scopes for the life of the job. Nothing to provision, nothing to
rotate, and the credential dies with the job that used it.
Asking is not receiving. The block here is a request that can only narrow what
the grant allows, and with no grant it yields nothing — anyone who can open a
pull request against this repo can edit that file, so it cannot be the
authority.
Because Anvil reports every cross-repo refusal identically and without a
reason — deliberately, so a token cannot enumerate which repos have grants —
an unapproved request is indistinguishable from an ordinary auth failure at
the call site. `abort/1` therefore appends the approval instructions whenever a
failure looks like one, rather than guessing which it was.
REQ-CI-003 is updated to match: the property it asserts (the permission is
explicit, and a refusal fails with an actionable message rather than skipping
silently) is unchanged; only the mechanism moved from a secret to a grant.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
SHA:
aa652cbbee354082e2ef6e087e0068d3ec0b0ae2
Author:
Cole Christensen <cole.christensen@gmail.com>
Date:
2026-08-05 02:42
Parents:
abf04d1
3 files changed
+119
-37
| Type | ||
|---|---|---|
|
|
.anvil.yml | +21 −6 |
|
||
|
|
ci/pin_bump.exs | +78 −19 |
|
||
|
|
test/ci/pin_bump_test.exs | +20 −12 |
|
||