Skip to content

ci(coverage): push refreshed map via classic PAT (CACHE_PUSH_TOKEN)#1467

Merged
sbryngelson merged 1 commit into
MFlowCode:masterfrom
sbryngelson:coverage-refresh-pat-final
May 30, 2026
Merged

ci(coverage): push refreshed map via classic PAT (CACHE_PUSH_TOKEN)#1467
sbryngelson merged 1 commit into
MFlowCode:masterfrom
sbryngelson:coverage-refresh-pat-final

Conversation

@sbryngelson
Copy link
Copy Markdown
Member

Why

The coverage-refresh push to master needs to bypass the master ruleset's require-PR rule. We tried a GitHub App (mfc-map-bot), but GitHub Apps cannot bypass the require-PR rule for direct pushes — a documented limitation (discussion #136531). A classic PAT authenticates as a user; an org-owner user is an OrganizationAdmin, which is an honored bypass actor.

Change

Push with CACHE_PUSH_TOKEN (now a classic org-owner PAT, repo scope) instead of the app token. The persist-credentials: false fix from #1466 is retained — it ensures the PAT is the identity used for the push rather than the hijacking GITHUB_TOKEN extraheader (the real reason every earlier attempt failed).

Verified

A throwaway smoke-test workflow pushed a commit to protected master with require-PR active using exactly this mechanism — it landed (mfc-bot test: pat-push smoketest), then was cleaned up. So the full chain (SLURM collect → --no-verify commit → PAT push) is proven end-to-end.

Follow-up cleanup

  • Remove the now-unused Integration bypass actor (mfc-map-bot) from the master ruleset.
  • The mfc-map-bot App and its secrets (MAP_BOT_APP_ID, MAP_BOT_APP_PRIVATE_KEY) can be deleted.

GitHub Apps cannot bypass the require-PR ruleset rule for direct pushes (documented limitation), so the app-token approach was abandoned. A classic PAT from an org-owner authenticates as a user with OrganizationAdmin bypass, which IS honored. Verified via a smoke-test that pushed to protected master with require-PR active. persist-credentials:false (already on master) ensures the PAT is the identity used, not GITHUB_TOKEN.
Copilot AI review requested due to automatic review settings May 30, 2026 19:08
@sbryngelson sbryngelson merged commit a14c579 into MFlowCode:master May 30, 2026
20 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants