Skip to main content

Module control

Module control 

Source
Expand description

The mock Suotar control surface: test-only routes that are not part of Suotar’s API.

A tick runs one iteration of one phase synchronously, because the real loops are long-running intervals in their own Deployments that a Playwright spec cannot wait out. Gated on test_mode && test_suotar, so no token; the client is hand-written in system-tests/src/utils/suotarControl.ts.

Structs§

EnrolmentCheckSchedule
A row’s enrolment check schedule, which no product surface shows whole.
EnrolmentCheckScheduleQuery
ExpireEnrolmentRecheckAllowancePayload
MakeEnrolmentChecksDueResult
MakeRosterListingsDueResult
QueuedEmail
QueuedEmailsQuery
RegisterNewCompletionsViaSuotarPayload
RegistrarTickResult
One entry per phase in the sequence, in the order they ran.
RegradeCompletionPayload
RegradeCompletionResult
RunTickQuery
SetTestExclusiveHoldPayload
SetTestExclusiveHoldResult
UnresolvedScope

Enums§

PhaseTickResult

Constants§

MAX_TEST_EXCLUSIVE_HOLD_SECS 🔒
Comfortably above Playwright’s own 100 s per-test timeout (playwright.config.ts’s timeout), so no legitimate hold is ever rejected; a value anywhere near this is a spec that mistyped a unit, not one that needs the identity held that long.
QUEUED_EMAIL_SCAN 🔒
How many of an account’s mails one read looks back over. Generous: the shared test database has a live pipeline queueing mail for everybody, and a short window would turn “exactly one” into a false pass.
REGISTRAR_TICK_SEQUENCE 🔒
The phases run-registrar-tick runs, in pipeline order. Not every credit-registrar phase: legacy-mirror and student-notifications are driven explicitly by specs that need them.

Functions§

_add_routes
enrolment_check_schedule 🔒
expire_enrolment_recheck_allowance 🔒
Lets a spec press a recheck button right after the last check or request, or on a new row, instead of waiting out the limit on asking or the student’s first-hour wait.
known_phase_names 🔒
make_enrolment_checks_due 🔒
Brings the next enrolment check of every waiting row in the scope forward to now, so a spec can drive a row past its first rung without waiting a day. Takes the tick’s scope; the phase is ignored.
make_roster_listings_due 🔒
Makes the roster listings of the scope’s course due now and refills the listing limiter of the scope, so a spec can list its codes again without waiting out the tier interval, a backoff or the rate. Takes the tick’s scope, which must name a course; the phase is ignored.
queued_emails 🔒
The mails queued to one account, newest first. There is no mail capture in this repo, so a spec asserting a message was composed reads the send queue instead of an inbox.
register_new_completions_via_suotar 🔒
Opts a module’s new completions of linked students into Suotar, which only support can do by hand: a spec that creates its own course needs its completions on the pipeline.
regrade_completion 🔒
Rewrites the grade of the completion behind one ledger row.
resolve_scope 🔒
The outer error is a real failure; the inner one is a scope half that names nothing.
run_registrar_tick 🔒
The combined form of run-tick, walking the sequence in pipeline order. Always 200; each phase reports its own status. Takes no scope on purpose: a suite that only ever ticks scoped never exercises the sweep-everything behaviour production has.
run_tick 🔒
Runs one iteration of one pipeline phase: 200 when it ran, 400 for unknownPhase or a scope the phase cannot narrow on. An optional scope narrows the rows the iteration may claim; absent is unscoped, which is what production does.
set_test_exclusive_hold 🔒
Excuses a user’s rows from the live background worker’s unscoped sweeps — see credit_registrations::testing::set_test_exclusive_hold_for_testing. Keyed on identity rather than a row id, so a spec can hold before materialize creates the row it means to protect.
tick_context 🔒
Attributed to the tick rather than to a worker, so the audit log says which traffic a test made.