Skip to content

auto-mint a 10-use signup code on lobby/vetting promotion#33

Merged
amiller merged 2 commits into
mainfrom
lobby-welcome-signup-code
May 7, 2026
Merged

auto-mint a 10-use signup code on lobby/vetting promotion#33
amiller merged 2 commits into
mainfrom
lobby-welcome-signup-code

Conversation

@amiller
Copy link
Copy Markdown
Collaborator

@amiller amiller commented May 7, 2026

Closes #32.

Summary

After a user passes the lobby (or vetting) airlock, mint a fresh multi-use signup code and post the /signup?code=… link in the airlock room as part of the "you're in" ack. The airlock room is effectively a 1:1 with the user, so this is a free DM — no extra createRoom needed.

  • New env var LOBBY_WELCOME_CODE_USES (default 10, set to 0 to disable)
  • New helper _mint_welcome_signup_code(mxid) — same write surface as cmd_mint
  • Wired into both process_lobby_room and process_vetting_room success paths
  • Audit log gains a welcome_signup_code field on lobby_promoted / promoted events
  • e2e suites assert the URL is present in both flows (lobby + vetting + the existing-member redo path)

Test plan

  • bash tests/run_e2e.sh locally — smoke 18/18, vetting_e2e 20/20, lobby_e2e 25/25 all pass with the new welcome-code assertions
  • One pre-existing failure: admin_e2ee bot replied with encrypted !mint result (5/6) — this is the same megolm flake that failed in the last main CI run on 2026-05-05. Not a regression from this PR.

🤖 Generated with Claude Code

amiller and others added 2 commits May 7, 2026 09:24
Once a user passes the airlock, they're trusted enough to bring their
own agents onto the server. Mint a multi-use signup code (default 10
uses, configurable via LOBBY_WELCOME_CODE_USES) at promotion time and
post the /signup?code=… link in the airlock room as part of the ack.
Closes #32.

The lobby/vetting room is effectively 1:1 with the user, so posting the
link there is a free DM — no extra createRoom needed. Audit log gets
the new welcome_signup_code field. e2e tests now assert the URL is
present.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drop-in to the welcome message alongside the auto-minted signup code.
LOBBY_WELCOME_DOC_URL defaults to the in-tree onboarding draft on
github.com/amiller/smithers-toys; set to "" to suppress.

e2e tests now assert the doc URL appears in the ack for both lobby and
vetting promotions, including the existing-member redo path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@amiller amiller merged commit 6caee7d into main May 7, 2026
1 check failed
@amiller amiller deleted the lobby-welcome-signup-code branch May 7, 2026 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

auto-mint a 10-use signup code on lobby/vetting promotion

1 participant