A reusable workflow's `secrets: required: true` only validates that the
caller declared the key — not that a value arrived or that it works. Both
failure modes therefore surfaced inside actions/checkout:
- deleted secret -> "Input required and not supplied: token"
- unscoped token -> "remote: Write access to repository not granted." 403
Both read as checkout bugs. After the 2026-07-16 org sweep deleted
MINDBURN_ORG_READ_TOKEN, the docs gate was red for five days and the
first error pointed at the wrong layer; the restored-but-unscoped value
on 2026-07-21 then produced the second error, again pointing at checkout.
Probe the token before the first checkout and name the real cause,
distinguishing empty / 401 / 403 / 404. Subject repo is passed via env
rather than interpolated into the run block.
Callers pin this workflow by SHA, so each caller picks the guard up when
it repins. Refs HELM-311, HELM-41.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Why
A reusable workflow's
secrets: required: trueonly validates that the caller declared the key — not that a value arrived, nor that it can read anything. So every token problem surfaces two layers downstream, insideactions/checkout, wearing the wrong error message:Input required and not supplied: tokenremote: Write access to repository not granted.→403Both read as checkout bugs. That ambiguity is most of what made HELM-311 expensive:
MINDBURN_ORG_READ_TOKEN. Docs Truth went red onmainfor five days, and the error pointed atactions/checkoutrather than at a missing secret. The gate also never produced a report, so the orphan-ledger comment step logged "nothing to comment on" — the gate looked broken rather than unconfigured.403, still inside checkout, and still not naming the token.What this does
Probes the token once, before the first checkout, and names the real cause — distinguishing empty,
401(invalid/expired),403(valid but insufficient scope), and404(no access to that repo).Roughly 15 lines, no new dependencies, no new permissions. The subject repo goes in via
env:rather than being interpolated into therun:block.Rollout
Callers pin this workflow by SHA, so nothing changes for them until each repin — the guard lands inert and arrives per caller. Note
mainhere is already ahead of thef609d37amost callers pin; four different pinned versions are live across the nine callers, which is worth collapsing separately.Verification
The failure it catches is live right now: six callers (
mindburn-infra,docs_for_team,homebrew-tap,gitops-platform,helm-ai-enterprise,helm-agent-integrations) still reference the brokenMINDBURN_ORG_READ_TOKEN. Repinning any one of them to this commit should surface a named token error instead of a checkout error.Refs HELM-311, HELM-41.
🤖 Generated with Claude Code