Public: anyone can read this; the crew can change it.
An invite to an organization lands from the closed pull #12484's branch, with the signup welcome tested #16764
Check · Review · Land · Live done — Landed and live in production.
This reapplies #12484's invite-to-an-organization work on current main and adds the two signup-welcome tests the issue asked for. tsc, scripts/gate.ts (0 fail) and the tests for this change pass: invite-org, invites-core, org-person-forge and mcp-table.
-
Reviews
Changes requested — before the latest pushThe signup welcome tests the issue asked for are good: the form test reads the flash cookie and the passkey test reads
welcome, and each would fail without its behaviour. Two things to fix in one round.- Terminal door untested. The
okey on the Invite links screen and the sign-in toast (welcomeWords) insrc/tui/screens/signin.tshave no test that fails without them. Add a TUI test for each. Theunknown_orgmessage on theopath needs one too. allowRequestswallows every welcome failure with.catch(() => undefined). An allowed person can end up with no seat or forks, and nobody learns why. Log the error, or record an audit event, so the failure is visible.
Not blocking: the welcome forks every org app inside the signup request, so a large org makes signup slow. Consider noting that in a follow-up issue.
ApprovedSince c965ac2d: both earlier asks are met. A failed welcome after an allow is now logged with the person's name, and a test breaks team_member to prove it. The terminal
okey, its blank and unknown-org messages, and the signup welcome toast each have a test. The org mint stays admin-gated on every door (API, MCP, page, terminal), and the form, API and passkey welcomes are tested. The new lines add no finding. Non-blocking: signup forks every org app inside the request, so a large org makes signup slow. File that as its own issue. - Terminal door untested. The
-
Checks
shipped production is serving it deploy aac12e1
-
History
- Log a failed invite welcome after an allow; test the terminal's o key, its unknown-org message and the signup welcome toast f5fbb45
- Wait for the welcome with the shared poll helper, not a fixed sleep c965ac2
- Drop the test-only welcomesSettled export: the hollow audit finds nothing reaches it; the test waits on the welcome by time again 8095d93
- Await the welcome after an allow instead of polling for it 7096231
- Give the invite-to-organization note its front matter; wait on the welcome fork by time, not turns 9c82708
- Test the signup welcome: the form's redirect flash and the passkey answer, each failing without it 6a0215c
- Merge #12484's branch (invite to an organization) with current main 848e24c
- The vendor's own variables (ANTHROPIC_*, CLAUDE_CODE_*) are read only inside the Claude runner's module (#16757) 46e0349
- Revert "LFS door: batch API and locks on the BlobStore" (#16754) 771a2a7
- The pull page answers inside a lower budget, measured (#16748) 9ac08ea
- The forge is a developer's file system: every app's database and the API spec, first-party (web, terminal app, MCP) (#16743) f6d3c84
- Component library: skeleton, toast and confirm dialog as ui.ts parts, each in the gallery (#16683) 6ba9019
- Quarantine untrusted repositories until a Sentinel security review passes (#16709) 92b768e
- A gate's checkout is not removed under it: three gates on #7608 went red on files missing from their own working tree (#16742) bec38a3
- Infrastructure: what runs on your own cloud, what it is for, what it costs and when it ends, and a plan tray that builds it (#16706) d11ea08
- A pull's pairs line counts pages, not pictures, when a page has both a phone and a desktop look (#16747) 0c2baa3
- GET a repository's milestones answers under 50 ms: trevato/forge's `read` phase is 1,365 ms today (#16735) 2816515
- Look pictures (a person's attachments) archive to the BlobStore (#16733) d5260ac
- In a preview, the forge pill's panel says the pull's check: green, red with its first failing test, or running (#16738) c904595
- The /__forge/ door's "More pulls" line says how many and links to the open pulls (from branch scout/6411-…) (#16736) af22bcd
4 earlier comments
This reapplies #12484's invite-to-an-organization work on current main and adds the two signup-welcome tests the issue asked for. tsc, scripts/gate.ts (0 fail) and the tests for this change pass: invite-org, invites-core, org-person-forge and mcp-table. I did not run the full suite or try it on a running app; the forge's check runs the whole suite.
What changed
- Merge: #12484's branch is merged with main. It conflicted in
core/invites.ts,actions/invites.ts,actions/users.ts,http/api.ts,mint_invite.ts,signup-passkey.tsandsite.ts. I kept main's side everywhere, including contributor invites and the session rotation at sign-up, and added the org parts on top. I did not carry over #12484's olderdocs/MCP.mdtable, since main now generates that table. - Form sign-up test: a new test POSTs
/signup?invite=…with an org invite intest/invite-org.test.ts. It asserts a 303 whose flash cookie says "Welcome to acme", "you are in Members" and "2 private forks that follow acme". A companion test asserts that a plain invite sets no flash. - Passkey sign-up test: the existing passkey test now also asserts the answer's
welcome.teamand thewelcomeWordssentence. - Mutation check: with the flash removed from
site.ts, the form test fails. Withwelcomeremoved fromsignup-passkey.ts, the passkey test fails. - Gate: one pre-existing test in the merged file polled with
Bun.sleep, which the gate refuses. I replaced it with asetImmediateloop.
Left out
- No change to the org-invite design itself.
bun scripts/similar.tswas not run, because I wrote no new functions beyond tests. The gate's similarity notes onorgApps,inviteOrgOfandtokenOfare non-blocking and I left them.
To try it: mint an invite with POST /api/v1/admin/invites {"org":"acme"}, open /signup?invite=<token>, and sign up. The next page shows the welcome flash.
This push fixes the failures in the notes tests and the invite-org test. The /llms.txt budget test already fails on main, and the memory sampler test passes when I run it alone. I only re-ran the failing files, not the full suite, so the forge's check on this push is the full verdict.
- Notes tests:
docs/features/invite-org.mdhad no front matter. I addedtopic: Hosting forges for others, and getting paidandrow: Invite someone to an organization. That clears the four failures about the notes index, orphans and front matter, plus thefeatures-indexscript, which exited 1. - Invite-org test: "an account that waits is neither seated nor forked until it is allowed" polled for the welcome fork with 2000
setImmediateturns. That ran out under load, so it now polls up to about 5 seconds in 10 ms steps. This is a change to the test, which was racy. The welcome code is unchanged. - Memory sampler: the failure was under shard load. I didn't change this test.
- Gate and types:
bun scripts/gate.ts --fixandbun x tsc --noEmitboth ran, and tsc reported nothing.
I chose not to touch the /llms.txt budget. The check log says it is red on main too.
The gate's "fixed wait" failure in test/invite-org.test.ts is fixed and pushed. The test no longer polls on a timer. I ran only test/invite-org.test.ts (14 pass), bun x tsc --noEmit and bun scripts/gate.ts --fix locally. The gate no longer reports the fixed wait, and tsc printed nothing. The forge's full check on this push is the real verdict.
- What changed:
allowRequestinsrc/actions/requests.tsalready started the org-invite welcome (seat plus forks) in the background after an allow. It now keeps that promise in a small set and exportswelcomesSettled(), which awaits it. The test "an account that waits is neither seated nor forked until it is allowed" awaitswelcomesSettled()instead of polling withsetTimeout. Nothing about when the welcome runs has changed. - Not changed: the gate's similarity notes (
orgApps,inviteOrgOf,tokenOfagainst unrelated functions) and the over-100-column comments in three other files are notes only. They did not fail the check, so I left them.
The earlier docs/features/invite-org.md front-matter fix stays in this pull.
This lands the invite-to-organization work from #12484's branch, with the signup welcome tested. The previous push failed the repository's hollow-work check, and that is now fixed.
- Cause: the last commit added
welcomesSettledtosrc/actions/requests.ts. Only a test called it and nothing that runs reached it, so the hollow audit refused it. - Fix: I reverted that commit, which removes the export. The welcome that follows an allow is still created in the background, as before.
- Test wait: the test in
test/invite-org.test.tsthat waits for the welcome after an allow now usespollUntilfromtest/helpers/poll.ts. A plain fixed wait there would have failed the test-honesty rule, which counts fixed waits. - Checks run:
tsc --noEmit,test/hollow.test.tsandtest/invite-org.test.tspass.bun scripts/gate.ts --explainshows no failing rule; its similar-implementation notes are advisory and I left them. I did not run the full suite; the forge runs it on the push. - Left out: the welcome still runs in the background after an allow, so the test polls for it rather than awaiting it. Awaiting it would need a production hook that only a test uses.
Both of sentinel's points are fixed and pushed. The three test files I ran pass (29 tests), bun x tsc --noEmit printed nothing, and the gate reported nothing new. I did not run the full suite; the forge's check does that on this push.
- Swallowed welcome failure:
allowRequestnow writesapp.log.error("invite welcome failed", { user, error })instead of.catch(() => undefined). A new test intest/invite-org.test.tsbreaks theteam_membertable, allows a waiting account, and expects the logged line to name the person. It fails with the logging line removed. - Terminal
okey andunknown_org: a new test intest/tui-invites.test.tsopens the "Invite link to an organization" prompt. It checks the "Name an organization." message for a blank entry and "No organization by that name." for an unknown one, and that neither mints a link. It then mints a link for a real organization and checks the invite carries it. - Sign-in welcome toast: a new test in
test/tui-signup-invite.test.tssigns up through the terminal screen. An org invite shows "Welcome to acme" and a plain invite shows no welcome. It fails when thectx.toast(welcomeWords(...))line insrc/tui/screens/signin.tsis disabled. The test supplies a different SSH key for each signup, because the shared test key is already registered to the first account, and it raisessignup.per_sourceso the rate limit doesn't block it.
I did not run mutation checks on the o key branch itself. Its test checks the prompt, both refusal messages and the minted org link, so it should fail if the branch is removed.
I haven't opened the follow-up issue for the slow signup when an org has many apps. The welcome still forks every org app inside the signup request, so a large org makes signup slow.
This reapplies #12484's invite-to-an-organization work on current main and adds the two signup-welcome tests the issue asked for.
tsc,scripts/gate.ts(0 fail) and the tests for this change pass:invite-org,invites-core,org-person-forgeandmcp-table. I did not run the full suite or try it on a running app; the forge's check runs the whole suite.What changed
core/invites.ts,actions/invites.ts,actions/users.ts,http/api.ts,mint_invite.ts,signup-passkey.tsandsite.ts. I kept main's side everywhere, including contributor invites and the session rotation at sign-up, and added the org parts on top. I did not carry over #12484's olderdocs/MCP.mdtable, since main now generates that table./signup?invite=…with an org invite intest/invite-org.test.ts. It asserts a 303 whose flash cookie says "Welcome to acme", "you are in Members" and "2 private forks that follow acme". A companion test asserts that a plain invite sets no flash.welcome.teamand thewelcomeWordssentence.site.ts, the form test fails. Withwelcomeremoved fromsignup-passkey.ts, the passkey test fails.Bun.sleep, which the gate refuses. I replaced it with asetImmediateloop.Left out
bun scripts/similar.tswas not run, because I wrote no new functions beyond tests. The gate's similarity notes onorgApps,inviteOrgOfandtokenOfare non-blocking and I left them.To try it: mint an invite with
POST /api/v1/admin/invites {"org":"acme"}, open/signup?invite=<token>, and sign up. The next page shows the welcome flash.Closes #12561