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

The release smoke check reads a sign-in redirect as sign-in, 302 or 303 alike #2684

Merged opened this in answer to

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

Merged

The release smoke check now treats an anonymous `/board` redirect to sign-in as sign-in whether it is a 302, 303 or 307. Before, it accepted only a 302, so the edge's `303 → /_plat/login?rd=%2Fboard` made it call 0.7.169 unproven on the owner's home.

shipped production is serving it deploy 5f89d5b

opened this

The release smoke check now treats an anonymous /board redirect to sign-in as sign-in whether it is a 302, 303 or 307. Before, it accepted only a 302, so the edge's 303 → /_plat/login?rd=%2Fboard made it call 0.7.169 unproven on the owner's home.

What changed: src/release/smoke.ts gains isSignInRedirect(url, res). A response counts as sign-in when:

  • its status is 302, 303 or 307,
  • its Location, resolved against the /board URL, is on the same origin,
  • and its path is the forge's own /signin or the edge's /_plat/login. These are the two places signInFirst sends people (src/web/chrome.ts).

Any other target still fails. That includes another host, other paths like /signin/parent, and a 301. The failure message now reads "expected 200 (or a redirect to sign-in)". As before, this applies only to anonymousBoard callers holding no token, which means the forge proving itself (src/release/prove.ts). scripts/smoke.ts and token-holding callers behave as before.

What to look at: I chose to require the same origin. The edge's sign-in lives on the forge's own host (src/http/edge.ts), so a redirect to another host is not taken as sign-in.

Tests: test/smoke.test.ts adds:

  • the pass cases: a 302 and a 303 to /signin, a 303 to an absolute /_plat/login URL (the production case), and a 307;
  • the fail cases: a 303 to /elsewhere, to another host, and to /signin/parent, plus a 301;
  • unit checks on isSignInRedirect.

The existing tests pass unchanged, as do test/release-boot.test.ts and test/src-imports.test.ts. I could not run bun x tsc --noEmit here: node_modules has no TypeScript, and bun install fails because the sandbox's tempdir is read-only. The forge's check runs the type check.

How to try it: bun test test/smoke.test.ts. On the forge, the 0.7.169 card should clear on the next proof.

🤖 Generated with Claude Code

Closes #2673

commented

The release smoke check now treats an anonymous /board redirect to sign-in as sign-in whether it is a 302, 303 or 307. Before, it accepted only a 302, so the edge's 303 → /_plat/login?rd=%2Fboard made it call 0.7.169 unproven on the owner's home.

What changed: src/release/smoke.ts gains isSignInRedirect(url, res). A response counts as sign-in when:

  • its status is 302, 303 or 307,
  • its Location, resolved against the /board URL, is on the same origin,
  • and its path is the forge's own /signin or the edge's /_plat/login. These are the two places signInFirst sends people (src/web/chrome.ts).

Any other target still fails. That includes another host, other paths like /signin/parent, and a 301. The failure message now reads "expected 200 (or a redirect to sign-in)". As before, this applies only to anonymousBoard callers holding no token, which means the forge proving itself (src/release/prove.ts). scripts/smoke.ts and token-holding callers behave as before.

What to look at: I chose to require the same origin. The edge's sign-in lives on the forge's own host (src/http/edge.ts), so a redirect to another host is not taken as sign-in.

Tests: test/smoke.test.ts adds:

  • the pass cases: a 302 and a 303 to /signin, a 303 to an absolute /_plat/login URL (the production case), and a 307;
  • the fail cases: a 303 to /elsewhere, to another host, and to /signin/parent, plus a 301;
  • unit checks on isSignInRedirect.

The existing tests pass unchanged, as do test/release-boot.test.ts and test/src-imports.test.ts. I could not run bun x tsc --noEmit here: node_modules has no TypeScript, and bun install fails because the sandbox's tempdir is read-only. The forge's check runs the type check.

How to try it: bun test test/smoke.test.ts. On the forge, the 0.7.169 card should clear on the next proof.

🤖 Generated with Claude Code

Approved

Does what the issue asked: an anonymous /board redirect (302/303/307) to same-origin /signin or /_plat/login counts as sign-in; other targets, other hosts and a 301 still fail. Redirects are fetched manually, so the check sees the real status. Tests cover pass, fail and unit cases; scripts/smoke.ts re-exports so the test import works. No page, tty or UI surface is touched. Next: (1) have signInFirst in src/web/chrome.ts and this check share one constant for the two sign-in paths so they cannot drift; (2) the 307 case is only in the pass table, so add it to the failure side (307 to elsewhere) as well.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs