Skip to content

9. Task cards

One card = one branch = one PR. Ids are M<phase>-<nn>; L-<nn> are after the merge. ‖ = can run in parallel with the tasks named. Section references (§3.1…) point into this folder.

The cards of the tasks done or dropped in PROGRESS.md are in history/09-tasks-delivered.md, under the same headings and anchors; this file keeps the open ones.

The brief to hand to an agent

Replace <ID> and paste as the agent's prompt; the card carries the rest.

You implement task of the heig-classroom → Quiz merge (ADR-035). Read, in this order: CLAUDE.md, AGENTS.md, docs/merge/README.md, the row of in docs/merge/PROGRESS.md and its handoff notes, the card in docs/merge/09-tasks.md, the sections it references, and the decisions it depends on in docs/merge/08-decisions.md (stop if one is open). Classroom's code is read in a detached reference checkout (see README "Sources"); never edit ~/heig-classroom. Work in a worktree on branch merge/<ID>-<slug>. First commit: set to in progress in PROGRESS.md with your branch; push; open a draft PR titled <ID>: … whose body has a State section (done / next / blocked) that you update at every push. Follow /feature: plan, implement, run lean-reviewer and invariant-reviewer, fix. Run tests per package (AGENTS.md §7). Last commit: PROGRESS.md row to done with the PR number and a one-line handoff for the next task; add to 07-incompatibilities.md anything new you found. Do not merge: report back.

Every code task also: keeps its migrations additive (one migration per PR); adds its tables' import step and fixture rows to the import script (from M1-06 on); forwards classroom fixes newer than the sync point for the files it ports; writes en + fr for every string.


M3 — Projects

The pilot's open follow-up has no card of its own; its finding was recorded on the card M3-14 (2026-10-06), and is carried here. M3-14f, its sibling, is delivered.

M3-14g — Leaving the course staff ends one's staff seats

  • Depends on: M3-14c.
  • Note (ADR-077 Q7; product owner, 2026-10-06: keep as is for now, a follow-up): removing a member from a course's staff (ADR-068) leaves their staff seats in its classrooms, and with M3-14c their test repositories' grants. To decide: remove the seats (and revoke) with the staff seat, or keep them.

The pilot's load test (100 repositories at a deadline applied in < 5 min, the tick with 100 due projects) was deferred (product owner, 2026-10-06).

M6 — Online workspace and SEB (after the cutover if D09 says so)

M6-07 — SEB for projects

  • Depends on: M6-02, M6-06.
  • Goal: §6.3 points 2–5.
  • Acceptance: route sweep covers project routes; /launch refused in exam mode without a valid header; simulated impossible in production; proof B recorded before the first SEB project.
  • As delivered (branch merge/M6-07-seb-projects). Migrations 0080_seb_projects (Quiz) and the portal's 0002_platform_seb. Proof B is done for evaluations (2026-10-10) and pending for projects: the manual procedure is 06 §6.3, "Proof B, by hand", for the product owner; nothing opens SEB projects to students before it is recorded here.
  • Point 2, the platform builds every .seb: auth/seb.ts sendLaunchFile (ticket, auth.seb_launch, file) serves both the evaluation's and the project's (GET /app/api/projects/:id/seb, the codespace module: own portal session, a claimed seat in the classroom of a published online_seb project, sebProjectSeat). The start URL is the ticket route for both; sebAllowedHosts(config, activity) adds the portal's host for a project, then SEB_EXTRA_ALLOWED_HOSTS (new Quiz setting, host names, * wildcards but never wildcards alone, empty by default) for both — empty, the evaluation's bytes and Config Key are unchanged (seb.snapshot.test.ts untouched). The ticket route checks the header against either file before consuming the ticket, then against the ticket's own; a project's session lands on /projects/:id. What differs between the two activities is one table, SEB_ACTIVITY; the ticket's activity is read without consuming it (pendingLaunchTicket), so the header is checked against that activity's file and a wrong one never burns the ticket.
  • Point 3, one activity: sessions.project_id and launch_tickets.project_id (cascade, a check: never both with evaluation_id); SessionAuth.projectId (required, like evaluationId); the route config gains activities (absent: evaluation): serves() refuses a confined session whose activity the route does not list, so SITTING stays the evaluation's and PROJECT_SEB (GET /app/api/student/projects/:id, GET /app/codespace/start/:id) the project's; GET /me lists both and says projectId. findStudentProjectView reads THIS project for its seb session, through its seat, as a portal session would (sebProjectSession); any other confined session stays the 404. sebProjectSeat is that same loader plus the online_seb and classroom checks. Supersession and the mismatch audit are per activity (subject project). seb.db.test.ts now runs with the App and the portal configured: its sweeps walk every project route, and a project's session has its own sweep (PROJECT_SEB_ROUTES).
  • Point 4: from that session the start route mints the launch token with seb: {configKey} (the session's stored key) — workspaceStartRefusal gained fromSeb; seb_required is now "from the portal" only; the audit adds seb: true, never the key. The portal's /launch in exam mode refuses a token without the claim, then verifies the header against the claim's key (@quiz/seb), then the BEKs if any, then sets its IP-bound exam_session.
  • Point 5: BEKs optional on the portal (an empty list is the Config Key alone, the exam no longer refused without one); online_seb is synced (isOnlineMode; syncsToPortal removed) with browserExamKeys: [], the resync's seb_required lifted. BEK list: after proof B step 7 (per-student .seb likely gives per-student BEKs): SEB's BEK covers the configuration, and Quiz's file is per student (the ticket in its start URL), so a staff-typed list is expected to match nobody. The Quiz side (column, route, staff field) was written then removed at review; evaluations have none either.
  • Portal: src/seb/ keeps verify.ts (on @quiz/seb's hashes and headers, imported from there, BEKs optional) and check.ts (the proxy's cookie check, the outside-SEB page); its plist, Config Key, .seb file, /exam/:id.seb route and vectors are deleted (the vectors live in packages/seb); its SEB_EXTRA_ALLOWED_HOSTS, config_key and seb_config are gone. The PUT answers configKey: null, sebLink: null.
  • Web: the student's Open in Safe Exam Browser (SebLaunchModal, workspace copy) on an online_seb project; inside SEB the app renders that project page only (Open workspace its one action, no GitHub action, the page framing itself); the staff's Resync under SEB. en/fr; mock ?sebproject=1 and the pj-draft-manual SEB project; scenes project-workspace-seb, student-project-workspace-seb-launch, student-project-in-seb.
  • Plan B (an auto-submitted POST to the portal) not built: Quiz's CSP forbids inline scripts, and the portal would need a POST /launch; it waits for proof B's evidence (06 §6.3).

M6-08 — Freeze and collect contract on the portal (ADR-075)

  • Depends on: M6-03, M6-05. ‖ M6-06.
  • Goal: an exam mode of apps/codespace (no git channel, --network none, work volume only, per attempt); a workspace.freeze HS256 service message and a single-use signed collect endpoint (one file or a capped tar of declared names); destruction of the volume after Quiz acknowledges the hash; a safety cap; the apps/codespace CLAUDE.md records that this mode drops the git-channel divergence; contracts in packages/contracts (M6-01).
  • Acceptance: a frozen workspace refuses any write; collect is single use and refused without a valid token; no container of this mode has a network or a credential (closed list asserted); a destroyed volume is gone; integration against a stub Quiz.

M6-09 — qt-workspace type and Quiz side (ADR-075)

  • Depends on: M6-06, M6-08; D21's .seb filter (M6-07) for SEB. Kiosk use waits for proof B.
  • Goal: packages/qt-workspace through both registry entry points (04 §4.15); publication checks (workspace.requires_supervision, workspace.capacity); seed builder from toStudent's output; the deadline + 3 s freeze-and-collect job (singleton per attempt, the attempt's deadline with accommodations); blob answer with server-stamped hash; two-phase grading on the runner, proposed state; grading panel shows the file; audit events; en/fr; the code fallback swap.
  • Acceptance: a fully configured question through the seed builder, the serialized payload and file tree searched for hidden cases and the reference; a late write is impossible after the freeze; an exercise refuses the type; portal-down opening is refused with the fallback offered; invariant-reviewer finds no second exit of question content.

M6-11 — Kiosk stations for projects (ADR-089), in six PRs

  • Depends on: M6-07's code (merged); ADR-089 and its amendment of 2026-11-15, which owns every rule cited here. Order: a, b, c, d, then e; f once its gate holds. KIOSK_PROJECTS stays off everywhere, staging included, until M6-11d is merged; production also waits for project proof B (M6-07) and proof K (06, question 72).
  • M6-11a, the station cookie (point 3; exams only, no flag, alone): the station cookie named by cookieName, __Host-quiz_kiosk; Path=/ over https; one reader stationCredential(req) with the bare-name fallback; verify re-writing the same credential under the new name and expiring the bare one; N-SEC-01 already says so.
  • M6-11b, API.
  • DEVICE_LEVELS and the one (work_mode, devices) mapping in @quiz/domain; ProjectWorkModeBody discriminated by mode; workModeRefusal over (mode, devices); workspaceStartRefusal by via (kiosk_required); kioskProjectsOn read by the mode write (422 kiosk_unavailable) and the work-mode payload (kioskOffered) only.
  • The migration: projects.devices with its check; kiosk_pairings.project_id (ON DELETE SET NULL, one-activity check) and close_completed_at; sessions.kiosk_pairing_id.
  • PROJECT_SEB → PROJECT_CONFINED with kiosk on its two routes, POST /app/api/projects/:id/workspace/start (plus freshAttestation) and GET /app/api/student/projects/:id; PROJECT_SEB_ROUTES → PROJECT_CONFINED_ROUTES (auth/testing.ts); sebProjectSession → confinedProjectSession.
  • GET /pair/:code lists the projects; approval re-checks the list's rule as approvePairing does for an exam and opens a project kiosk session pointing to its pairing; watch.ts's sittingOn learns projects.
  • Edits CLAUDE.md invariant 6's kiosk sentence to: "A kiosk session (ADR-051), like a seb one, is confined to one exam or one supervised project (ADR-089); it is worth nothing without its station's cookie beside it (trustRefusal, auth/trust.ts), and it ends with the attempt or, for a project, at the first of its replacement, its 6 h, the station's retirement." — only the ends that hold after M6-11b (security review of #1099); M6-11d writes the rest.
  • M6-11c, portal. The kiosk: { deviceId, sitting } claim of LaunchTokenClaims; /launch accepting it in exam mode without the SEB header check, its exam_session carrying the sitting; each upgraded socket tagged with its sitting; frame-ancestors 'self' <Quiz origin> replacing X-Frame-Options in deploy/Caddyfile; the close message (its own audience): revoke that sitting's exam_session cookies, drop its sockets, rotate /s/<id> only when that sitting opened it last. Edits apps/codespace/CLAUDE.md invariant 12's last sentence to: "An exam token without it is refused, unless it carries a kiosk claim instead (ADR-089), which skips the SEB header check."
  • M6-11d, every end closes. One endKioskSessions keyed by activity; the sweep ends station sessions at the effective deadline and past their expires_at; dropSessions enqueues the close for every removed kiosk row with a project_id, and the account module goes through it; the sweep also closes every consumed project pairing with no live session and no close_completed_at; sweep and close job run whatever KIOSK_ATTESTATION and KIOSK_PROJECTS say, and KIOSK_ATTESTATION=off ends project station sessions; the hold; codespace.session_closed and codespace.session_close_failed in the audit union, kiosk.paired/kiosk.suspended naming a project. Ends CLAUDE.md invariant 6's kiosk sentence with: "… and it ends with the attempt or, for a project, at the first of Leave, replacement, the effective deadline, its 6 h, the station's retirement — each closing the portal session." The bare-cookie fallback's removal is M6-11f.
  • M6-11f, the bare cookie's end (split from M6-11d at delivery, 2026-11-15, so that the closes wait for no gate): removes the bare-name fallback of M6-11a — stationCredential's second read, BARE_KIOSK_COOKIE_PATH and the expiry in verify, the test block marked "M6-11f deletes this block" — merged only once M6-11a has run in production for 12 h.
  • M6-11e, web. The station page (bar, deadline, Leave this station, the sandboxed frame fed by the start route's { url }, the overlay while suspended), Quiz's frame-src on that page only; the project's setting as Own tools | Online workspace with AllowedDevices (props generalised to a level and onPick) under Online, and the quota warning; /kiosk and /pair with projects; the student's project page at Kiosk only (no .seb, sends the student to a station); en/fr; mock and screenshots. Follow-up: the station page relaunches the frame on a timer mirroring the portal's default EXAM_COOKIE_MAX_AGE_MS; the launch reply, or the portal, should tell the page the cookie's expiry.
  • Acceptance:
  • M6-11a: a station holding only the bare cookie keeps its sitting across its next attestation and leaves it holding __Host-quiz_kiosk with the same credential;
  • a kiosk session of one project reaches no other project and no evaluation (404);
  • a level change after the first student launch is 409 work_mode_frozen; an unchanged pair re-sent passes; with the flag off a change to a station level is 422 kiosk_unavailable; a mismatched (mode, devices) body is refused by the schema;
  • Kiosk only refuses a seb session (kiosk_required) and serves no .seb;
  • approving a project the pairing list would not show is refused;
  • the session ends at the effective deadline and the portal close runs; the 6 h expiry, the retirement, a purge and a pseudonymization each close the portal; a pairing left without a close is closed by the sweep; KIOSK_ATTESTATION=off stops no close;
  • a close drops every socket of its sitting and never revokes the student's seb launch;
  • a station, for an exam too, stays unpairable while it has a project pairing without close_completed_at.

Loose ends recorded on delivered cards

Open follow-ups that are not tasks of their own; the detail is on each delivered card.

  • M3-03: the journal's targetOf (journal/writes.ts) could use classroomInstallation.
  • M3-04: storing a repository's name without its owner, still open (recorded on M3-08b's card).
  • M3-08b: a manual re-dispatch of an unconfirmed review.
  • M3-12a: the full draft edit (start, grace, grading, scale, publication mode).
  • M6-10: codespace_relays rows are not purged with their project; the daily reconciliation's head refresh does not read the relays; an App push looks pushAuthor up twice.
  • M8-01: the follow-ups of the code review of #550, not blocking (group stops, member placement, addedAt, repoMembers batching, among others); relevant to the M8-06 rehearsal.
  • M8-02: none any more: the resolver was retired on 2026-11-21 (product owner: heig-classroom migrated, old URLs no longer served; database remediation plan §6.4), so its follow-ups (the HMAC-honouring of an old unsubscribe link, an absolute Location, the non-blocking ones of the code review of #547) are dropped.

L — After the merge

  • L-01 Platform llm module (qt-rich, the short LLM matcher, projects). 2026-10-12: the module exists (the gateway, ADR-058; essay and diagram grading, ADR-063); its projects part is L-02 below.
  • L-02 Runner grading of a project (tarball at the frozen sha, size cap, toolchain images, network closed). 2026-10-12: decided as the criteria grading mode of ADR-106, delivered by the cards L-02a…g (L-02g below; L-02a…f, delivered, in the history). 2026-10-26: its evidence moves to the repository's CI (ADR-119), cards L-06a…g (L-06f and L-06g at the end of this section; L-06a…e, delivered, in the history).
  • L-03 packages/ui-kit extraction (what ADR-029 wanted, as a workspace package).
  • L-04 WYSIWYG journal editor (RichText adapter: repository-path images, no markdown normalisation, round-trip tests).
  • L-05 Project templates at course level.

L-02g — Labo 00 pilot (ADR-106 §1, §10)

  • Depends on: L-02c, L-02e.
  • Goal: labo 00 (heigvd-2026-prog-a/labo-prog-00, locked, unreleased) switched to criteria: its criteria.yml edited in the source repository (tolerant tests instead of repairs.txt; no prompt on the identity criterion git.commits, so it is teacher-only; rapport.presentation keeps a prompt that checks only that a name and first-name line is present, names being masked for the model), a Regrade of its 26 repositories, the result compared with the review slot; find out why review_grade_run_id is NULL on every row while its 26 review runs are ok.
  • Acceptance: every repository has proposals; the comparison is recorded in PROGRESS.md; the product owner validates and releases.

Criteria v3, the CI produces the evidence (ADR-119). A project whose snapshot is schema version 2 keeps ADR-106's runner path until it is released; L-06g removes that path last (product owner, 2026-10-27).

L-06f — StudentScore 1.0 and the lab repositories (external)

  • Depends on: L-06a (the schemas), before L-06b's migration runs.
  • Goal: StudentScore 1.0 (heig-tin-info/score) implements both schemas and the reusable workflow run.yml, tagged and pinned by sha; the next labs are written in v3 with the shim; every live project that used score_is_grade moves its CI to StudentScore 1.0.
  • Acceptance: a quiz-grade dispatch on a staff test repository of a v3 project is accepted and its rows written; a push run's GRADE is points over the command leaves' positive maxima.

L-06g — Removal of the v2 path (ADR-119 §10)

  • Depends on: L-06b; merged only once labo-04-pcb and labo-03-darts are released.
  • Goal: remove testsCriterion, test:, identityCriterion, buildCommand, testCommand, evidenceOutputs, the JUnit reading and the overlay, apps/runner's project action, its ceilings and the lab-c image, and v2 parsing; CLAUDE.md invariant 12's archive sentence made conditional and invariant 14's runner part deleted, as ADR-119 §13 proposes.
  • Acceptance: no project with a v2 snapshot is unreleased; the released projects' rows and snapshots read as before; the runner's containerArgs and env list are unchanged, the project route gone.