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§
- Queued
Email - Queued
Emails Query - 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.
Functions§
- _add_
routes - known_
phase_ 🔒names - 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.
- 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::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.