Skip to content

fix(ci): restore visual acceptance publication - #5588

Merged
cixzhang merged 1 commit into
mainfrom
fix/visual-acceptance-label-permissions
Aug 27, 2026
Merged

fix(ci): restore visual acceptance publication#5588
cixzhang merged 1 commit into
mainfrom
fix/visual-acceptance-label-permissions

Conversation

@cixzhang

@cixzhang cixzhang commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Why

The required visual-acceptance gate can still strand stable-visual PRs after #5587 fixed its source run/attempt identity and granted PR mutation permission:

  • The initializer still deletes visual-approved itself. That mixes the lightweight head-status initializer with advisory PR mutation and requires broader credentials than classification needs.
  • Trusted recapture still attempts to replace reserved GITHUB_SHA. GitHub keeps that value bound to the publisher workflow, so immutable evidence can record the publisher commit instead of the captured PR head.

#5162 exposed the initializer failure after #5578 made the context required.

What

  • Reuses fix(ci): preserve trusted visual run identity #5587's ASTRYX_VISUAL_RUN_ID / ASTRYX_VISUAL_RUN_ATTEMPT implementation and extends it with ASTRYX_VISUAL_SHA rather than duplicating the identity helper.
  • Keeps the initializer limited to read access plus commit-status writes.
  • Moves head/rerun label invalidation to the existing trusted workflow_run publisher and gives only mutating jobs pull-requests: write.
  • Preserves success for no-scope and clean captures without requiring an acceptance record.

The immutable gh-pages acceptance record remains authoritative. Statuses, comments, and visual-approved remain derived projections. Fork code is downloaded only as a static Storybook artifact and never receives write credentials.

Verification

  • Full visual-gate suite: 13 files, 118 tests
  • actionlint on all three visual-acceptance workflows (with the repository's custom runner label allowed)
  • pnpm check:repo
  • Exact #5162 artifact dry-run: trusted publication derives 18 shots with 16 additions and no failures; state is correctly pending:decision, then an isolated immutable acceptance for PR/head/run 5162 / 66ef14d69ed5f32c469c78cb2e8395bfe23ec633 / 33041576630/1 produces success:accepted with 16 archived AFTER hashes.

The live #5162 capture is not a zero-diff capture: it still needs explicit visual acceptance after this process fix lands and its trusted publisher is rerun.

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview Aug 27, 2026 6:41am

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 27, 2026
@cixzhang
cixzhang force-pushed the fix/visual-acceptance-label-permissions branch from 1e0fee6 to aa61931 Compare August 27, 2026 05:53
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

No component packages changed.

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

github-actions Bot added a commit that referenced this pull request Aug 27, 2026

@cixzhang cixzhang left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, this looks good. The trusted publisher keeps PR writes, and the ASTRYX_* identity fixes the source-run mismatch. Approve once undrafted.

[Reviewed by Robohands]

@cixzhang
cixzhang marked this pull request as ready for review August 27, 2026 06:11

@cixzhang cixzhang left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, this looks good. The trusted publisher now owns label writes, and ASTRYX_* keeps recapture identity tied to the source CI run.

[Reviewed by Robohands]

@cixzhang
cixzhang force-pushed the fix/visual-acceptance-label-permissions branch from aa61931 to ff779be Compare August 27, 2026 06:38
github-actions Bot added a commit that referenced this pull request Aug 27, 2026

@cixzhang cixzhang left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, still looks good after the #5587 rebase.

[Reviewed by Robohands]

@cixzhang
cixzhang merged commit 9e2f1e1 into main Aug 27, 2026
26 of 27 checks passed
@github-actions
github-actions Bot deleted the fix/visual-acceptance-label-permissions branch August 27, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant