Skip to content

fix(ci): preserve visual reports during preview deploy - #5696

Merged
cixzhang merged 1 commit into
facebook:mainfrom
cixzhang:fix-preview-preserve-visual
Aug 31, 2026
Merged

fix(ci): preserve visual reports during preview deploy#5696
cixzhang merged 1 commit into
facebook:mainfrom
cixzhang:fix-preview-preserve-visual

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Summary

  • preserve pr/<number>/visual/ when replacing a PR's Storybook and Sandbox preview
  • add a same-PR regression so preview deployment cannot silently delete published visual evidence

Why

A live audit found #5682 had a successful visual-acceptance status pointing to a 404. Its later preview deployment replaced all of pr/5682/, including the sibling visual/ tree.

Test plan

  • pnpm exec vitest run .github/scripts/lib/gh-pages-publisher.test.mjs
  • pnpm exec prettier --check .github/scripts/lib/gh-pages-publisher.mjs .github/scripts/lib/gh-pages-publisher.test.mjs
  • pnpm check:repo
  • git diff --check

@vercel

vercel Bot commented Aug 30, 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 30, 2026 4:42pm

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 30, 2026
@github-actions

github-actions Bot commented Aug 30, 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

@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.

Semantic verdict: request changes

Thanks—this fixes the deletion path, but a later preview deploy can still replace the trusted visual evidence a maintainer is trying to review. replacePreviewContents() skips visual, then copyContents(storybookDir, destination) accepts it again; my exact-head probe changed seeded “newer trusted evidence” to PR-controlled artifact bytes. Please make pr/<number>/visual/ write-protected for both removal and copy, and add that collision as a regression. Retry, idempotency, other-PR, and cleanup paths otherwise held.

[Reviewed by Robohands]

@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.

Semantic verdict: approve

Thanks—this is an approve once you undraft. A reserved visual artifact now rejects before any destination mutation; retry, idempotency, cleanup, and cross-PR isolation still hold.

Full review

[Reviewed by Robohands]

@cixzhang
cixzhang marked this pull request as ready for review August 30, 2026 17:49
@cixzhang
cixzhang merged commit 8cc1372 into facebook:main Aug 31, 2026
29 checks passed
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