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 ofin docs/merge/PROGRESS.mdand its handoff notes, the cardin docs/merge/09-tasks.md, the sections it references, and the decisions it depends on indocs/merge/08-decisions.md(stop if one isopen). Classroom's code is read in a detached reference checkout (see README "Sources"); never edit~/heig-classroom. Work in a worktree on branchmerge/<ID>-<slug>. First commit: setto in progressinPROGRESS.mdwith 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, runlean-reviewerandinvariant-reviewer, fix. Run tests per package (AGENTS.md§7). Last commit:PROGRESS.mdrow todonewith the PR number and a one-line handoff for the next task; add to07-incompatibilities.mdanything 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;
/launchrefused in exam mode without a valid header;simulatedimpossible in production; proof B recorded before the first SEB project. - As delivered (branch
merge/M6-07-seb-projects). Migrations0080_seb_projects(Quiz) and the portal's0002_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.tssendLaunchFile(ticket,auth.seb_launch, file) serves both the evaluation's and the project's (GET /app/api/projects/:id/seb, thecodespacemodule: own portal session, a claimed seat in the classroom of a publishedonline_sebproject,sebProjectSeat). The start URL is the ticket route for both;sebAllowedHosts(config, activity)adds the portal's host for a project, thenSEB_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.tsuntouched). 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_idandlaunch_tickets.project_id(cascade, a check: never both withevaluation_id);SessionAuth.projectId(required, likeevaluationId); the route config gainsactivities(absent: evaluation):serves()refuses a confined session whose activity the route does not list, soSITTINGstays the evaluation's andPROJECT_SEB(GET /app/api/student/projects/:id,GET /app/codespace/start/:id) the project's;GET /melists both and saysprojectId.findStudentProjectViewreads THIS project for itssebsession, through its seat, as a portal session would (sebProjectSession); any other confined session stays the 404.sebProjectSeatis that same loader plus theonline_seband classroom checks. Supersession and the mismatch audit are per activity (subjectproject).seb.db.test.tsnow 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) —workspaceStartRefusalgainedfromSeb;seb_requiredis now "from the portal" only; the audit addsseb: true, never the key. The portal's/launchin 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-boundexam_session. - Point 5: BEKs optional on the portal (an empty list is the Config Key
alone, the exam no longer refused without one);
online_sebis synced (isOnlineMode;syncsToPortalremoved) withbrowserExamKeys: [], the resync'sseb_requiredlifted. BEK list: after proof B step 7 (per-student.seblikely 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/keepsverify.ts(on@quiz/seb's hashes and headers, imported from there, BEKs optional) andcheck.ts(the proxy's cookie check, the outside-SEB page); its plist, Config Key,.sebfile,/exam/:id.sebroute and vectors are deleted (the vectors live inpackages/seb); itsSEB_EXTRA_ALLOWED_HOSTS,config_keyandseb_configare gone. The PUT answersconfigKey: null, sebLink: null. - Web: the student's Open in Safe Exam Browser (
SebLaunchModal, workspace copy) on anonline_sebproject; 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=1and thepj-draft-manualSEB project; scenesproject-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); aworkspace.freezeHS256 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; theapps/codespaceCLAUDE.mdrecords that this mode drops the git-channel divergence; contracts inpackages/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
.sebfilter (M6-07) for SEB. Kiosk use waits for proof B. - Goal:
packages/qt-workspacethrough both registry entry points (04 §4.15); publication checks (workspace.requires_supervision,workspace.capacity); seed builder fromtoStudent'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,proposedstate; grading panel shows the file; audit events; en/fr; thecodefallback 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-reviewerfinds 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_PROJECTSstays 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 readerstationCredential(req)with the bare-name fallback;verifyre-writing the same credential under the new name and expiring the bare one; N-SEC-01 already says so. - M6-11b, API.
DEVICE_LEVELSand the one(work_mode, devices)mapping in@quiz/domain;ProjectWorkModeBodydiscriminated bymode;workModeRefusalover (mode, devices);workspaceStartRefusalbyvia(kiosk_required);kioskProjectsOnread by the mode write (422 kiosk_unavailable) and the work-mode payload (kioskOffered) only.- The migration:
projects.deviceswith its check;kiosk_pairings.project_id(ON DELETE SET NULL, one-activity check) andclose_completed_at;sessions.kiosk_pairing_id. PROJECT_SEB→PROJECT_CONFINEDwithkioskon its two routes,POST /app/api/projects/:id/workspace/start(plusfreshAttestation) andGET /app/api/student/projects/:id;PROJECT_SEB_ROUTES→PROJECT_CONFINED_ROUTES(auth/testing.ts);sebProjectSession→confinedProjectSession.GET /pair/:codelists the projects; approval re-checks the list's rule asapprovePairingdoes for an exam and opens a projectkiosksession pointing to its pairing;watch.ts'ssittingOnlearns projects.- Edits
CLAUDE.mdinvariant 6's kiosk sentence to: "Akiosksession (ADR-051), like asebone, 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 ofLaunchTokenClaims;/launchaccepting it in exam mode without the SEB header check, itsexam_sessioncarrying thesitting; each upgraded socket tagged with itssitting;frame-ancestors 'self' <Quiz origin>replacingX-Frame-Optionsindeploy/Caddyfile; the close message (its own audience): revoke that sitting'sexam_sessioncookies, drop its sockets, rotate/s/<id>only when that sitting opened it last. Editsapps/codespace/CLAUDE.mdinvariant 12's last sentence to: "An exam token without it is refused, unless it carries akioskclaim instead (ADR-089), which skips the SEB header check." - M6-11d, every end closes. One
endKioskSessionskeyed by activity; the sweep ends station sessions at the effective deadline and past theirexpires_at;dropSessionsenqueues the close for every removedkioskrow with aproject_id, and the account module goes through it; the sweep also closes everyconsumedproject pairing with no live session and noclose_completed_at; sweep and close job run whateverKIOSK_ATTESTATIONandKIOSK_PROJECTSsay, andKIOSK_ATTESTATION=offends project station sessions; the hold;codespace.session_closedandcodespace.session_close_failedin the audit union,kiosk.paired/kiosk.suspendednaming a project. EndsCLAUDE.mdinvariant 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_PATHand the expiry inverify, 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'sframe-srcon that page only; the project's setting as Own tools | Online workspace withAllowedDevices(props generalised to a level andonPick) under Online, and the quota warning;/kioskand/pairwith 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 defaultEXAM_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_kioskwith 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 is422 kiosk_unavailable; a mismatched (mode, devices) body is refused by the schema; - Kiosk only refuses a
sebsession (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=offstops no close; - a close drops every socket of its sitting and never revokes the
student's
seblaunch; - 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 useclassroomInstallation. - 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_relaysrows are not purged with their project; the daily reconciliation's head refresh does not read the relays; an App push lookspushAuthorup twice. - M8-01: the follow-ups of the code
review of #550, not blocking (group stops, member placement,
addedAt,repoMembersbatching, 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
llmmodule (qt-rich, theshortLLM 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
criteriagrading 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-kitextraction (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 tocriteria: itscriteria.ymledited in the source repository (tolerant tests instead ofrepairs.txt; noprompton the identity criteriongit.commits, so it is teacher-only;rapport.presentationkeeps 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 whyreview_grade_run_idis NULL on every row while its 26 review runs areok. - 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 workflowrun.yml, tagged and pinned by sha; the next labs are written in v3 with the shim; every live project that usedscore_is_grademoves its CI to StudentScore 1.0. - Acceptance: a
quiz-gradedispatch on a staff test repository of a v3 project is accepted and its rows written; a push run'sGRADEis 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-pcbandlabo-03-dartsare released. - Goal: remove
testsCriterion,test:,identityCriterion,buildCommand,testCommand,evidenceOutputs, the JUnit reading and the overlay,apps/runner'sprojectaction, its ceilings and thelab-cimage, and v2 parsing;CLAUDE.mdinvariant 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
containerArgsand env list are unchanged, theprojectroute gone.