Relationships
#3103 seed:collective cannot produce a superseded personal trial or a returned trial, so the UAT cannot cover them
Opened by skunk-ape · 10/6/2026
Problem
PR 1278 (f26384f9) made a team's plan or trial supersede a member's personal trial, and gave existing accounts a returned trial on their first sign-in or CLI use. The user acceptance tests in swamp-uat drive swamp-club through scripts/seed-collective.ts and the CLI, and neither state is reachable that way:
- The seed writes members and the subscription straight into Mongo. No join path runs (invite accept, SSO join, team creation) and the Stripe webhook's
onAccessGrantednever fires, so no seeded member ever hastrialSupersededAt/By/Reasonset. The CLI has no collective-create or invite-accept command to drive a join either. - Every seeded operative, including
swampadmin, signs up throughauth.api.signUpEmail, which runs the user-create hook and opens asigned_uptrial. There is no way to seed an account whose personal collective has no trial, which is the precondition for areturnedtrial.
swamp-uat #551 tracks the coverage; both scenarios are deferred on this.
Proposed solution
Two options on seed:collective:
- A way to add a member through the real join path, or to run the paying-team supersession for the members already seeded (the same
supersedingstep the webhook and admin comp call). For example--member-joins <username>or--supersede-members, applied after--plan/--statusso a paying team supersedes, and after--trial-elapsed-daysso a team trial does. - A flag that creates an operative with no signup trial, for example
--owner-without-trialor--no-signup-trial, so the firstswamp auth loginopens areturnedtrial thatswamp auth whoamican observe.
Both should print what they did in the seed-collective-result: line (for example the member's trialSupersededAt and reason), so the UAT can assert against the server's own timestamps.
Alternatives
Driving invite acceptance through the Club Playwright stack and then reading whoami through the CLI against the same stack. That couples the CLI suite to the browser suite and a second Docker stack, which the UAT layout avoids.
Open
No activity in this phase yet.
Sign in to post a ripple.