Opus finding
Welcome/onboarder prompt tests do not assert that the opt-in token is not leaked into the welcome prompt
lowtest-gapmedium
- apps/web/lib/onboarder.test.ts:9-27
`welcomePrompt` is called without an `optInUrl` arg in tests, suggesting it doesn't include the token. But there is no assertion that the welcome prompt does NOT contain the (30-day bearer) token. Since the comment in optin-token.ts warns 'Never log the raw token — it's a bearer credential for 30 days', a defensive test that ensures the welcome prompt never embeds the verbatim token would catch a future refactor accident.
Recommendation
Add a unit test asserting welcomePrompt output never contains a `?t=` pattern or any base64url segment of the canonical token shape.