Public: anyone can read this; the crew can change it.
An edge sign-in for someone with no forge account creates nothing and goes to the forge's own signup #2599
Parked 46d 10h ago
An edge sign-in no longer creates an account. A login with no account here is treated as signed out and offered /signup. The full bun test run didn't finish in the sandbox, so I ran only the suites that touch edge sign-in and accounts.
-
Reviews
No review yet.
-
Checks
stopped parked by the crew deploy 6e597ae
-
History
- Merge main into scout/2593: keep the guest menu and the edge stranger's Sign up button 6e597ae
- Design: tokenise src/web/style/content.ts (#2704) 36cea04
- Design: top bar diet (#2703) 63b8692
- docs/design/audit.md says, for every top-level page, what it is for and what is wrong with it against DESIGN.md (#2725) c0bfd83
- Design: tokenise style/components.ts, studio/home.ts, pages/looks.ts, pages/site.ts (#2705) f5bd8d4
- Crew teams the owner can dial: design, data science, security, platform - with a scorecard per crew member (#2687) 2856e59
- Release 0.7.171: The forge looks like one thought-through product again: a design audit and one design system across every page (#2685);Each crew run records the model and prompt version it ran on, and the scorecard splits by them (#2686) 62565ce
- The forge looks like one thought-through product again: a design audit and one design system across every page (#2685) cddea40
- Each crew run records the model and prompt version it ran on, and the scorecard splits by them (#2686) e920945
- Release 0.7.170: The release smoke check reads a sign-in redirect as sign-in, 302 or 303 alike (#2684);Boards: the query selectors are visible and usable (#2668);Record Forgejo main's 4 grokbot commits as merged (their content landed in 52f8958d, #2614), so the mirror fast-forwards again; no file changes;Through MCP 4986c9c
- The release smoke check reads a sign-in redirect as sign-in, 302 or 303 alike (#2684) 94cfde2
- Boards: the query selectors are visible and usable (#2668) d4e7f66
- Record Forgejo main's 4 grokbot commits as merged (their content landed in 52f8958d, #2614), so the mirror fast-forwards again; no file changes 316aa97
- Release 0.7.169: Through MCP an agent reads how a forge stands against its parent forge and takes its new code (#2661);docs/SPAWN.md says what tell-me and take-updates do now, with a test that keeps it honest (#2663);One test proves cross-forge following end to end: parent commits, child checks, take pull opens, own 5fed34f
- Through MCP an agent reads how a forge stands against its parent forge and takes its new code (#2661) 9e9f45b
- docs/SPAWN.md says what tell-me and take-updates do now, with a test that keeps it honest (#2663) d230f48
- One test proves cross-forge following end to end: parent commits, child checks, take pull opens, owner merges (#2662) 67a096a
- The take pull's description lists the parent's new commits, and is rewritten when the parent moves again (#2657) b8cdd2d
- A release that does not boot never reaches production, and a crash-looping roll undoes itself in minutes (#2655) b9c94a8
- The chain page offers "Take the N new commits" in tell-me, opening the same take pull take-updates opens (#2653) 0517a4a
2 earlier comments
An edge sign-in no longer creates an account. A login with no account here is treated as signed out and offered /signup. The full bun test run didn't finish in the sandbox, so I ran only the suites that touch edge sign-in and accounts. Those pass, and tsc --noEmit is clean.
What changed
ensureEdgeUserinsrc/core/users.tsnow only finds an existing active user by name and returns undefined otherwise. I dropped its unusedhostargument.resolveAuthinsrc/http/server.tsno longer creates accounts or records theuser.createdevent withvia: "edge". A stranger's request is signed out and markededgeStranger(new field onAuth).- For such a request, the header button reads "Sign up" and goes to
/signup, instead of looping back to the edge login./signupapplies thesignupsetting and its checks as for anyone, and shows "Signup is closed on this forge." when closed. - The sign-up page's edge text said the edge "makes your account on first sight"; it now says the edge doesn't make an account here.
- Accounts the edge already made still sign in by name, as before.
Tests
- In
test/edge-auth.test.ts, an unknown edge login makes no user row, gets 401, and sees "Sign up" with no "Sign out". An account made earlier with originedgestill signs in and is not an admin. - In
test/signup-closed.test.tsandtest/signup.test.ts, an unknown edge login is still refused while signup is closed. It is also refused after signup reopens, and an existing account still signs in in both states. - I rewrote tests that assumed the edge makes accounts:
no-signup-admin,reserved-names, andaccounts. Inaccountsthey now create the account directly and add theuser.createdevent by hand. - I deleted two tests that only checked behaviour that no longer exists: "an account the edge makes is audited too" in
accounts, and "an account the edge makes must prove an address too" inverify-email.
Left out
- The
origin: "edge"variant increateUserstays, because existing accounts and these tests still use it. Removing it is a separate cleanup. - The full suite wasn't run to completion, so the forge's check on this push is the first full run.
Try it
Start the forge with an edge token. Request / with x-plat-user: nobody and the matching x-plat-edge-token header. The page shows "Sign up" and GET /api/v1/user returns 401. Neither request adds a user row.
🤖 Generated with Claude Code
I merged main into the branch and pushed it. The only conflict was the header's sign-in area in src/web/layout.ts.
- Conflict fix:
mainadded a guest menu in front of the Sign in button. This branch swaps that button for "Sign up" when an edge sign-in finds no account. The merged header keeps both. A guest sees the menu, then "Sign up" if they are an edge stranger and "Sign in" otherwise. - Tests:
test/accounts.test.tspasses (21 tests). The type check printed nothing, which I read as clean. I never saw a result from the fullbun testrun. The first two attempts printed nothing and a third timed out. I did not run the guest, edge-auth or sign-in suites by name. The forge's check on this push will run the whole suite.
🤖 Generated with Claude Code
An edge sign-in no longer creates an account. A login with no account here is treated as signed out and offered
/signup. The fullbun testrun didn't finish in the sandbox, so I ran only the suites that touch edge sign-in and accounts. Those pass, andtsc --noEmitis clean.What changed
ensureEdgeUserinsrc/core/users.tsnow only finds an existing active user by name and returns undefined otherwise. I dropped its unusedhostargument.resolveAuthinsrc/http/server.tsno longer creates accounts or records theuser.createdevent withvia: "edge". A stranger's request is signed out and markededgeStranger(new field onAuth)./signup, instead of looping back to the edge login./signupapplies thesignupsetting and its checks as for anyone, and shows "Signup is closed on this forge." when closed.Tests
test/edge-auth.test.ts, an unknown edge login makes no user row, gets 401, and sees "Sign up" with no "Sign out". An account made earlier with originedgestill signs in and is not an admin.test/signup-closed.test.tsandtest/signup.test.ts, an unknown edge login is still refused while signup is closed. It is also refused after signup reopens, and an existing account still signs in in both states.no-signup-admin,reserved-names, andaccounts. Inaccountsthey now create the account directly and add theuser.createdevent by hand.accounts, and "an account the edge makes must prove an address too" inverify-email.Left out
origin: "edge"variant increateUserstays, because existing accounts and these tests still use it. Removing it is a separate cleanup.Try it Start the forge with an edge token. Request
/withx-plat-user: nobodyand the matchingx-plat-edge-tokenheader. The page shows "Sign up" andGET /api/v1/userreturns 401. Neither request adds a user row.🤖 Generated with Claude Code
Closes #2593