ADR-089 — Kiosk stations for the online workspace: the station stays on Quiz and frames the portal¶
Status¶
Accepted (2026-11-15): the product owner's four decisions and the model and rules settled at review
the same day, in the amendment of 2026-11-15,
which overrides §1, §2, §4, §6, §9 and §12 where it says so. Proposed 2026-10-09 (points 1, 7 and 9 the
owner's then). Built behind KIOSK_PROJECTS, enabled in production since 2026-11-15 (the
owner's decision); the hardware proofs (proof K, project proof B) are owed, question 72 of
06. Amended 2026-11-16 (owner): a
restarted station frees itself, amendment of 2026-11-16.
Delivery: merge progress, M6-11a–f.
- 2026-10-11, audit L7: the student's start route is
POST /app/api/projects/:id/workspace/start(ADR-047), formerly a GET. - 2026-10-11, audit L24: the "Same-site exposure" consequence pointed to ADR-047's amendment; its premise no longer holds here (amendment of 2026-11-15, point 4 (b)).
Scope: how a student works in the online workspace of an online_seb
project from an attested kiosk station, across the two hosts of Quiz and
its portal; what each side checks, and how the sitting ends; since
2026-11-15, which devices such a project accepts (four levels). Not the
workspace question of evaluations (ADR-075).
Relations: amends ADR-051 §1 (a
kiosk session may be confined to a project), §4 (supersession for a
project), §7 (pairing for a project, the end and the navigation of such a
session), and its "evaluations only" reading of D21; amends
ADR-047's M6-07 amendment (a
kiosk launch claim beside seb) and M6-06 (A)
(the station level freezes with the mode). Related to
ADR-075 §11, which keeps governing
the kiosk for the workspace question of evaluations, and to
question 52 (c), which stays open for
that question. Uses the HS256 messages of ADR-047 §6 and ADR-078 §2, and
the confined sessions of
ADR-027's M6-07
addendum.
Context¶
An online_seb project is worked in the portal (code.chevallier.io)
from a seb session confined to the project (ADR-047, M6-07). When the
student's laptop cannot run SEB, the exam fallback is a kiosk station
(ADR-051), but nothing of that path reaches the portal:
- The start route does not serve a station.
POST /app/api/projects/:id/workspace/start(WORKSPACE_START_ROUTE,apps/api/src/modules/codespace/routes.ts) declaresPROJECT_SEB,sessions: ["portal", "seb"](apps/api/src/auth/session.ts). The session hook (auth/plugin.ts) checksservesbefore any trust check, so akiosksession is anonymous there and the station is sent to the sign-in. The portal must never see the station's cookie; widening it toDomain=chevallier.iowould hand it to a host that serves student-controlled content. - Quiz and the portal are the same site (
chevallier.io; on stagingquiz.devandcode-dev). A same-site frame carriesStrictandLaxcookies and is neither blocked nor partitioned as third-party. - The station's machinery lives on a Quiz page. Re-attestation every
10 minutes (
apps/web/src/kiosk/useStationAttestation.ts), the 30 s retry while suspended, the return to/kiosk, and the423 kiosk_suspendedof writes all act on Quiz. A page that leaves Quiz for the portal stops them; the portal checks trust once, at/launch, then trusts its IP-boundexam_sessioncookie for 4 h (EXAM_COOKIE_MAX_AGE_MS), against a kiosk session's fixed 6 h. - A kiosk session is bound to an evaluation end to end:
kiosk_pairings.evaluation_id, the pairing'sopenSessionwithprojectId: null,watch.ts'ssittingOn,endKioskSessionskeyed by evaluation (auth/session.ts), andworkspaceStartRefusal'sfromSeb(@quiz/domain,workMode.ts).sessions.project_idand itssessions_one_activitycheck already exist (M6-07), andsupersede(auth/session.ts) already keys a project's confined sessions by (user, project) over both trusted kinds. - A station is shared. The portal's cookies (
exam_session, and the/s/<id>session cookie ofapps/codespace/src/web/routes.ts) stay in the station's browser profile after the student leaves, behind the same IP address, and nothing closes a portal session at the end of a sitting. - Scope.
00§0.6 and ADR-051 admit stations for exams only; ADR-075 §11 makes the kiosk wait for proof B, which is a property of SEB, not of a station.
Decision¶
- Scope: a fallback beside SEB (owner). A project accepts a kiosk
station only as an alternative to SEB, in
online_seb: "SEB or kiosk", as for an exam whose two settings are on. Kiosk-only projects are deferred. No new work mode. Reversed 2026-11-15 (owner): four levels, Kiosk only included, still no new work mode — point 2 of the amendment of 2026-11-15. - The setting.
kiosk: boolean, a project setting meaningful only withonline_seb, set by the mode route (ProjectWorkModeBodygains it, the same owner and grant checks) and audited bycodespace.work_mode, whose payload carries it. It is read through one reader besidetrustedClientsOf(the project's trusted clients:["seb"]or["seb", "kiosk"]) and frozen at the first student launch with the mode (codespace_projects.first_launch_at,409 work_mode_frozen). Offered only whileKIOSK_ATTESTATIONis notoff. Amended 2026-11-15: the boolean becomes the project's device level, in the evaluations' vocabulary, offered only whilekioskProjectsOn— points 1 and 2 of the amendment of 2026-11-15. - The station stays on Quiz and frames the portal. A kiosk session of
a project is confined to one Quiz page of that project (the station
page): a thin bar (the station's label, the server's deadline, Leave
this station) above an
iframeof the portal. The station enters that page by a full navigation (location.replace, asapps/web/src/kiosk/useKioskStation.tsopens an exam today), so the page's own CSP (point 10) applies. Everything of ADR-051 runs unchanged on that page: re-attestation, the 30 s retry, the event stream, the return to/kiosk. The iframe hasallow="clipboard-read; clipboard-write"and asandboxwithoutallow-top-navigationor popups, so nothing the portal serves can take the station off the page. - The launch. Amended 2026-11-15 (review): one start route. The
station page asks the student's own start route,
POST /app/api/projects/:id/workspace/start, for the launch URL and puts the returned{ url }in its frame. That route is a write under/app/api: the station's cookie is sent, a suspended station gets the423, CSRF applies. The declarationPROJECT_SEBbecomesPROJECT_CONFINED,{ sessions: ["portal", "seb", "kiosk"], activities: ["project"] }; it declares the two routesPROJECT_SEBdeclares today, this one andGET /app/api/student/projects/:id(modules/project/routes.ts), and the test setPROJECT_SEB_ROUTES(auth/testing.ts) becomesPROJECT_CONFINED_ROUTES. Widening both is safe: each loads through the same guard below, which admits a confined session of THIS project only. The start route also gainsfreshAttestation: true, whichtrust.tsreads in itskioskbranch only (kioskAttestationRefusal): a station's launch needs an attestation less than two minutes old, as the submit does (ADR-051 §6). Access is loaded first (invariant 6):sebProjectSession(modules/guards.ts) becomes oneconfinedProjectSession(auth, projectId)overisTrustedClient(auth.kind)— a non-delegated confined session of THIS:id— which feedsfindStudentProjectView(the classroom's student branch with the caller's claimed seat) and the session's trusted kindvia. Any mismatch answers the 404 of a missing project. ThenworkspaceStartRefusaldecides the refusals a student can read, the level among them (amendment, point 2). From akiosksession the launch token carries a new claimkiosk: { deviceId, sitting }inLaunchTokenClaims(@quiz/contracts),sittingbeing the approving pairing's id (amendment, point 4); the answer staysno-store, the token unlogged, itsjtiaudited. The portal's/launchin exam mode refuses a token with neithersebnorkiosk; withkioskit skips the SEB header check and sets itsexam_session, carrying thesitting. The portal never calls Google. - Pairing and supersession.
kiosk_pairingsgains a nullableproject_idwith a one-activity check, assessionshas.GET /app/api/pair/:codealso lists the open projects the student can start on a station (a claimed seat,online_seb, a level that acceptskiosk— "SEB or kiosk" or "Kiosk only" since 2026-11-15 —, before the effective deadline of ADR-078 §2); approval opens akiosksession withprojectId. One confined session per (user, project), the newer superseding the older whichever its kind: a station's session supersedes the student'ssebsession of that project and the reverse, assupersedealready does. Supervision in v1 is the phone only: projects have no live dashboard, hence no Assign a station. Alerts go to the audit and to the project's workspace list. - The end, and the shared station. A project kiosk session's end closes the portal session it opened, so a workspace is never left open to the next student; leaving early hands nothing in (the project is graded from its repository at the deadline, as ever), and the portal never decides the end. Amended 2026-11-15: the ends, the close and the hold are point 4 of the amendment of 2026-11-15.
- Suspension v1 (owner). A suspended station covers the iframe with
ADR-051's suspension screen, and
kiosk.suspendednames the project. Like SEB, the portal checks trust at launch only. A portal "suspend" message is a possible later step, not promised here. Accepted as a residual risk, 2026-11-15 (owner): point 5 (a) of the amendment of 2026-11-15. - The deadline. The station's session ends at the student's
effective deadline, not at deadline plus the grace that ADR-078 §7
grants the git relay. When the portal answers 403 because its 4 h
exam_sessionexpired before that, the station page relaunches (point 4); resuming a workspace consumes no quota. Accepted as a residual risk, 2026-11-15 (owner): point 5 (b) of the amendment of 2026-11-15. Corrected 2026-11-16 (ADR-130 §9): what the workspace holds at the deadline is collected by the platform (ADR-130), a station left early included. - Sequencing (owner). This ADR is written now. Implementation waits
until SEB projects are open to students (proof B recorded, M6-07).
Offering the setting in production further requires proof K on
staging, on a real station in a web kiosk with URL blocklist
*and allowlist {Quiz, portal}: the iframe loads; code-server works (its websocket, its service worker, its webviews, the clipboard, shortcuts not swallowed); the extension still answers the top page; the portal's cookies survive the 303 of/launchinside the iframe. Proof B is a property of SEB and gates nothing of the kiosk beyond the sequencing above. Amended 2026-11-15 (owner): implementation no longer waits; production waits for both proofs — point 1 of the amendment of 2026-11-15. - Framing. Each portal instance sends
Content-Security-Policy: frame-ancestors 'self' <its Quiz origin>in every mode —'self'because code-server frames its own webviews on the portal's origin; the production portal names production Quiz only, the staging portal staging Quiz only — replacingX-Frame-Options: SAMEORIGIN(set today byapps/codespace/deploy/Caddyfile). Quiz addsframe-src <CODESPACE_URL>to its CSP (apps/api/src/csp.ts) on the station page only. Since 2026-11-14 the header also covers ADR-129's review sessions; harmless — point 6 of the amendment of 2026-11-15. - Same site, required. Quiz and its portal stay on the same registrable domain in each environment. A host move that breaks this reopens the decision: a cross-site frame loses its cookies.
- Capacity. A kiosk project is not opened to a class larger than the quota that carries it (ADR-047 amendment "M6-06" (C)); the portal enforces it (its 429, shown on the station). ~~Room-sized sittings wait for M6-05.~~ Amended 2026-11-15 (owner): M6-05 is done and changed no quota; the setting warns, and an administrator raises the holder's quota before a sitting — point 7 of the amendment of 2026-11-15.
- Audit.
codespace.launch_issuedgainskiosk: truefor a station's launch;kiosk.pairedandkiosk.suspendedmay name a project; the union gainscodespace.session_closed(the cause:left,superseded,deadline,expired; since 2026-11-15 alsoretiredandswept, amendment point 4; since 2026-11-16 alsorestarted, amendment of 2026-11-16) andcodespace.session_close_failedfor the portal close of point 6; the setting is audited as point 2 says. No token or cookie is written.
Consequences¶
- ADR-051's machinery is reused whole; the cost is on the edges: a
migration (
kiosk_pairings.project_id, the project's device level), the start route widened tokioskand its one confined-session guard, the pairing list, the end sweep andendKioskSessionskeyed by activity, the close job and the pairing hold,watchlearning projects, the station's cookie renamed__Host-, one CSP source on one page, and on the portal thekioskclaim,frame-ancestorsand the close message. - The extension and its
externally_connectablestay limited to Quiz's origins. The Admin console's URL allowlist gains the portal's origin;docs/development/kiosk.mdchanges when this ships (the flag turned on in production), not before. - Same-site exposure: the portal's host is same-site with Quiz; what a session may serve there is ADR-047's amendment of 2026-10-11. Quiz's double-submit CSRF and the confinement of the session to the project bound it, and the iframe's sandbox keeps that content from navigating the station. Amended 2026-11-15: this can no longer lean on that amendment's premise ("another browser never loads the page") — ADR-129's review session and a shared station both break it; point 3 of the amendment of 2026-11-15.
00§0.6 ("fallback stations for an exam") becomes "for an exam or a supervised project" when this ADR is accepted; the spec edit lands with acceptance (done 2026-11-15;CLAUDE.mdinvariant 6 changes with the code, M6-11b and M6-11d). N-SEC-10's blocking exception applies at launch.- A future split of Quiz and its portal onto two sites breaks this design (point 11).
Alternatives considered¶
- The extension or the portal relays the attestation
(
externally_connectablegains the portal's origin). Rejected: that origin serves student-controlled content, so the station would become an attestation oracle for a laptop; and calling Google from the portal would put a Verified Access key on the VM that runs student containers, against the spirit of ADR-010. - A top-level 303 to the portal, as SEB does. Rejected: it loses the
re-attestation and the forced return to
/kioskat the deadline (the portal would have to decide the end, against invariant 5), and it leaves a live workspace to the next student on the station. - Widening
quiz_kiosktoDomain=chevallier.io. Rejected: the station's credential would reach the portal's host. - A station launch route of its own (
POST …/workspace/launch, this record's first §4, which also kept the station's cookie on/app/apiand taught the refusal afromKioskbesidefromSeb). The start route was thenGET /app/codespace/start/:id, outside that cookie's path, and a GET passes a suspended station and escapes CSRF. Dropped at review, 2026-11-15: since audit L7 the start route is a POST under/app/apiwith CSRF and the423; a second route would duplicate its loader and its refusals. - Keeping the bare
quiz_kioskand accepting its shadowing. The owner accepted that denial of service before the__Host-rename was on the table; rejected at review (amendment, point 3).
Amendment 2026-11-15: accepted, four levels, built behind a flag¶
Scope: §1 (reversed), §2 (the setting), §4 (one start route), §6 (every end closes), §9 (sequencing), §12 (quota); the residual risks of §7 and §8; the station's cookie; the consequence "Same-site exposure". The product owner asked on 2026-11-15 that a project's Where students work offer the same Chromebook choice as an exam's Allowed devices, and settled four points after a spec challenge, marked owner. Everything else below was settled at review the same day (the orchestrator, as reviewer in charge), marked review: it is not the owner's.
- Order (owner). Built now, behind the server flag
KIOSK_PROJECTS(flag()ofapps/api/src/config.ts, default off). Production turns it on only after two hardware proofs on staging: project proof B (anonline_sebproject under a real Safe Exam Browser, PROGRESS M6-07) and proof K (§9; the Admin console's URL allowlist gains the portal's host; it stands on ADR-051's own station checks,docs/development/kiosk.md§7). This waives §9's "implementation waits", not the proofs. Amended 2026-11-16 (owner): turned on in production on 2026-11-15; the proofs are owed (06, question 72). The flag's rule (review). One predicate,kioskProjectsOn(config) = KIOSK_ATTESTATION !== "off" && KIOSK_PROJECTS, read in exactly two places: the mode write refuses a change TO a station level with the existing422 kiosk_unavailable(asmodules/evaluation/writes.tsdoes for an exam), and the work-mode payload exposeskioskOffered. A (mode, level) pair re-sent unchanged is never refused (workModeRefusal'sfrom === to), and leaving a station level always passes. A live project that already holds a station level keeps it, and its stations keep working, flag off or on: the flag gates new choices, it is not a kill switch. That is safe because no guarantee of the station path depends on the flag, and the kill switch staysKIOSK_ATTESTATION=off, which removes every kiosk route and stops every station, exams included, as today (its effect on project sittings: point 4). The other reading — refuse the stations of a live project — would strand a Kiosk only project, whose level is frozen once launched. - Four levels (owner), like an exam: Any / SEB / SEB or kiosk / Kiosk only. This reverses §1's deferral of kiosk-only projects. The model (review: proposed in this record and accepted at review, not the owner's):
- One vocabulary. The four levels exist once today, as the web's
CHOICES(apps/web/src/evaluation/AllowedDevices.tsx, idsany,seb,either,kiosk, stringseval.devices.*). That table moves to@quiz/domainasDEVICE_LEVELS, each level with itsTrustedClient[](anynone,sebseb,eitherboth,kioskkiosk, inTRUSTED_CLIENTS' order);AllowedDevicesreads it for evaluations (whose two booleans map to a level there), and a project reads it too. - No fourth work mode.
online_sebmeans supervised; only its UI label changes, a rename is out of scope. What it implies holds at every station level: nobody invited, the workspace seeded from the distribution repository, the deadline kept undercommit, the staff's review refused until the deadline is applied, the portal's exam mode. - One column, one mapping.
projects.devicesholds a level id, defaultany.ProjectWorkModeBodybecomes a union discriminated bymode:devices(seb,eitherorkiosk) is present withonline_sebonly and absent otherwise, where the server writesany; the schema refuses a mismatched pair (invariant 7), and a check constraint on the column only backs it up. One pure mapping in@quiz/domainturns(work_mode, devices)into the level the screen shows and back.codespace.work_mode's payload carriesdevices. - One control. The project's setting is a Segmented
Own tools | Online workspace, and under Online the same
AllowedDevicesradio list, its props generalised to a level,kioskOfferedandonPick: Any isonline, the three othersonline_sebwith their level. - The refusal.
workspaceStartRefusaltakes the session's trusted kind (via: TrustedClient | null, fromconfinedProjectSession, §4) instead offromSeb, and refuses unless the project's level accepts it:seb_requiredwhensebis accepted, a newkiosk_requiredat Kiosk only (the student's page offers no.seband sends the student to a station;sebProjectSeatserves no.sebthere). - Frozen with the mode.
workModeRefusalcompares (mode, devices) pairs: changing either after the first student launch (codespace_projects.first_launch_at) is409 work_mode_frozen. The grant and group rules stay the mode's. A staff seat's launch still freezes nothing (ADR-077) and launches at the project's level. - The station's cookie becomes
__Host-quiz_kiosk(review, 2026-11-15; the owner had accepted a shadowed station cookie as a denial of service before this was known). The barequiz_kiosk(Path=/app/api) had one stated reason, this record's first §4 (audit L8 left it out of the prefix for it,apps/api/src/auth/cookies.db.test.ts); with one start route nothing needs it. Over https the station's cookie is__Host-quiz_kiosk; Path=/; Secure; HttpOnly; SameSite=Strict, named bycookieNamelike the session's. A sibling host can neither set nor shadow it, and the browser holds one per host and path, so two cannot arrive. Before, student script on the portal's origin (ADR-047's L24 gaps) could setquiz_kioskfor the parent domain; a longerPathis sent first (RFC 6265 §5.4) and the parser keeps the first cookie of a name (@fastify/cookieovercookie1.x), so the station was refused. It could only deny: Quiz's session and CSRF cookies are already__Host-(audit L8). - Its own PR, first, without a flag (M6-11a): it touches the 19
active production stations, which serve exams, and nothing of
projects. One reader,
stationCredential(req), replaces everyreq.cookies[KIOSK_COOKIE](auth/trust.ts,modules/kiosk/routes.ts): the prefixed cookie when present, else the bare one. The credential's value is unchanged:verifykeeps the credential the request holds for that device, writes it under the new name and expires the bare one (Path=/app/api,Max-Age=0, host-only: the one Quiz set). A station re-attests within minutes — before each pairing code at rest, every 10 minutes in a sitting (ADR-051's amendment of 2026-11-10) — so it moves at its next attestation without losing its sitting. - The fallback's removal belongs to M6-11d — delivered as its own
PR, M6-11f (split at delivery, 2026-11-15, so that the closes of
M6-11d wait for no gate) — and is merged only once
M6-11a has run in production for 12 h: a production approval ships
whatever
mainholds, and a bare cookie, never issued after M6-11a, lived 12 h at most (KIOSK_COOKIE_HOURS). Until then no station frames the portal (KIOSK_PROJECTSis off), so no shadow can be planted. - What remains on a shared station. The L24 premise ("another
browser never loads the page without the session's cookie") fails
twice: ADR-129's review session (ADR-047's amendment of
2026-11-14)
and a shared station, whose next student uses the browser where the
previous one's content ran. What still bounds it: Quiz reads only
__Host-cookies there; the portal's own are signed (exam_session) or rotated (the/s/<id>session); the close of point 4; the frame's sandbox. Left: cookies planted for the parent domain in volume can make the station's requests too large to serve — a denial of service, no identity, repaired by clearing the station's browser data (question 73). The full fix stays a subdomain per session (question 70). - Every end closes the portal (review; owns the ends, the close and the hold of §6).
- The sitting is the pairing row. The approving
kiosk_pairingsrow is the durable record of a project sitting: it names the station (device_id), the student (user_id, set on approval) and the activity (project_id, added besideevaluation_idwith a one-activity check), outlives the session (no code deletes a pairing; a consumed one staysconsumed), and gainsclose_completed_at. Its id is thesittingof §4. A session row is never the record and its key never leaves Quiz:sessions.sid_hashis the hash of the bearer token (apps/api/src/db/auth.ts). The session points to its sitting by a newsessions.kiosk_pairing_id, set when the station consumes its approved pairing.project_idisON DELETE SET NULL, so deleting a project leaves the sitting to be closed by its id alone. - The ends. Leave this station; replacement by a newer confined
session of the pair (
supersede); the student's effective deadline; the 6 h lifetime; the station's retirement (endStationSessions). The ticker's sweep (ADR-006) ends station sessions at the effective deadline and past theirexpires_at(expiry is otherwise lazy, at the next request). OneendKioskSessions, keyed by activity ({ evaluationId } | { projectId }), serves them all. Amended 2026-11-16 (owner): one more end, a code requested by the freshly attested station while its sitting is live (restarted) — the amendment of 2026-11-16. - Every disappearance closes. Session rows also vanish by lazy
expiry, by
purgeExpiredSessions, by the account module (modules/account/service.ts, throughquiz_pseudonymize_account) and by cascades. Two rules cover them all: (1)dropSessions(auth/session.ts), the one place sessions are deleted, enqueues the close for every removedkioskrow with aproject_id, whatever the reason, and the account module goes through it; (2) the sweep enqueues the close of everyconsumedproject pairing with no live session and noclose_completed_at— the safety net that makes a cascade or any forgotten path harmless. - The close is a pg-boss job, retried and idempotent, sending a new
HS256 service message (its own audience) naming the
sitting(and the project when it still exists). The portal tags each socket it upgrades with thesittingof theexam_sessionit was upgraded under; the close revokes theexam_sessioncookies of that sitting and drops every socket of that sitting, unconditionally. Aseblaunch's cookie carries no sitting, so the student's own SEB session is never cut. The portal session (/s/<id>, one per student and assignment) is rotated only when that sitting opened it last: if another browser resumed it since, its cookie was already rotated away from the station. The container and its volume are untouched. On success Quiz setsclose_completed_at; retries exhausted are audited. - The kill switch never stops a close. The sweep and the close job
run whatever
KIOSK_ATTESTATIONandKIOSK_PROJECTSsay (today the kiosk ticker task returns early whenKIOSK_ATTESTATIONis off,modules/kiosk/jobs.ts); withKIOSK_ATTESTATION=offthe sweep ends every project station session, which enqueues their closes by rule (1). - The hold. A station cannot be paired, for an exam too, while it
has a project pairing without
close_completed_at(/kioskshows "call the supervisor"). With the portal down the job retries; the supervisor seats the student at another station, or in SEB at "SEB or kiosk". Retries exhausted: an administrator retires and reactivates the station once the portal answers and the workspace shows closed. Delivery, 2026-11-15 (M6-11d review): with the portal off (CODESPACE_URLempty) the close completes without a call and without an audit row, since no launch could be issued; a portal turned off after a launch therefore leaves that portal session unclosed. A close request is marked before it is enqueued, so a crash between the two leaves the station held until that Retire then Reactivate. Amended 2026-11-16 (owner): the hold's rule is unchanged, but/kiosklearns it from the code request's409only (the station's payload no longer carries it), and a restarted station no longer waits for the 6 h or an administrator — the amendment of 2026-11-16. - Accepted residual risks (owner), details in the operator notes (internal):
- (a) Suspension (§7): a suspension on this path is weaker than an
exam's
423(N-SEC-10). - (b) The deadline (§8): the station's session ends at the
student's effective deadline (
effectiveDeadline: a per-student extension follows the repository's own, ADR-078 §2), not at deadline plus the grace. - Refreshed. Exams' proof B is done (ADR-051, amendment of
2026-10-10); the project flow's is owed. §10's
frame-ancestorsis per host, so it also covers ADR-129's review pages; harmless, since only Quiz's own origin may frame them and only the station page does. - Quota (owner). §12 is kept: an administrator raises the quota
holder's quota (ADR-047 M6-06 (B), (C)) before a sitting; the setting
warns when the classroom's claimed seats exceed it; the portal's 429
stays the only enforcement. M6-05 (done 2026-10-09) set no larger
default: every grant is 2 (
DEFAULT_MAX_ACTIVE_SESSIONS, and all seven production grants on 2026-11-15), so a room does not fit without that step. Revisit if sittings fail on it. - Delivery: six PRs, M6-11a–f in merge progress, card M6-11 of the task cards.
- The station page (review, 2026-11-15, M6-11e). §3's event stream does not run there:
/app/api/eventsserves no project session and is not widened. The station page polls/meevery 60 s and covers its frame when its own attestation is refused or silent; the ends are enforced by the portal close of point 4. Proof K (§9) also checks: focus the editor, trigger a refused attestation, then type — do keystrokes still reach the editor underinert?
Amendment 2026-11-16: a restarted station frees itself¶
Scope: point 4 of the amendment of 2026-11-15
("The ends"; "The hold" keeps its rule, now told by the code request's
409 only) and §13's causes. The product owner
decided on 2026-11-16, after a spec challenge, following a production
incident the same day.
- What happened. A station was rebooted during a project sitting. It
came back on
/kiosk, whose page never looks at a session, while the server still held the sitting's session row (6 h). The station was held (point 4, "The hold") and nothing ended the sitting: Leave needs the lost page, a replacement pairing needs a code. It showed "Closing the previous workspace" until the 6 h expiry or an administrator's Retire then Reactivate. Any reboot, power loss, crash or ChromeOS update restart during a project sitting did this. - The new end. When a station asks for a pairing code
(
POST /app/api/kiosk/device_authorization) while a project sitting of it is still live (a session points to its pairing), and its attestation is fresh (kioskCheckFresh, the rule of the start route'sfreshAttestation, §4: a last check under two minutes old that isokorunavailable, so a Google outage counts as fresh), the server ends that sitting's station session throughdropSessions, causerestarted; the portal close follows as for every end. Only/kioskasks for a code, so such a request from a freshly attested station means its browser is back on/kiosk: a restart, a lost session or station cookie, or the app sending the station back there (toKiosk, fromStationOrLandingandConfinedElsewhereinapps/web/src/App.tsx). It proves nothing about the student. Without a fresh attestation, or from a station that is not active and named, nothing ends. An exam's station session is never touched. - The station asks while held. Before this amendment
/kioskread the hold from its attestation (KioskStation.held) and asked for no code while held, so the request above was never sent. The hold is now the code request's409 station_heldalone:/kioskattests, asks for a code and, held, shows the same screen and tries again every 30 s. The field is removed from the station's payload. - The hold is unchanged. The same request still answers
409 station_held: a code is issued only onceclose_completed_atis set, and the poll keeps its own check. The station's browser still holds the previous student's portal cookies; pairing before the portal confirmed the close would let the next student's workspace content read them on the shared portal origin. The first turn of/kioskafter the restart ends the sitting and is refused; a later turn — attest, ask for a code,409until the close completes — gets a code, usually the next one, about 30 s later. - Unlike an exam (ADR-051 §7): an exam's previous session dies when the new pairing is consumed; a project's when the code is requested, because its close must finish before any code is shown.
- Audit.
codespace.session_closedandcodespace.session_close_failedcarrycause: "restarted"; no new action, no alert in the workspace list. - Residual risks (owner):
- (a) Repository content opened in the workspace, after pushing Quiz's cookies out of the browser's store, can send this simple POST and end the student's own sitting. That is what Leave does; the same eviction used to lock the station for hours.
- (b) A student without a phone cannot pair again on a Kiosk only project: projects have no Assign a station (§5). The supervisor's answer is SEB when the level allows it.
- (c) A restart near the deadline costs the minutes of a new pairing.
- (d) A room-wide power cut closes every sitting at once.
- (e) A station sent back to
/kioskwithout a restart (a lost cookie,toKiosk) ends its sitting the same way: the audit's cause still readsrestarted, and only that student's own sitting on that station ends.