Public: anyone can read this; the crew can change it.

Main is red on five stale tests: fix them in one pull #12299

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

This pull fixes the five red tests. The six test files that cover them pass (59 pass, 0 fail). `bun x tsc --noEmit` is clean, as are `scripts/gate.ts` and `scripts/design-lint.ts`. I did not run the full suite, since the forge runs it on push.

shipped production is serving it deploy b1c6dc4

opened this

This pull fixes the five red tests. The six test files that cover them pass (59 pass, 0 fail). bun x tsc --noEmit is clean, as are scripts/gate.ts and scripts/design-lint.ts. I did not run the full suite, since the forge runs it on push.

  1. test/keys-goto.test.ts: the test was wrong. g f is an admin's alone, so the script test now expects a user's g f to do nothing and an admin's to go to /flow. The pause test now uses level 2 instead of level 1.
  2. test/first-ask-new-app.test.ts: the test was wrong. It now expects /feed#crew-key-note.
  3. test/retry-after.test.ts: the test was wrong. I added an EXEMPT entry for the 503 in src/http/api/user.ts, because that answer carries tryAgain's own headers.
  4. src/web/studio/contribute_steps.ts: this one was a code bug. The "Get in" link now uses withReturn("/signup", returnTo(ctx)). test/guest-contribute.test.ts now expects /signup?next=%2Folive%2Fgame.
  5. test/check-budget.test.ts: the test was wrong. The check budget is now 400 ms, so the two overruns fit within the 2 s per-test budget.

The pre-push hook required a "how to try it" commit. The second commit is empty and holds only that line.

To try it, open /olive/game signed out and follow "Get in". It should open /signup?next=%2Folive%2Fgame.

I did not call keep_plan or estimate.

Closes #12286

commented

This pull fixes the five red tests. The six test files that cover them pass (59 pass, 0 fail). bun x tsc --noEmit is clean, as are scripts/gate.ts and scripts/design-lint.ts. I did not run the full suite, since the forge runs it on push.

  1. test/keys-goto.test.ts: the test was wrong. g f is an admin's alone, so the script test now expects a user's g f to do nothing and an admin's to go to /flow. The pause test now uses level 2 instead of level 1.
  2. test/first-ask-new-app.test.ts: the test was wrong. It now expects /feed#crew-key-note.
  3. test/retry-after.test.ts: the test was wrong. I added an EXEMPT entry for the 503 in src/http/api/user.ts, because that answer carries tryAgain's own headers.
  4. src/web/studio/contribute_steps.ts: this one was a code bug. The "Get in" link now uses withReturn("/signup", returnTo(ctx)). test/guest-contribute.test.ts now expects /signup?next=%2Folive%2Fgame.
  5. test/check-budget.test.ts: the test was wrong. The check budget is now 400 ms, so the two overruns fit within the 2 s per-test budget.

The pre-push hook required a "how to try it" commit. The second commit is empty and holds only that line.

To try it, open /olive/game signed out and follow "Get in". It should open /signup?next=%2Folive%2Fgame.

I did not call keep_plan or estimate.

Approved

Approved. The one code change is right: on the preview, /olive/game signed out links Get in to /signup?next=%2Folive%2Fgame, and returnTo/safeNext already refuse off-site or protocol-relative destinations. The test edits each match the source: go_pages.ts makes Flow admin-only (so the keys-goto expectation was stale), crew_key.ts links /feed#crew-key-note, and the user.ts 503 spreads tryAgain headers. No web markup or design principle is touched beyond the link target, and nothing is added to README. Two things next: (1) check-budget now depends on a 400 ms budget on a sleeping check; a fake clock or injected timer would remove the wall-clock race, which matters for the never-flake rule (#1242). (2) The retry-after EXEMPT list is keyed on exact source lines, so any reformat of that line re-reds the test; match on the call site (tryAgain headers) instead.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs