Skip to content

fix(ci): read tier 0 workflow runs with the job token - #416

Merged
tbhb-agent merged 2 commits into
mainfrom
agent/r78-actions-token
Nov 25, 2026
Merged

tbhb-agent merged 2 commits into
mainfrom
agent/r78-actions-token

Conversation

@tbhb-dev-agent-pull-requests

@tbhb-dev-agent-pull-requests tbhb-dev-agent-pull-requests Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Why

This replaces #413, which a failing pin check blocked. The README example now keeps the full commit hash.

The approver App has no Actions permission. The token step requested it, GitHub refused, and every tier 0 approval run in the wiki repository failed there. Granting the permission needs a settings change by @tbhb.

Behavior change

The token step requests checks, contents and pull request access from the App, and no Actions access. The one call that lists workflow runs uses the job's own token, which now has actions: read. Checks, contents and pull request reads stay on the App token, and the merge step is unchanged. Callers must grant actions: read on the calling job.

Decisions

The workflow runs call is the only Actions read in the decision code, so a second token variable covers it. A missing variable ends the decision with the hold reason missing-actions-token.

Risk

This changes the credentials a tier 0 decision uses, so it takes tier 2. The job token can read Actions data only. It can't approve or merge, and the merge step keeps the same token as before. A caller without actions: read fails its workflow run at startup.

Verification

  • Branch coverage stays at 100 percent, including the new token routing. The size check reported pr_size: code=74/400 raw=78/1500.
  • Unit tests cover the Actions call with the job token, other calls with the App token, and the missing token hold.
  • After merge, the wiki caller adds actions: read and updates its pin. Its next pull request run should pass the token step.

Generated-by: LLM effort=high;harness=codex:0.166.0;model=openai:gpt-6.2-sol;session=sha-256-64:fef438e4839683a2;surface=exec
Generated-by: LLM effort=medium;harness=codex:0.171.0;model=openai:gpt-6.2-sol;session=sha-256-64:4bcb0735834b4be1;surface=exec
Assisted-by: LLM effort=medium;harness=claude-code:2.1.331;model=anthropic:claude-sonnet-5-5;session=sha-256-64:debb814921f029ad;surface=cli

Generated-by: LLM effort=high;harness=codex:0.166.0;model=openai:gpt-6.2-sol;session=sha-256-64:fef438e4839683a2;surface=exec
Follow-up to 9e95d69.

Generated-by: LLM effort=medium;harness=codex:0.171.0;model=openai:gpt-6.2-sol;session=sha-256-64:4bcb0735834b4be1;surface=exec
@tbhb-agent
tbhb-agent added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 2de1b06 Nov 25, 2026
58 checks passed
@tbhb-agent
tbhb-agent deleted the agent/r78-actions-token branch November 25, 2026 10:55
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