Skip to main content

Module linking_mail_resend

Module linking_mail_resend 

Source
Expand description

Re-running the account-linking send path for one person on one course.

Not a phase: no schedule, no heartbeat, no circuit-breaker bookkeeping — one manual click must not be able to trip the workers’ breaker. The addresses come from the study registry rather than the ledger, and the claim goes through claim_linking_mails, so the caps and dedup guard apply exactly as they do to the worker.

Structs§

ResendAttempt
The outcome of one resend attempt, plus how many capped mails an override retired to get there.
ResolvedPerson

Enums§

LinkingMailResendOutcome
What one resend attempt did.
ResendDecision
What resend_linking_mail_for_target decided.
ResendOutcome
What a resend endpoint tells its caller. Shared wire shape for the teacher- and admin-facing resend endpoints; NoStudentNumberKnown is only ever emitted by the teacher endpoint, whose target may be an account that has never held a number.
ResolvePersonError
Why resolve_person could not say whether the number exists. Both cases read the same to a caller: the registry could not be asked.

Functions§

resend_linking_mail
Claims a linking mail for the one person on the course’s roster with this student number.
resend_linking_mail_for_target
Shared by the teacher- and admin-facing resend endpoints: refuses a target that is already linked, otherwise runs before_send (the admin path’s rate-cap override; the teacher path passes a no-op) and reruns the send path exactly as the worker would.
resolve_person
Looks one student number up in the study registry without changing anything: no ledger row, no claimed mail slot, just the call log row every study registry call writes.