ChatMaestro · Scenarios · Enrollee

Leave the Study Pool

Enrollee  The participant's own withdrawal: pool-wide because consent was, immediate, and reversible without being retroactive.
Screens  Enrollee preferences enrollee-preferences.htmlConfirm confirm-opt-out.htmlMy studies enrollee-landing.html
Writes  the decision profile.opted_out_ateach live study ends run_enrollment.withdrawn_atthe trail audit_log
Key fields  left the pool opted_out_atsuspended by staff enabledskipped at launch cohort_member filtered

1 · Given / When / Then

Human wording first; the exact table/field in mono.
Given
The signed-in person is an enrollee whose opted_out_at is null. They accepted an invitation to the pool, not to any particular study; studies reached them afterward through cohort membership.
When
On the Enrollee-preferences Screen they choose Leave the study pool and confirm. There is no per-study equivalent, and no staff member can do this for them. Staff have no equivalent of their own: an experimenter or admin who leaves is deactivated by an admin, with their work handed off first (Users & Roles).
Then
profile.opted_out_at is set, and in the same transaction every run_enrollment they still hold takes a withdrawn_at, so each live study ends at the same instant. They stop receiving run_ready mail, and ALGORITHMS §12 skips them when it resolves a cohort, so a later launch cannot quietly re-enroll them. Their cohort_member rows are kept and filtered rather than deleted, because those record who a cohort held at the time.
writes profile.opted_out_at, run_enrollment.withdrawn_at, audit_log
Variations and exceptions
If…Then…
They sign in after leavingAllowed. The My-studies Screen says they have left and offers to rejoin, and studies they finished stay readable.
They rejoinopted_out_at is cleared and they are eligible for studies that start afterwards. The enrollments the opt-out ended are not restored, because re-entering a run mid-flight would drop them into a condition partway through.
A chat is open at the moment they leaveIt closes on the next request. Rounds already written are untouched, and the run's n_enrollees still counts them, because they did take part.
Acceptance testGiven an enrollee in two live runs, When they leave the study pool and confirm, Then profile.opted_out_at is set and both run_enrollment rows carry the same withdrawn_at; and a subsequent launch against a cohort that still lists them does not create a new enrollment; and their earlier chat_round rows are unchanged and still counted in those runs' run_result.

2 · The Journey, Screen by Screen

One control, one confirmation, and everything already done is kept.
Open preferences Enrollee-preferences Screen Leave the Study Pool one control, not per study Confirm? Nothing changes still taking part Live studies end withdrawn_at on each No new invitations skipped by cohort resolution Account and work stay can sign in · can rejoin reversible, but not retroactive cancel yes

3 · In Plain English

Anyone taking part in studies can stop taking part. It is one control on the preferences screen, and it belongs to the participant — nobody on the research side can press it for them.

It covers everything rather than one study at a time, and that follows from how joining works. You were invited to be a participant in general, not to a named study; the studies find you afterward. So the thing you can withdraw is the same thing you agreed to.

Leaving takes effect immediately. Any study you are in ends, the invitations stop, and you will not be added to studies that start later. What does not happen is a deletion: your account stays, the studies you already finished stay readable, and everything you wrote stays exactly where it is and still counts toward those studies' results. You did the work; erasing it would quietly flatter the findings.

You can come back. Rejoining makes you eligible for studies that start after that point — it does not restart the ones your leaving ended, because dropping back into a study halfway through would not be the same experience the other participants had.

Fits the schema cleanly. profile.opted_out_at is the whole mechanism; the cascade to run_enrollment.withdrawn_at and the filter in cohort resolution are rules, not columns. It is the participant's own decision, distinct from enabled, a suspension applied by someone with more privilege: both can hold at once and neither implies the other, which keeps “I left” distinguishable from “I was removed” in the record. Rounds already answered keep their scores and stay in their runs' statistics — the work happened, and removing it would bias those runs upward.