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§
- Enrolment
Check Schedule - A row’s enrolment check schedule, which no product surface shows whole.
- Enrolment
Check Schedule Query - Expire
Enrolment Recheck Allowance Payload - Make
Enrolment Checks DueResult - Make
Roster Listings DueResult - Queued
Email - Queued
Emails Query - Register
NewCompletions ViaSuotar Payload - Registrar
Tick Result - One entry per phase in the sequence, in the order they ran.
- Regrade
Completion Payload - Regrade
Completion Result - RunTick
Query - SetTest
Exclusive Hold Payload - SetTest
Exclusive Hold Result - Unresolved
Scope
Enums§
Constants§
- MAX_
TEST_ 🔒EXCLUSIVE_ HOLD_ SECS - Comfortably above Playwright’s own 100 s per-test timeout (
playwright.config.ts’stimeout), 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-tickruns, in pipeline order. Not everycredit-registrarphase:legacy-mirrorandstudent-notificationsare 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
unknownPhaseor 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.