Skip to content

fix(ci): report real errors from the snapshot editor permission check - #702

Open
Farhan (farhankhalaf) wants to merge 1 commit into
mainfrom
fix/snapshot-permission-errors
Open

Farhan (farhankhalaf) wants to merge 1 commit into
mainfrom
fix/snapshot-permission-errors

Conversation

@farhankhalaf

@farhankhalaf Farhan (farhankhalaf) commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #698. The trusted-editor guard in Update Snapshots turned every failed collaborator-permission lookup into none, so a 403, rate limit or 5xx read as "has 'none' access". Only a 404 (no such user) now maps to none; any other failure stops with GitHub's own error. The guard still fails closed in every case.

#no-linear

Test Plan

  • Ran the edited step against a stub gh for write, read, none, 404, 403, 500 and network failures, plus a fork head repo. Write passes; read, none and 404 report missing access; 403, 500 and network failures report the real error; the fork fails the same-repo check.
  • shellcheck clean; actionlint shows only the existing arc runner label.
  • Dispatch on this branch against a fork PR stops at the same-repo check.
  • Writer acceptance on a same-repo PR not exercised here.

Docs

  • No docs update needed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GziRseGZMsJ5Yf7EboZLMc


Summary by cubic

Fixes the snapshot editor permission check in the update-snapshots workflow so 403s, rate limits, and 5xx errors now stop the job with GitHub's real error, instead of being read as "none" access. Only a 404 (no such user) maps to "none"; the guard still fails closed in every case.

Written for commit c3afc32. Summary will update on new commits.

View guided diff Turn on auto-fix

The trusted-editor guard mapped every GitHub API failure to "none", so a
403, rate limit or 5xx read as missing access. Only a 404 (no such user)
now maps to "none"; any other failure stops with the API's own error. The
guard still fails closed in every case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T04:32:50.484295Z c3afc32 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sonarqubecloud

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 1 file

View guided diff | Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

Updates the snapshot editor check to distinguish missing access from API failures.

  • The snapshot check now shows non-404 permission lookup errors.

Reviews (1) · Last reviewed commit: "fix(ci): report real errors from the sna..." · Reviewed by Greptile

@github-actions

Copy link
Copy Markdown
Contributor
Messages
📖

🤖 This PR touches CI / infra — reviewers please pay extra attention:

  • .github/workflows/update-snapshots.yaml

📋 PR Overview

Lines changed 13 (+12 / -1)
Files 0 added, 1 modified, 0 deleted
Draft / WIP no
Has Test Plan yes
Linear issue no
No Test Plan Needed no
New UI components no
New Storybook stories no
New Rust modules no
New TS source files no
New tests no
package.json touched no
Cargo.toml touched no
Infra / CI touched yes

🔬 Coverage

Report Lines Statements Functions Branches
apps/native/coverage/coverage-summary.json 35.0% 34.4% 29.8% 29.6%

Generated by 🚫 dangerJS against c3afc32

@darkmatter

darkmatter Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook preview

Open Storybook preview

Updated for c3afc32


⚠️ Detected UI changes (5)

These stories' HTML snapshots changed. I've added screenshots + links to the changed stories below. Review them carefully then accept the changes to regenerate baselines and include them in this PR:

Flows/Evolve › Playground

Flows/Evolve › Playground

Flows/Evolve › 1. Begin (idle)

Flows/Evolve › 1. Begin (idle)

Flows/Evolve › 2. Evolving (progress)

Flows/Evolve › 2. Evolving (progress)

Flows/Evolve › Evolving With Error Event

Flows/Evolve › Evolving With Error Event

Flows/Evolve › 3. Review (changes generated)

Flows/Evolve › 3. Review (changes generated)


Accept UI changes

  • Click here to accept these changes

Alternatively, you can run bun run test:update-snapshots locally to re-generate the baselines and then push the changes to this PR.

What does this do?

The screenshots above show UI changes detected by the Storybook
snapshot tests run on this PR. Each image is the rendered output of
a Storybook story from the code in this PR branch; the snapshot
test compared it against the committed baseline in
__snapshots__/ and flagged the difference.

Checking the box tells the darkmatter[bot] to regenerate the
baselines from this PR's current code and commit them directly to
this branch. The new baselines become the source of truth for
future runs — only accept after confirming the visual changes are
intentional.

Comparison baseline: the committed __snapshots__/ files on this
PR branch (carried forward from develop). Accept updates them in
place on this branch.

This branch was successfully deployed

1 active deployment
storybook-preview — c3afc325 Deployed Nov 10, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant