Skip to content

fix(e2e): say which check refused a stage run, and skip e2e on other branches' manual runs - #2103

Merged
dawsontoth merged 4 commits into
stagefrom
claude/e2e-gate-stage-diagnostics
Nov 14, 2026
Merged

dawsontoth merged 4 commits into
stagefrom
claude/e2e-gate-stage-diagnostics

Conversation

@dawsontoth

@dawsontoth dawsontoth commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor
A fox ranger points from a painted tag to the puzzle-locked gate, showing which gate turned a traveler away

⊙ Problem

The first stage run of the post-deploy gate (run 43506503995) failed two specs on stage setup, not on Studio. Both messages pointed the wrong way: signup's 403 blamed the email-domain allowlist when reCAPTCHA had refused it, and org-users called a missing organization unlikely when that was the cause.

💡 Solution

  • The signup spec names the central-manager check behind a 403 (Forbidden is the allowlist, Verification failed is reCAPTCHA) and says whether the page sent a token.
  • The org-users spec recognises Studio's "Create an organization" page and says the account has no organization.
  • Both e2e jobs skip on a manual run from another branch, which still deploys but cannot open the job's environment.
  • The setup docs list the three things a target's central-manager needs (allowlist, reCAPTCHA threshold, an organization); stage now has them.

🔧 Changes

✅ Verification

  • Re-ran the failed job twice on the same build after the stage changes. Signup now gets past reCAPTCHA, but both runs hit a central-manager login outage on stage (every sign-in since about 21:15 UTC returns 500, a regular browser session included), so the organization fix is not yet confirmed live.

  • signupRefusal.unit.spec.ts covers each refusal shape and the token check, and workflowPrivilege.test.ts pins the branch guard on both jobs. Each of these turns a test red: removing the guard, swapping the token branch, dropping the Forbidden case, checking Forbidden before reCAPTCHA, or ignoring a plain-string body.

  • Gate on this branch: vitest for the two workflow suites (83 tests), the e2e unit project (36), the e2e project's tsc --noEmit, oxlint and dprint.

  • Not exercised live: the new messages, since stage no longer meets either condition.

🤖 Generated with Claude Code

Related PRs: #1757 overlaps (this fixes what its first stage run found)
Complexity: easy

Review-Coverage: authored=claude; ran=cursor-composer,gemini,codex,cursor-grok; late=cursor-grok:adjudicated; adjudicated=domain; declined=muse; rounds=3; full=2 @ 0d37876

Review-Attention: skim ~2m @ 0d37876

dawsontoth and others added 4 commits November 13, 2026 16:16
The first stage gate run failed two specs on setup, not on Studio, and
both messages pointed the wrong way. Signup's 403 blamed the email-domain
allowlist, which was already right: the refusal was stage's reCAPTCHA
check ("Verification failed"), which local and dev skip. The org-users
failure called a missing organization unlikely, and that was the cause.

The signup message now names the check from central-manager's title,
and for reCAPTCHA says whether the page sent a token. The org-users spec
recognises Studio's "Create an organization" page. The deploy docs list
the three things a target's central-manager needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A manual Deploy to Dev or Stage from any other branch still deploys, but
the e2e environment admits only its own branch, so the job failed on the
environment and turned a working deploy red. It now runs only on the
branch its workflow deploys from, and a workflow test pins that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…llowlist

Review follow-ups. The signup classifier now reads the same shapes
Studio's isCaptchaVerificationError does (a plain string, error,
message, title, detail) and checks reCAPTCHA before Forbidden, so a
mixed envelope is not sent to the allowlist. E2E_ALLOW_SIGNUP_403_SKIP
now skips only a Forbidden refusal, so it cannot hide reCAPTCHA or an
authz regression. The org-users check waits briefly for the new-org page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 85.69% 23069 / 26920
🔵 Statements 85.49% 24486 / 28640
🔵 Functions 81.57% 6416 / 7865
🔵 Branches 81.19% 20116 / 24775
File CoverageNo changed files found.
Generated in workflow #2588 for commit 0d37876 by the Vitest Coverage Report Action

@dawsontoth
dawsontoth marked this pull request as ready for review November 13, 2026 23:45
@dawsontoth
dawsontoth requested a review from a team as a code owner November 13, 2026 23:45
@dawsontoth
dawsontoth added this pull request to the merge queue Nov 14, 2026
Merged via the queue into stage with commit 493b250 Nov 14, 2026
7 checks passed
@dawsontoth
dawsontoth deleted the claude/e2e-gate-stage-diagnostics branch November 14, 2026 19:17
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.

2 participants