fix(ci): preserve trusted visual run identity - #5587
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ad92471 to
d852ab0
Compare
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size SummaryNo component packages changed. Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
cixzhang
left a comment
There was a problem hiding this comment.
Thanks, the run-identity fix reproduces cleanly. One blocker remains: the current head no longer grants pull-requests: write to initialize or accept, so #5162 still gets a 403 deleting visual-approved and required acceptance cannot finish (visual-acceptance.yml:28,210). Please restore the job-scoped permissions and their regression assertion before merge.
[Reviewed by Robohands]
d852ab0 to
1b1e3d8
Compare
cixzhang
left a comment
There was a problem hiding this comment.
Thanks—the blocker is fixed at 1b1e3d89808: both mutation jobs have scoped PR write access, authorization stays read-only, and the identity repro passes. Good to merge.
[Reviewed by Robohands]
Why
Accepted visual PRs such as #5214 and #5558 cannot merge because immutable visual evidence rejects its own trusted recapture.
The reproduced publisher logs show:
pr-comment.ymlattempted to replaceGITHUB_RUN_IDandGITHUB_RUN_ATTEMPTwith those triggering CI identities. GitHub's defaultGITHUB_*variables are immutable, sogate.mjsinstead recorded the PR Comment workflow identities intrusted-capture/manifest.json;publish-pr-report.mjsthen correctly rejected the mismatch.The same required gate had a second live permission blocker on #5162:
Both affected jobs mutate a label on a pull request, so they need job-scoped
pull-requests: write;issues: writealone did not authorize that API call.What
ASTRYX_VISUAL_RUN_ID/ASTRYX_VISUAL_RUN_ATTEMPTvariables.visual-approved.Tests
pnpm exec vitest run .github/scripts/visual-gate— 13 files, 117 testsactionlinton the changed workflows (ignoring the existing custom-runner label warning)