ADR-127 — A project's scheduled state: armed by Schedule, announced, opened by the ticker¶
Status¶
Accepted (2026-11-06, the product owner's decisions after the "Labo-05
Pneus" incident). Delivery progress lives in changes/.
Scope: a GitHub project's lifecycle (F-PROJ-03), its staff's actions
(F-PROJ-13), what its students see and may do before it opens (F-PROJ-04,
F-ORG-15, N-SEC-20), the project_scheduled notification (F-NOTIF-13).
Relations: amends ADR-104's amendment
of 2026-10-13 item 2 and its amendment of 2026-10-14 (a dated draft is no
longer scheduled); ADR-070 §12
(the ticker no longer keeps an incomplete group project a draft) and §8 (a
scheduled project shows no closed set); ADR-030
rule 12 (a new kind); ADR-022's
addendum of 2026-10-13 (its rationale for a manual-only create_project).
Mirrors evaluations' scheduled (F-EVAL-04, ADR-030 §13). Invariants 4, 5, 6.
Context¶
A draft whose publish mode was scheduled was armed by itself: the ticker
published it at its start (publishScheduled), and its page showed a
primary "Publish" that published it at once, keeping its dates. Nothing
said so. A teacher planned "Labo-05 Pneus" for 16:30, pressed Publish 23
seconds later, and 27 students were told "Accept it" five hours early.
Evaluations already had the model wanted: a draft opens on its own only
once a teacher has scheduled it, a scheduled evaluation is announced and
listed under Upcoming, and Open now is a deliberate second action.
Decision¶
- Four states:
draft(nothing visible, nothing told, autosaved) →scheduled(a real state, armed by an explicit Schedule) →published→locked. The archive is unchanged.publishedandlockedare live (PROJECT_LIVE_STATES); every state butdraftis visible to the students (PROJECT_VISIBLE_STATES);draftandscheduledare edited alike (projectBeforePublication). The three are named predicates of@quiz/domain(projectView.ts), with their SQL twinsliveProject()andvisibleProject()inguards.ts; no site tests!== "draft"any more (checkpointPassincluded). - One primary button whose label follows the start choice: Publish
when the start is now, Schedule when a date still ahead is set
(
draftStartsLater;primaryActionpublishorschedule). The publish mode stays the column behind the choice (manual= now,scheduled= a date). - Scheduled is announced, not open. The students see the project under
Upcoming with its start, on the same bare card as before (name, classroom,
course code, dates, status,
githubLinked; no repository, group, work mode, source or distribution); its view carries no workspace mode, and the workspace start and the.sebof an online project answer the 404 of a missing project until it opens, before any test of its mode. Accept answers409 not_starteduntil the state ispublished, its start come or not. The ticker publishes it at its start, andproject_published("accept it") goes out then. - Editable like a draft, the start choice locked to "a date": a
patch back to manual is
409 publish_mode_frozen(Publish now is the way), a start moved to the past422 start_past. Two secondary actions, no primary: Publish now (POST …/publish) and Cancel the schedule (POST …/unschedule: back todraft, off Upcoming, nobody told, auditedproject.unschedule). - No draft is armed by itself any more. Migration
0129moves toscheduledevery rowstate = 'draft' AND publish_mode = 'scheduled' AND distribution_full_name IS NOT NULL AND deadline_at > now(), archived ones included (hidden byarchived_at, re-armed by an unarchive), and tells nobody (the marker stays null). An unarchived scheduled project whose deadline has passed meanwhile comes back adraft: the ticker would never publish it, and it would stay scheduled for ever. - A scheduled project opens at its start whatever happened since
(product owner's choice, diverging from ADR-070 §12's "stays a draft
silently"): a student in no group, a group project left without a set,
a late claim — the ticker publishes it (
autoPublishProject), and a student in no group meets409 no_groupon Accept until placed. Schedule itself (POST …/schedule, auditedproject.schedulewith the dates) refuses what Publish refuses —distribution_missing,no_group_set,unassigned_studentswith{ students },deadline_past— plus422 start_past(no date ahead),409 not_draft, and409 project_archivedor409 classroom_archived(its students could not load it, and the once-ever announcement of §7 would be spent for nothing), so the teacher is told at planning time. The ticker re-judges the start and the deadline under the row's lock, so a start moved later between its scan and its publication is never published early. project_scheduled: the classroom's claimed student seats are told it opens on its start, once per project EVER — the markerprojects.scheduled_announced_at, claimed by a conditional UPDATE and never cleared, as evaluations' (ADR-030 §13); a cancelled and renewed schedule or a moved date tells nobody again. Bell on, e-mail and Teams off by default (asproject_published); an unlinked GitHub account reads a sentence asking to link it. A GitHub kind (hidden without the App). The Teams package declares it:TEAMS_APP_VERSION2.5.0.- A closed group set stays hidden.
scheduleddoes not count in the student visibility rule of a set (studentVisibleSet, ADR-070 §8, N-SEC-20): no group on the card, no Groups tab, before the opening. - Publish always starts now.
POST …/publishpublishes a draft or a scheduled project with its start now, its absolute deadline kept or a duration counted from now (no more "published early keeps its dates"). Published rows with a start ahead are left as they are; no code assumespublished ⇒ start ≤ now(the card's Upcoming still readsstartAt). start_pastmoves to Schedule and to the patches of a scheduled project. A creation and a draft may hold a past date; its button then reads Publish (start now, deadline kept,deadline_pastif it passed). Back to manual still resets a draft's start to now.- The phase reads the state:
draft→draft,scheduled→scheduled. A draft holding a date is badged "draft". - The criteria reload at the effective publication, by hand (in the
request, as before) or by the ticker (a
project.criteriajob, since the ticker never calls GitHub). - The MCP:
create_projectstays manual-only (a draft); its 2026-10-13 rationale ("a scheduled one would be published by the ticker") is obsolete — a draft is never published by the ticker.list_projectsshows the new state.
Not the gradebook, the checkpoints (checkpointPass and its SQL twin), the
deadline reminders nor the invitations on a GitHub link: each reads
PROJECT_LIVE_STATES (projectIsLive, liveProject()), so a scheduled
project is none of their business before it opens.
Consequences¶
- One more state on every switch over
ProjectState; the web gets the scheduled face (status line, two secondary actions) and the rail's Published step done only frompublished. - A teacher can no longer publish by accident what they meant to plan, and the students learn of a planned project the moment it is planned.
- A scheduled group project may open with students in no group (§6): the staff sees them on its page and places them; their Accept waits.
- The Teams app is re-uploaded once (2.5.0).
Alternatives considered¶
- Keep
draft+ publish mode and only relabel the button: the ambiguity that caused the incident stays in the data — a draft armed by itself, a phase derived from a mode — and students learn nothing before the opening. - Keep the ticker's group guard (ADR-070 §12): a project announced to the class would silently fail to open at the announced time; the owner prefers it opens and the stragglers wait for their group.
- Notify "opens on …" at each date change: noise for a class told once already; evaluations' once-ever rule is kept.