PR evidence · RubberDuck · PR #137 → staging

PR #137: what the end-to-end videos prove

Agent setup: pinned env, AGENTS.md, CI gates, critical E2E, reviewer skill. This PR gets the repo ready for cloud agents to build PRs without you. Nothing in it deploys, merges or touches production.

What the PR changes

  • Pinned environment: .nvmrc, .cursor/environment.json and .cursor/install.sh, so every cloud machine is set up the same way.
  • Rules: AGENTS.md, which CLAUDE.md points to.
  • CI gates in .github/workflows/ci.yml: lint on changed files, a type check, a check on new code, and the new e2e-critical job.
  • Critical-workflow E2E tests in frontend/tests/e2e/, written with Playwright.
  • Reviewer skill at .cursor/skills/review/SKILL.md, used by the separate reviewer agent.

Why the videos exist

The videos come from the new critical-workflow tests. Whenever a PR touches a critical path (sign-in, the dashboard, Study Ducky), CI opens a real browser against staging.rubberduckai.com, signs in as a test teacher or test student, and checks where it lands.

Each test records a video, so you can see that the flow really works without clicking through it yourself. These four come from the PR's own run. Each video shows the tests working. Later PRs will use the same tests to show their features still work.

How it runs

Pull requesttouches a critical pathsign-in · dashboard · Ducky CI: e2e-criticalGitHub Actionsonly the 4 test logins Playwright → stagingreal browser, real sign-inwrites blocked (support.ts) Evidencevideos · traces · report→ this page The tests refuse production hosts. Staging shares the live database, so every write is blocked in the browser except the password sign-in.

The four videos

The clips are short (1.5 to 4.3 seconds) because Playwright moves quickly, so they start at 0.5× speed. Click a timestamp to jump there and pause.

1 · Teacher signs in and reaches their classes

PASS
What this checks
The test teacher (test-teacher+e2e@rubberduckai.com) signs in through the real teacher login on staging and lands on /teachers/classes with the "Your classes" heading showing.
Which part of the PR it proves
frontend/tests/e2e/auth.spec.ts, test "teacher signs in and reaches their classes". It also proves that wake-staging.ts works: before that step was added, this test failed in CI with "The server could not be reached" because staging had scaled to zero and was slow to start.
What to watch for
  • The empty "Welcome, teacher" form.
  • The test email is typed in. The password is masked.
  • The button turns grey and reads "Signing in…".
  • "Your classes" loads (0 classes · 0 learners). This is the pass condition.
Speed:

2 · Student signs in and lands on "Choose your plan"

EXPECTED STATE · flips when #136 ships
What this checks
The test student (test-student+e2e@rubberduckai.com) signs in on /sign-in?view=login. Today they land on /subscribe ("Choose your plan"). That's correct for now: a student who signed up alone needs paid access, and their free 1-year grant only counts once PR #136 ships.
Which part of the PR it proves
auth.spec.ts, test "student sign-in currently lands on /subscribe until #136 ships". It asserts the current behaviour on purpose. Once #136 is on staging, this test will fail, and that failure is the signal to switch on the student dashboard and Study Ducky tests (see "Not yet covered" below). It also proves the student login itself works.
What to watch for
  • The family/learner "Welcome back." sign-in page.
  • The email is filled in, the password is masked, and the button reads "Signing in…".
  • "Choose your plan" appears. Seeing the paywall here is the expected result.
Speed:

3 · Signed-out visitors are sent to sign-in

PASS
What this checks
With no session, the test opens /dashboard and then a lesson URL. Both must end on /sign-in, which shows that private pages aren't visible to logged-out visitors.
Which part of the PR it proves
auth.spec.ts, test "signed-out visitors are sent to sign-in from the dashboard and a lesson". It asserts the URL matches /sign-in after each visit.
What to watch for
  • to the end: you only ever see the "Welcome back." sign-in page. That's the point. The redirect happens before any dashboard or lesson content can render, so nothing private appears even briefly.
  • The recording has no address bar. The URL check is in the test assertion, not the picture.
Speed:

4 · Read-only guard blocks writes to staging

PASS
What this checks
Staging uses the live production database. From inside the page, the test tries a sign-up POST /api/workos/password and an API DELETE /sessions/e2e-guard-probe. Both are stopped in the browser before they leave it, while a normal GET /sign-in still gets a 200. So the tests can read staging but can't change real data.
Which part of the PR it proves
The guard in frontend/tests/e2e/support.ts, which aborts every write except the password login, and read-only-guard.spec.ts, which proves it works. It also covers the production check in playwright.config.ts, which refuses to run if pointed at rubberduckai.com.
What to watch for
  • to the end: the sign-in page sits there unchanged. The requests are fired in the background, so this video is visually boring by design. Nothing changing on screen is part of the proof that no sign-up went through.
  • The real proof is the guard's log from the staging run:
===== E2E read-only guard: 3 write request(s) aborted =====
  ABORTED POST   https://us.i.posthog.com/flags/  (teacher sign-in test)
  ABORTED POST   https://staging.rubberduckai.com/api/workos/password  (probe: sign-up)
  ABORTED DELETE https://api-staging.rubberduckai.com/sessions/e2e-guard-probe  (probe)
Speed:

Not yet covered (pending PR #136)

PENDING · test.fixme

Student reaches the dashboard

auth.spec.ts, test "student signs in with email and reaches the dashboard". It's blocked because staging sends the test student to /subscribe (video 2). Their 1-year grant sits in the grant table, but the deployed app only reads grants once PR #136 ships.

PENDING · test.fixme

One full Study Ducky loop

study-session.spec.ts, test "student completes one Study Ducky session and reaches the review". It needs the student to get past the paywall first, for the same reason. It's the only test allowed to lift the write guard, and only for its own session.

How CI handles these: the skips are marked fixme and a reporter prints each one with its reason, so a green check never hides them. After #136 ships, video 2's test fails on purpose, both fixme marks come off, and strict mode can then turn any skip into a failure. Real sign-up isn't automated at all, because staging and production share one WorkOS key and one database, so every test sign-up would create a real user.

Note: PR #137 is still being revised after the GPT-5.6 Sol review, which found two blockers: the Study Ducky write guard was too broad, and CI went green even when critical tests were skipped. The videos above come from head fa686e3, recorded Nov 29, 2026 (PST).