Skip to content

fix(ci): authorize visual acceptance by capability - #5594

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

fix(ci): authorize visual acceptance by capability#5594
cixzhang merged 1 commit into
mainfrom
fix/visual-acceptance-effective-capability

Conversation

@cixzhang

@cixzhang cixzhang commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Why

#5592 normalized GitHub's collaborator-permission response but still allowed the reported role name to grant authority. Role names are provenance, not a stable capability boundary. Endpoint authorization must depend only on strict effective maintain or admin booleans.

What

  • Parse endpoint capabilities fail-closed: only nested admin === true or maintain === true authorizes.
  • Never fall back to top-level permission when handling an endpoint response; false, strings, null, arrays, missing fields, and malformed capability data refuse.
  • Keep reported permission and role as immutable-record provenance only.
  • Validate legacy records in a separate trust domain: records without effectivePermission may use raw maintain or admin; legacy write fails.
  • Preserve #5593's dependency install and the dependency-free accept path.
  • Pin the authorization checkout invariant: trusted default-branch code with no explicit ref.

Risk

Low and fail-closed. This removes a mutable role-name authorization path without widening the accepted capability set.

Testing

  • Focused authorization, acceptance, and workflow tests: 3 files, 52 tests
  • Full visual-gate suite: 14 files, 149 tests
  • actionlint .github/workflows/visual-acceptance.yml
  • pnpm check:repo
  • Exact #5162 124-frame dry-run from pre-cleanup gh-pages commit be6f3351c823f6b62c59eb29507cb4518024eacc: capability path returns success:accepted; role-only and raw-admin fallback attempts fail
  • Full CI on the exact head

No live acceptance command was replayed.

@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 8:30am

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

@cixzhang
cixzhang force-pushed the fix/visual-acceptance-effective-capability branch from c0abfdc to b585189 Compare August 27, 2026 08:21
github-actions Bot added a commit that referenced this pull request Aug 27, 2026
@cixzhang
cixzhang force-pushed the fix/visual-acceptance-effective-capability branch from b585189 to e743f44 Compare August 27, 2026 08:26
github-actions Bot added a commit that referenced this pull request Aug 27, 2026
@cixzhang
cixzhang merged commit 1d94f85 into main Aug 27, 2026
27 of 28 checks passed
@github-actions
github-actions Bot deleted the fix/visual-acceptance-effective-capability 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