Skip to content

fix(ci): push the lockfile fix as the App so CI is not gated - #297

Merged
robcohen merged 1 commit into
mainfrom
fix/lockfile-workflow-token
Aug 22, 2026
Merged

robcohen merged 1 commit into
mainfrom
fix/lockfile-workflow-token

Conversation

@robcohen

Copy link
Copy Markdown
Member

The problem

A push made with GITHUB_TOKEN is attributed to github-actions[bot], and every workflow run it creates lands in action_required, waiting on a manual "Approve and run workflows".

Confirmed on #296 — the runs for the lockfile-fix commit d0a0f5e2:

event=pull_request  actor=github-actions[bot]  triggering_actor=github-actions[bot]
conclusion=action_required   (x5)

The run that did the pushing (actor=dependabot[bot], on the original SHA) succeeded, so nothing looks wrong from the inside.

What makes it costly is how it presents: the check list shows a single green license/cla and no failures, which reads as "CI hasn't started" rather than "CI is blocked". #282 sat that way for six days and was only found while reviewing it. #296 is sitting that way right now.

Only frontend Dependabot PRs are affected, because only they touch frontend/package.json and so fire this workflow. #294 and #295 opened in the same minute and ran green throughout — a clean control.

The fix

Push with a GitHub App installation token, which makes the resulting runs ordinary. The repo already generates one this way in update-rustledger.yml and update-flake-sources.yml.

The caveat, and why the fallback is loud

Dependabot-triggered runs read the Dependabot secrets store, which is separate from the Actions store those two workflows use. If BOT_APP_ID and BOT_PRIVATE_KEY are only registered as Actions secrets, they're invisible here and the token step yields nothing.

I couldn't verify which stores they're in — reading org secrets needs admin:org, which I don't have. Repo-level secrets are genuinely empty in both stores, so they must be org-level.

So the token step is conditional and checkout falls back to GITHUB_TOKEN. That preserves today's behaviour rather than breaking the lockfile fix outright — but the fallback emits a ::warning:: naming the missing secrets and stating that the runs will need approval. A degraded path that announces itself is the entire point here; silently reverting to the broken behaviour is what let this go unnoticed for six days.

Action needed from someone with org admin: confirm BOT_APP_ID and BOT_PRIVATE_KEY exist as Dependabot org secrets (Settings → Secrets and variables → Dependabot), not just Actions ones. Until then this PR changes nothing except adding the warning.

Verification

actionlint exits 0. Commits are attributed to whoever actually pushes, via the action's app-slug output — I checked that output exists in the action's action.yml rather than assuming it. All three paths tested locally:

app-slug commit author result
present <slug>[bot] commits, pushes
absent github-actions[bot] commits, pushes (today's behaviour)
no lockfile change — "No lockfile changes", exit 0

How to confirm it worked

The next frontend Dependabot PR should show its full check suite running without an approval prompt, and the regenerate commit authored by the App rather than github-actions[bot]. If the warning appears in the job log instead, the secrets still need adding to the Dependabot store.

A push made with GITHUB_TOKEN is attributed to github-actions[bot], and
every workflow run it creates lands in `action_required` awaiting a
manual "Approve and run workflows".

That is what has been happening to frontend Dependabot PRs. Confirmed on
#296: the runs for the lockfile-fix commit d0a0f5e carry
actor=github-actions[bot], triggering_actor=github-actions[bot], and
conclusion=action_required — five of them. The run that did the pushing
(actor=dependabot[bot], on the original SHA) succeeded, so nothing looks
wrong from the inside.

The reason it goes unnoticed is that the check list then shows a single
green license/cla and no failures, which reads as "CI hasn't started"
rather than "CI is blocked". #282 sat that way for six days and was only
found while reviewing it; #296 is sitting that way now.

Only frontend Dependabot PRs are affected, because only they touch
frontend/package.json and so fire this workflow. #294 and #295 opened in
the same minute and ran green throughout — a clean control.

Pushing with a GitHub App installation token makes the resulting runs
ordinary. The repo already generates one this way in
update-rustledger.yml and update-flake-sources.yml.

One caveat that cannot be verified from here: Dependabot-triggered runs
read the *Dependabot* secrets store, which is separate from the Actions
store those two workflows use. If BOT_APP_ID and BOT_PRIVATE_KEY are
only registered as Actions secrets they are invisible to this workflow.
Reading org secrets needs admin:org, which I do not have.

So the token step is conditional and the checkout falls back to
GITHUB_TOKEN, preserving today's behaviour rather than breaking the
lockfile fix outright — but the fallback emits a ::warning:: naming the
missing secrets and saying the runs will need approval. A degraded path
that announces itself is the whole point; silently reverting to the
broken behaviour is what made this take six days to find.

Commits are attributed to whoever actually pushes them, via the action's
app-slug output. Verified all three paths locally: app-slug present
commits as <slug>[bot], absent commits as github-actions[bot], and no
lockfile change still short-circuits to "No lockfile changes".

actionlint clean.
@robcohen
robcohen merged commit a8eb0da into main Aug 22, 2026
32 checks passed
@robcohen
robcohen deleted the fix/lockfile-workflow-token branch August 22, 2026 02:54
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.

1 participant