diff --git a/team_evaluation_2/spec.md b/team_evaluation_2/spec.md new file mode 100644 index 00000000..4e58d139 --- /dev/null +++ b/team_evaluation_2/spec.md @@ -0,0 +1,728 @@ +Team evaluation app — specification (draft) +=========================================== + +Team: **Team evaluation 2** — Kamila, Alibek, Yuri. + +Status: draft for the Project 2 draft submission (due 2026-12-01). + +This document specifies a web application in which team members rate the +performance of their teammates. It covers project 8 of the class project list +and the example evaluation and report in +[team\_evaluation.md](https://github.com/bjones1/literate-programming-book/blob/main/project_notes/team_evaluation.md). It is deliberately +technology-neutral: it does not prescribe a programming language, framework, +database, or hosting platform. Where it says "the system stores", any +persistent storage that provides the stated guarantees is acceptable. + +### Section ownership + +Each section has one owner, who runs the LLM review rounds for that section +(the assignment asks each member to review only their own section). + +| Section | Owner | +| ---------------------------------------------------- | ------ | +| 1–3. Overview, roles, authentication and access | Alibek | +| 4. Organizer workflow (evaluations, questions, runs) | Kamila | +| 5. Roster CSV format | Kamila | +| 6. Student workflow and answer validation | Alibek | +| 7. Data model | Yuri | +| 8. Scoring and reports | Yuri | +| 9. Error handling | All | +| 10. Acceptance examples | All | +| 11. Non-functional requirements | All | + +### Conventions + +* Requirements are numbered (`AUTH-1`, `ORG-3`, …) so that reviews, tests and + the later implementation can refer to them. +* "Must" marks a requirement; "should" marks a recommendation; "may" marks an + option left to the implementer. +* Acceptance examples (section 10) are written as *Given / When / Then* and + reference the requirements they check. + +1. Overview +----------- + +### 1.1 Problem + +In team projects, the instructor cannot directly observe who did the work. +Teammates can. The app collects a short, structured peer evaluation from every +student and summarizes it so the instructor can spot teams with problems, such +as a member who does not respond or contributes much less than the others. + +### 1.2 Main workflow + +1. The **organizer** (instructor) signs in with Microsoft and creates an + **evaluation**: an ordered list of questions written in Markdown. +2. The organizer **starts a run** of that evaluation by uploading a CSV + **roster** that lists each student's user ID and team. The system returns + a **link** for students. +3. The organizer posts the link (for example in a Teams channel). +4. Each **student** opens the link, signs in with Microsoft, and answers the + questions about their own team: text answers and a distribution of 100 + points among their teammates. They may come back and change their answers + while the run is open. +5. The organizer views the **report**: per team, every member's text answers + and a rating grid with normalized ratings, averages and deltas. + +### 1.3 Glossary + +| Term | Meaning | +| -------------- | --------------------------------------------------------------------------------------------------------- | +| Organizer | A person allowed to create evaluations and see results (usually the instructor). | +| Student | A person listed in a run's roster. | +| Evaluation | A reusable, ordered list of questions. It holds no students and no answers. | +| Question | Markdown text plus a type: **text** or **rating**. | +| Run | One use of an evaluation with one roster. It has its own link, status, and responses. | +| Roster | The list of (user ID, team) pairs for a run, loaded from CSV. | +| Team | A group of students in a roster that share the same team name. | +| Teammate | For a given student, every other member of the same team. | +| Response | All answers of one student in one run. | +| Rating | A number of points a student allocates to one teammate in a rating question. | +| Evaluator | The student who gives a rating. | +| Evaluatee | The student who receives a rating. | + +### 1.4 Scope + +In scope: the two roles above, the two question types, roster upload, student +answering and re-answering, and the report. + +Out of scope for this specification: any other question types; grading or +grade export to an LMS; email or Teams notifications; showing results to +students; anonymous (not signed-in) answers; editing a roster by hand inside +the app; multiple languages in the user interface. + +2. Roles and permissions +------------------------ + +* `ROLE-1` There are two roles: **organizer** and **student**. A person's role + is determined per action, not per account: the same Microsoft account may be + an organizer and also appear in a roster. +* `ROLE-2` A person is an organizer if their user ID is on the **organizer + list**, which is part of the deployment configuration (not editable in the + app in this version). +* `ROLE-3` An organizer can see and change only the evaluations and runs they + created. (Sharing between organizers is out of scope.) +* `ROLE-4` A person is a student *of a run* if their user ID appears in that + run's roster. Being a student gives no access to any other run. + +Permissions combine when both roles apply. Student membership alone never +grants access to another student's answers; an account that also owns the run +can view those answers through its organizer permissions. + +| Action | Organizer (owner) | Student of the run | Anyone else | +| ---------------------------------------- | ----------------- | --------------------- | ----------- | +| Create / edit / delete evaluations | yes | no | no | +| Start / close / reopen / delete a run | yes | no | no | +| View the run's link and status | yes | no | no | +| Open the run's form | no (preview only) | yes, own team only | no | +| Submit / change own response | no | yes, while run open | no | +| View other students' answers | yes, own runs only | **never** | no | +| View the report | yes | **never** | no | + +3. Authentication and access control +------------------------------------ + +* `AUTH-1` Every page except the sign-in page requires a signed-in user. + Sign-in uses the Microsoft identity platform (the same accounts used for + Teams), through a standard protocol such as OpenID Connect. The app never + sees or stores the user's password. +* `AUTH-2` The deployment is configured with the allowed Microsoft tenant + (organization). Accounts from other tenants are refused with the message + "This app accepts only accounts from (organization)." +* `AUTH-3` The **user ID** of a signed-in person is their Microsoft sign-in + name (user principal name, usually `name@university.edu`). User IDs are + compared **case-insensitively** after trimming spaces. On first sign-in the + system also records the account's immutable Microsoft object ID and display + name. On later sign-ins, the normalized user ID and object ID must match + the same stored Person in the allowed tenant. If an existing user ID has a + different object ID, or a known object ID has a different user ID, the app + refuses access before exposing data or creating another Person. It shows + "Your Microsoft account could not be matched. Contact your instructor." + Missing identity claims also prevent sign-in. Account-name changes require + operator reconciliation of the stored identity, organizer list and rosters; + automatic identity migration is outside this version's scope. +* `AUTH-4` If a student opens a run link while not signed in, the app sends + them to Microsoft sign-in and then back to the same link. +* `AUTH-5` The run link contains a random, unguessable token (at least 128 + bits of randomness). The token only identifies the run; **it does not grant + access**. Access always also requires `ROLE-4`. +* `AUTH-6` Every request that reads or writes data is authorized on the server + side against the signed-in user, independently of what the user interface + shows. In particular, a student's submission is accepted only if every + teammate it rates is on the student's own team in that run (`ACC-2`). +* `ACC-1` A signed-in person who is not in the run's roster sees "You are not + on the list of participants for this evaluation. If you think this is wrong, + contact your instructor." No information about the run's teams or members is + shown. +* `ACC-2` A student sees only: the run's title, their own team's name, the + names of their teammates, the questions, and their own previous answers. +* `ACC-3` Organizer pages (evaluations, runs, reports) return "not found" to + anyone who is not the owning organizer, so the existence of another + organizer's data is not revealed. +* `AUTH-7` Users can sign out from every page. + +4. Organizer workflow +--------------------- + +### 4.1 Screens + +| Screen | Purpose | +| -------------------- | ------------------------------------------------------------------------ | +| O1 Sign-in | "Sign in with Microsoft" button. | +| O2 Dashboard | Lists the organizer's evaluations and runs; "New evaluation" button. | +| O3 Evaluation editor | Edit title, description and the ordered question list; preview. | +| O4 Question editor | Edit one question (inline in O3 or as a dialog). | +| O5 Start run | Name the run, upload the roster CSV, review it, confirm, get the link. | +| O6 Run page | Link, status, open/close, per-team submission progress. | +| O7 Report | Results of one run (section 8). | + +### 4.2 Evaluations + +* `ORG-1` **Create** an evaluation with a title (required, 1–200 characters) + and an optional Markdown description shown at the top of the student form. + The organizer can edit both fields. A title containing only whitespace is + invalid; leading and trailing whitespace is removed. A new evaluation has + no questions. +* `ORG-2` **Duplicate** an evaluation (copies title with suffix " (copy)", + description, and questions in their original order, but no runs or + responses). If the suffix would exceed the title limit, shorten the copied + title to fit. This supports reusing last semester's form. +* `ORG-3` **Delete** an evaluation. Allowed only if it has no runs; otherwise + the organizer is told to delete its runs first. Deletion requires a + confirmation. +* `ORG-4` The dashboard lists evaluations sorted by last modification, newest + first, with the number of questions and runs of each. Adding, editing, + deleting or reordering questions updates the evaluation's modification + time. + +### 4.3 Questions + +* `Q-1` A question has: + * **prompt** — Markdown text (required, at least one non-whitespace + character, up to 10 000 characters); + * **type** — `text` or `rating` (required); + * **required** — yes/no (default yes); + * for `rating` questions only: an optional **justification prompt** + (Markdown; whitespace-only text is treated as absent). When it is set, + the student form shows a text box below the ratings. For an answered + rating question, the justification is required if the ratings are unequal + (`VAL-6`). An optional rating question left unanswered does not require a + justification (`VAL-3`). +* `Q-2` The organizer can **add** a question (at the end, or after a chosen + question), **edit** any field, **delete** a question (with confirmation), + and **reorder** questions (move up / move down; drag-and-drop may also be + offered). The order is saved immediately. Changing a question to `text` + removes its justification prompt. +* `Q-3` The editor shows a live **preview** of the rendered Markdown, and a + "Preview form" action that shows the form as a student of an example + 4-person team would see it. +* `Q-4` Markdown is rendered with GitHub-Flavored Markdown features (headings, + lists, emphasis, links, tables, code). This applies to descriptions, + question prompts and justification prompts in all views. Raw HTML is + removed or shown as text; unsafe link and image URLs (such as `javascript:`) + are blocked. Scripts must not execute. Links open in a new tab without + access to the originating window. +* `Q-5` An evaluation with zero questions cannot be started (`RUN-1`). +* `Q-6` Several rating questions may appear in one evaluation (for example one + for the design document and one for the whole project). Each is reported + separately. + +### 4.4 Runs + +* `RUN-1` **Start a run**: the organizer selects an evaluation, enters a run + name (required, non-blank; default: evaluation title plus the date), + optionally a closing date and time, and uploads a roster CSV (section 5). + The evaluation must contain at least one valid question (`Q-5`), and a + closing time, if supplied, must be in the future when the run is created. + The server checks these requirements and the evaluation and question input + rules in sections 4.2–4.3. +* `RUN-2` The system validates the CSV. If there are errors, it shows all + detectable errors, with line numbers where applicable, and creates nothing. + If it is valid, it shows a summary — number of students, number of teams, and each team with its + members — and any warnings, and asks the organizer to confirm. +* `RUN-3` On confirmation the system creates the run atomically with the + validated roster, **copies the evaluation's description and all question + fields and their order into the run** (a snapshot), and shows the student + link with a "Copy link" button (`AUTH-5`). The server rechecks the start + conditions before creating the run; if the evaluation or roster has changed + since review, the organizer must review and confirm again. Later edits to + the evaluation do not change existing runs. +* `RUN-4` A run's status is **open** or **closed**. A new run is open. + Students can submit or change responses only while it is open. The organizer + can close an open run or reopen a closed run at any time. If a closing date + is set, the run counts as closed from that moment, even if a scheduled + status update has not yet run (`VAL-8`, section 7). A manual close keeps + its own closing time. The deadline is checked when saving a response. + The closing time is stored as an absolute time and displayed in the viewer's + time zone (`NFR-4`). Reopening a run clears its closing date. +* `RUN-5` The run page shows, per team, which members have submitted + (with the time of the last change) and which have not, plus totals. +* `RUN-6` The roster of a run can be **replaced** with a new CSV only while + the run has no responses. The replacement follows the same validation, + preview and confirmation rules as the initial upload (`RUN-2`); a failed + replacement leaves the old roster unchanged. The server checks that no + response exists as part of the atomic replacement, so a concurrent first + submission cannot bypass the roster lock. A successful replacement updates + the roster upload metadata but keeps the run's link, questions and status. + After the first response, the roster is locked; to change teams, the + organizer deletes the run and starts a new one. +* `RUN-7` **Delete a run**: removes the run, its question snapshot, roster, + responses and answers atomically (`DATA-3`), after a confirmation that + states how many responses will be lost. Its student link becomes invalid. + +5. Roster CSV format +-------------------- + +* `CSV-1` Encoding: UTF-8, with or without a byte-order mark. Delimiter: + comma. Quoting: standard CSV double-quote rules (a field containing a comma, + quote or line break is enclosed in double quotes; a quote inside is + doubled). Line endings: LF or CRLF. Maximum file size: 1 MB. +* `CSV-2` The first row is a header. Column names are matched + case-insensitively after trimming spaces. Required columns: `userid` and + `team`. Optional column: `name` (display name). Each recognized column may + occur only once after normalization; duplicates are errors. Other columns + are ignored with a warning, so a file exported by the team-forming project + can be used unchanged if it satisfies these CSV rules. +* `CSV-3` Each following CSV record describes one student. Leading and + trailing spaces in values are removed. Blank lines are ignored; all other + records must have the same number of fields as the header, including ignored + columns. Records of the correct width with all fields empty after trimming + are ignored. A file must contain at least one student. For a record spanning + several physical lines, errors refer to its starting line; file-level errors + need no line number. +* `CSV-4` `userid` must be non-empty and look like a sign-in name + (`something@domain`): exactly one `@`, non-empty parts on both sides and no + whitespace. This is a syntax check, not a check that the Microsoft account + exists. `team` must be non-empty, up to 100 characters. + Team names are compared exactly after trimming (so `Team 1` and `team 1` + are different teams — the system shows a warning if two team names differ + only in letter case). +* `CSV-5` A `userid` may appear only once in the file (case-insensitively). + A student belongs to exactly one team per run. +* `CSV-6` Every team must have at least **2** members (a single member has + nobody to rate). Teams larger than 10 produce a warning, not an error. +* `CSV-7` A non-empty `name` takes precedence as the display name for this + run. If `name` is missing or empty, use the Microsoft display name recorded + at the student's first sign-in, or the user ID if no such name is available. + +Example: + +```csv +userid,team,name +kamila@kbtu.kz,Team evaluation 2,Kamila +alibek@kbtu.kz,Team evaluation 2,Alibek +yuri@kbtu.kz,Team evaluation 2,Yuri +a.student@kbtu.kz,YAML support,A. Student +b.student@kbtu.kz,YAML support,B. Student +``` + +Section 9.2 lists common validation errors and warnings. Invalid file formats, +headers, records and team sizes are errors unless explicitly described as +warnings above. Additional messages must identify the problem (`ERR-1`). + +6. Student workflow and answer validation +----------------------------------------- + +### 6.1 Screens + +| Screen | Purpose | +| --------------- | ------------------------------------------------------------------- | +| S1 Sign-in | Reached from the run link when not signed in (`AUTH-4`). | +| S2 Form | The questions for the student's own team. | +| S3 Confirmation | "Your answers were saved at (time). You can change them until (close time / the instructor closes the evaluation)." | +| S4 Message page | Not on roster, run closed, link invalid (section 9). | + +### 6.2 Form + +* `STU-1` The top of the form shows the run name, the evaluation + description, "Team: (team name)", and the student's own name. +* `STU-2` Questions appear in the run's order. A `text` question shows its + rendered prompt and a multi-line text box (up to 5 000 characters). +* `STU-3` A `rating` question shows its rendered prompt and one numeric box + for **each teammate except the student**, labelled with the teammate's + display name, sorted by display name. Below the boxes the form shows the + **running sum** of the entered values. It shows the warning "The total + should be 100 (currently (sum))." only when the sum is outside the + `VAL-5` tolerance. An entirely unanswered optional rating question shows no + sum warning. +* `STU-4` If the rating question has a justification prompt, the form shows + it and a text box after the ratings, with the note "Required if your points + are not distributed equally." +* `STU-5` If the student has submitted before, the form opens with their + latest saved answers filled in and shows "Last saved at (time)." Otherwise + it is empty. +* `STU-6` A single **Submit** button saves the whole response. The response is + saved **all or nothing**: if any validation error exists, nothing is saved, + the errors are shown next to the affected questions, and everything the + student typed is kept in the form. +* `STU-7` Resubmitting replaces the student's previous response completely. + The system keeps the time of the first submission and of the last change. + Only the latest version of the answers is stored. +* `STU-8` If the run is closed, the form is shown read-only with the + student's saved answers (if any) and the message "This evaluation is + closed." +* `STU-9` A student's response is visible only to that student and to the + run's organizer. Student permissions never reveal what others answered; + an account that also owns the run can view its report as organizer + (`ROLE-1`). + +### 6.3 Validation rules + +Validation happens on the server for every submission. The form should also +check the same rules while typing, but that check is only a convenience. + +* `VAL-1` A required `text` question must contain at least one non-space + character. Text longer than 5 000 characters is rejected. +* `VAL-2` Each rating value must be a number from 0 to 100 inclusive, with at + most 2 decimal places. Both `.` and `,` are accepted as the decimal + separator. Negative numbers, text, and values above 100 are rejected. +* `VAL-3` For a required rating question, every teammate box must be filled. + For an optional rating question, either all boxes are filled or all are + empty; a partly filled question is rejected. +* `VAL-4` The sum of a filled rating question must be greater than 0 + (otherwise the ratings cannot be normalized; see section 8). +* `VAL-5` **Sum check.** A sum within 100 ± 0.5 counts as 100 (this allows + `33.3 + 33.3 + 33.3`). Any other sum is a **warning, not an error**: when + the student clicks Submit, the form asks "Your points add up to (sum), not + 100. They will be scaled to 100. Submit anyway?" with *Submit anyway* and + *Go back* choices. The original values are stored; scaling happens in the + report (`REP-3`). +* `VAL-6` **Unequal ratings.** For an answered rating question, compare the + full-precision normalized percentages defined by `REP-3`. Ratings are + *equal* if the largest and smallest differ by at most 1 percentage point. + If the question has a justification prompt and the ratings are unequal, + the justification must contain at least one non-whitespace character. + For example, raw values `0, 0, 1` normalize to `0 %, 0 %, 100 %` and need + an explanation; `33, 33, 34` do not. An unanswered optional rating question + requires no justification (`VAL-3`). +* `VAL-7` Apply the following rule separately to each answered rating + question: its answer must contain exactly one rating for each current + teammate of the student, identified by teammate, and no other ratings. + Duplicate ratings for one teammate, self-ratings, and ratings for unknown + or out-of-team people cause the whole submission to be rejected. An + optional rating question may be unanswered as allowed by `VAL-3`. Text + answers and other questions' answers are checked independently against + their own rules (this protects against altered requests; `AUTH-6`). +* `VAL-8` A submission to a closed run, or to a run the student is not in, is + rejected and nothing is saved. +* `VAL-9` If the student's session has expired when they click Submit, the + app asks them to sign in again and should keep the typed answers so that + they are not lost. + +7. Data model +------------- + +The model is described as entities and fields; it does not imply a particular +kind of database. Every entity has a unique identifier (`id`) and creation / +modification timestamps, which are omitted below. + +``` +Person 1 ──< Evaluation 1 ──< Question + │ + └──< Run 1 ──< RunQuestion + │ + └──< RosterEntry 1 ──0..1 Response 1 ──< Answer +``` + +| Entity | Fields | Notes | +| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----- | +| **Person** | `user_id` (unique, stored lower-case), `microsoft_object_id`, `display_name` | Created on first sign-in. Organizer status comes from configuration (`ROLE-2`), not from this table. | +| **Evaluation** | `owner` → Person, `title`, `description` (Markdown) | Reusable template. | +| **Question** | `evaluation` → Evaluation, `position` (integer, unique within evaluation), `type` (`text` \| `rating`), `prompt` (Markdown), `required` (bool), `justification_prompt` (Markdown, only for `rating`, optional) | Reordering rewrites `position` values. | +| **Run** | `evaluation` → Evaluation, `owner` → Person, `name`, `token` (unique, random), `description` (copied from the evaluation, `RUN-3`), `status` (`open` \| `closed`), `closes_at` (optional), `closed_at` (time of the last closing), `roster_file_name`, `roster_uploaded_at` | One use of an evaluation. `owner` always equals the owner of `evaluation`. `status` decides whether the run is open. An open run counts as closed from exactly its `closes_at`, even if `status` is written later, and its `closed_at` is then `closes_at`. The automatic close does not apply to a run that is already closed, so a manual close keeps its own `closed_at`. Reopening clears `closes_at`. | +| **RunQuestion** | `run` → Run, `position`, `type`, `prompt`, `required`, `justification_prompt` | Snapshot copied from Question when the run starts (`RUN-3`). Answers refer to these, never to Question. | +| **RosterEntry** | `run` → Run, `user_id` (stored lower-case), `team` (text), `name` (optional) | Unique on (`run`, `user_id`). A team is the set of entries with the same `run` and `team`. | +| **Response** | `run` → Run, `evaluator` → RosterEntry, `first_submitted_at`, `last_submitted_at` | At most one per roster entry. | +| **Answer** | `response` → Response, `question` → RunQuestion, and one of: `text` (for `text`); a list of (`evaluatee` → RosterEntry, `points` decimal) plus `justification` text (for `rating`) | The raw values typed by the student are stored, not normalized ones. | + +Integrity rules: + +* `DATA-1` A rating's evaluatee must be on the same team as the evaluator in + the same run, and must not be the evaluator. A Response, its evaluator and + its Answers' questions belong to the same run; a Response has at most one + Answer per question, matching the question's type; a rating Answer rates + each evaluatee at most once. +* `DATA-2` Saving a response (all its answers) is a single atomic operation: + either all answers are replaced or none are. If two submissions from the + same student arrive at the same time, one complete response wins (the later + one); answers are never mixed. +* `DATA-3` Deleting a run deletes its run questions, roster entries, + responses and answers. Deleting a Question never affects runs. +* `DATA-4` Run data (roster names, user IDs, answers) is kept until the + organizer deletes the run. Person records are not tied to runs and are not + deleted by the app in this version. + +8. Scoring and reports +---------------------- + +### 8.1 Report layout + +* `REP-1` The report belongs to one run and is available to its organizer at + any time, including while the run is open (it then shows partial data and + the note "This evaluation is still open"). +* `REP-2` The report starts with a summary: number of students, number who + submitted, and a **table of contents** with a link to each team's section. + Teams are sorted by name; members within a team are sorted by display name, + then by user ID. +* For each team, the report has: + * the team name and the list of members, marking who has not submitted; + * for each `text` question, in run order: the question prompt, followed by + a table with one row per member — *member name | answer*; + * for each `rating` question: the question prompt, the **rating grid** + (8.2), and, if the question has a justification prompt, a table with one + row per member — *evaluator | justification*. +* Answers and justifications are shown as plain text with line breaks kept + (never as Markdown or HTML); empty ones show "No data". +* At the end, a **summary table across all teams** lists, for every student: + name, user ID, team, and for each rating question the average and the delta. + It can be sorted by any column, so the organizer can find the lowest deltas + quickly; "No data" sorts after all numbers. +* The summary table may be downloadable as CSV. + +### 8.2 Rating grid and formulas + +The grid matches the original implementation (BookServer `team.py`): + +* **rows are evaluatees** (who is rated), **columns are evaluators** (who + gave the rating); the top-left header reads "Evaluator → / ↓ Evaluatee"; +* rows and columns list the team's members in the `REP-2` order; +* after the evaluator columns there are two more columns: **Average** and + **Delta**; +* a cell is the evaluator's **normalized** rating of the evaluatee; the + diagonal (a student rating themselves) is blank; a cell is "No data" if the + evaluator did not answer that question; +* all numbers are shown with one decimal place and a `%` sign. + +Let a team have *N* members (from the roster), and let *r(e, t)* be the raw +points evaluator *e* gave to teammate *t*. + +* `REP-3` **Normalization.** Each evaluator's ratings are scaled so that they + sum to 100: + + normalized(e, t) = r(e, t) / Σₖ r(e, k) × 100, + + where the sum runs over all teammates *k* that *e* rated. (Because of + `VAL-4`, the sum is never 0.) +* `REP-4` **Average.** For each evaluatee *t*, the average is the mean of the + normalized ratings *t* received, taken only over evaluators who answered: + + average(t) = (1 / |E(t)|) × Σ_{e ∈ E(t)} normalized(e, t), + + where *E(t)* is the set of teammates of *t* who answered the question. If + *E(t)* is empty, the average is "No data". +* `REP-5` **Delta.** The delta is how far the average is from an equal share, + as a percentage of that share. The equal share is expected = 100 / (N − 1): + + delta(t) = (average(t) − expected) / expected × 100. + + A delta of 0 % means an exactly equal share; −50 % means the student + received half of an equal share. If the average is "No data", the delta is + "No data". +* `REP-6` Calculations use full precision; rounding to one decimal (half away + from zero) happens only for display, and −0.0 is shown as 0.0 %. + +Note on the example document: the formula for `normalized_rating` printed in +[team\_evaluation.md](https://github.com/bjones1/literate-programming-book/blob/main/project_notes/team_evaluation.md) is written as an average +(1/n Σ rating). This specification follows the original implementation and the +text "normalize their ratings to ensure they sum to 1" (here expressed as +100 %). It uses the example's delta formula with *n* read as the team size +(expected = 1/(n − 1), i.e. 100/(N − 1) in percent), and puts evaluatees in +rows as `team.py` does, although the example text calls rows evaluators. + +### 8.3 Worked example + +Team of 4 (A, B, C, D), so expected = 100 / 3 ≈ 33.3 %. + +Raw ratings: + +| Evaluator | → A | → B | → C | → D | Sum | +| --------- | --- | --- | --- | --- | -------------- | +| A | | 40 | 40 | 20 | 100 | +| B | 50 | | 30 | 30 | 110 (warning) | +| C | 30 | 30 | | 40 | 100 | +| D | — | — | — | | did not submit | + +B's ratings are normalized: 50/110 × 100 = 45.5, 30/110 × 100 = 27.3. + +Report grid: + +| Evaluator → / ↓ Evaluatee | A | B | C | D | Average | Delta | +| ------------------------- | ----- | ----- | ----- | ------- | ------- | ------- | +| A | | 45.5% | 30.0% | No data | 37.7% | 13.2% | +| B | 40.0% | | 30.0% | No data | 35.0% | 5.0% | +| C | 40.0% | 27.3% | | No data | 33.6% | 0.9% | +| D | 20.0% | 27.3% | 40.0% | | 29.1% | −12.7% | + +For A: average = (45.45 + 30) / 2 = 37.73; delta = (37.73 − 33.33) / 33.33 × +100 = 13.2 %. + +9. Error handling +----------------- + +General rules: + +* `ERR-1` Every error message says what went wrong and what the user can do, + in plain language, without technical details (no stack traces or internal + identifiers). +* `ERR-2` A failed operation changes nothing (no partial saves, no half-created + runs). +* `ERR-3` Unexpected server errors show "Something went wrong. Your answers + were not saved. Please try again." and are logged with enough detail for + the operator to investigate. + +### 9.1 Student-facing errors + +| Condition | Message / behavior | +| ------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| Link token unknown or run deleted | "This evaluation link is not valid. Check the link or contact your instructor." | +| Signed in, but not in the roster | `ACC-1` message. No run details shown. | +| Account from another tenant | `AUTH-2` message. | +| Run closed | Read-only form, "This evaluation is closed." (`STU-8`). Submissions rejected (`VAL-8`). | +| Run closes while the student is typing | On Submit: "This evaluation closed at (time). Your changes were not saved." The typed text stays on screen so the student can copy it. | +| Validation errors | Inline messages next to each question (`STU-6`), e.g. "Enter a number from 0 to 100.", "Give points to every teammate.", "The total must be more than 0.", "Explain why your points are not equal.", "This answer is required." | +| Sum ≠ 100 | Confirmation dialog (`VAL-5`); not an error. | +| Session expired | Sign in again; typed answers kept if possible (`VAL-9`). | +| Submission rates a non-teammate / self | Whole submission rejected: "Your answers could not be saved because the team list has changed. Reload the page." (`VAL-7`). | + +### 9.2 Roster CSV errors and warnings + +All problems are collected and shown together, each with its line number +(the header is line 1). Any **error** prevents the run from being created; +**warnings** are shown but the organizer may still confirm. + +| Kind | Condition | Message | +| ------- | -------------------------------------------------- | --------------------------------------------------------------------- | +| Error | File empty or only a header | "The file contains no students." | +| Error | Not valid UTF-8 / not readable as CSV | "The file could not be read as a UTF-8 CSV file. Save it as 'CSV UTF-8' and try again." | +| Error | File larger than 1 MB | "The file is too large (maximum 1 MB)." | +| Error | Missing `userid` or `team` column | "Missing required column: team. Found columns: userid, name." | +| Error | Wrong number of fields in a row / broken quotes | "Line 7: expected 3 values, found 2." | +| Error | Empty `userid` or `team` | "Line 4: team is empty." | +| Error | `userid` not in `name@domain` form | "Line 5: 'alibek' is not a valid user ID (expected name@domain)." | +| Error | Duplicate `userid` | "Line 9: alibek@kbtu.kz already appears on line 3." | +| Error | Team with only one member | "Team 'Solo' has only 1 member; every team needs at least 2." | +| Warning | Team names differing only in letter case | "'Team 1' and 'team 1' are treated as different teams." | +| Warning | Team with more than 10 members | "Team 'Big' has 12 members." | +| Warning | Extra columns | "Ignored columns: email, section." | + +### 9.3 Organizer-facing errors + +| Condition | Message / behavior | +| ------------------------------------------------- | -------------------------------------------------------------------------------- | +| Not on the organizer list | "You do not have permission to create evaluations." | +| Evaluation/run of another organizer | "Not found" (`ACC-3`). | +| Start a run of an evaluation with no questions | "Add at least one question before starting this evaluation." | +| Delete an evaluation that has runs | "This evaluation has (k) runs. Delete them first." | +| Replace the roster after responses exist | "The roster cannot be changed because students have already answered." (`RUN-6`) | +| Empty title / empty question prompt | Inline "This field is required." | + +10. Acceptance examples +----------------------- + +Unless stated otherwise: run *R* is open; team *T* = {A, B, C, D}; the +evaluation has a required text question Q1 and a required rating question Q2 +with a justification prompt. + +### 10.1 Sum of points + +* **TC-1 Exact 100** (`VAL-5`). *Given* A enters B = 33.3, C = 33.3, + D = 33.4, *when* A submits, *then* no warning is shown and the response is + saved. +* **TC-2 Sum within tolerance** (`VAL-5`). *Given* A enters 33.3 for each of + B, C, D (sum 99.9), *then* no warning is shown. +* **TC-3 Sum not 100** (`VAL-5`, `REP-3`). *Given* B enters A = 50, C = 30, + D = 30 (sum 110) and a justification, *when* B clicks Submit, *then* the confirmation dialog + appears; *when* B chooses *Submit anyway*, *then* the raw values are saved + and the report shows 45.5 %, 27.3 %, 27.3 %. +* **TC-4 Zero sum** (`VAL-4`). *Given* A enters 0 for every teammate, *then* + the submission is rejected with "The total must be more than 0." +* **TC-5 Out-of-range values** (`VAL-2`). Values `-5`, `150`, `abc` and + `10.555` are each rejected; `12,5` is accepted as 12.5. +* **TC-6 Missing value** (`VAL-3`). *Given* A leaves D's box empty, *then* the + submission is rejected with "Give points to every teammate." +* **TC-7 Unequal without explanation** (`VAL-6`). *Given* A enters B = 50, + C = 30, D = 20 and leaves the justification empty, *then* the submission is + rejected with "Explain why your points are not equal." With B = 33, + C = 33, D = 34 (difference 1), the justification is not required. + +### 10.2 Resubmission + +* **TC-8 Change answers** (`STU-5`, `STU-7`). *Given* A submitted at 10:00, + *when* A opens the link at 11:00, *then* the form shows A's saved answers and + "Last saved at 10:00"; *when* A changes D from 20 to 30 and submits, *then* + the report shows only the new values and the run page shows the last change + at 11:00 with the first submission still 10:00. +* **TC-9 Failed resubmission keeps old answers** (`STU-6`, `ERR-2`). *Given* + A has a saved response, *when* A submits a new version with an invalid value, + *then* the error is shown and the previously saved response is unchanged. +* **TC-10 Closed run** (`RUN-4`, `STU-8`, `VAL-8`). *Given* the organizer + closed *R*, *when* A opens the link, *then* A sees the read-only form; a + direct submission request is rejected and nothing changes. *When* the + organizer reopens *R*, A can submit again. + +### 10.3 Roster CSV + +* **TC-11 Valid file** (`CSV-1`–`CSV-6`, `RUN-2`). The example file in + section 5 is accepted; the summary shows 5 students in 2 teams. +* **TC-12 Missing column** (`CSV-2`). A file with header `userid,group` + is rejected with "Missing required column: team. Found columns: userid, + group." No run is created. +* **TC-13 Duplicate user** (`CSV-5`). A file listing `Alibek@kbtu.kz` on line + 3 and `alibek@kbtu.kz` on line 9 is rejected with the line-9 message. +* **TC-14 Several errors at once** (`RUN-2`). A file with an empty team on + line 4 and a one-member team is rejected and both errors are listed. +* **TC-15 Header and spacing** (`CSV-2`, `CSV-3`). A file with header + ` UserID , Team ,Email` and values with surrounding spaces is accepted; the + `Email` column produces the "Ignored columns" warning. + +### 10.4 Access to own team only + +* **TC-16 Own team only** (`ACC-2`, `STU-3`). *When* A opens the form, *then* + Q2 shows boxes for exactly B, C and D — not A, and nobody from other teams. +* **TC-17 Not on roster** (`ACC-1`). *Given* E is signed in but not in *R*'s + roster, *when* E opens the link, *then* E sees the "not on the list" message + and no team or member names. +* **TC-18 Altered request** (`AUTH-6`, `VAL-7`). *Given* A sends a submission + that includes a rating for a student of another team (or for A), *then* the + whole submission is rejected and nothing is saved. +* **TC-19 No access to others' data** (`STU-9`, `ACC-3`). *When* student A + tries to open the report page or the run page of *R* directly, *then* the + result is "Not found". A can never retrieve B's answers. +* **TC-20 Organizer isolation** (`ROLE-3`, `ACC-3`). Organizer P cannot see, + edit, or view reports of organizer Q's evaluations or runs. +* **TC-21 Link without sign-in** (`AUTH-4`, `AUTH-5`). Opening the link in a + private browser window leads to Microsoft sign-in and then back to the form; + the token alone never shows any data. + +### 10.5 Questions and reports + +* **TC-22 Reorder** (`Q-2`). *Given* questions Q1, Q2, Q3, *when* the + organizer moves Q3 up twice, *then* the order is Q3, Q1, Q2 after reloading + the page, and in the preview. +* **TC-23 Snapshot** (`RUN-3`). *Given* run *R* was started, *when* the + organizer edits Q1's prompt in the evaluation, *then* students of *R* still + see the old prompt, and a new run shows the new prompt. +* **TC-24 Unsafe Markdown** (`Q-4`). A prompt containing + `` is shown as text or removed; no script runs in + the organizer's or a student's browser. +* **TC-25 Report numbers** (`REP-3`–`REP-6`). With the data of section 8.3, + the report grid shows exactly the values in the grid there, D's column + shows "No data", and D is marked as not submitted. +* **TC-26 Nobody rated a student** (`REP-4`, `REP-5`). If none of t's + teammates answered Q2, t's average and delta are "No data". + +11. Non-functional requirements +------------------------------- + +* `NFR-1` **Privacy.** All traffic is encrypted (HTTPS). Answers are visible + only as described in section 2. Logs do not contain answer text. +* `NFR-2` **Usability.** The student form works on phones and desktop + browsers, and can be completed with the keyboard alone. Form fields have + labels that screen readers can read. +* `NFR-3` **Scale.** One run supports at least 500 students and 150 teams; the + report for such a run is produced in a few seconds. +* `NFR-4` **Time.** Times are stored as absolute times and shown in the + viewer's local time zone with the zone name. +* `NFR-5` **Portability.** No requirement depends on a specific language, + framework or database; the only external dependency is the Microsoft + identity platform for sign-in. \ No newline at end of file diff --git a/team_evaluation_2/submission.md b/team_evaluation_2/submission.md new file mode 100644 index 00000000..efa23cbc --- /dev/null +++ b/team_evaluation_2/submission.md @@ -0,0 +1,386 @@ +Project 2 submission +==================== + +Team name: Team evaluation 2 + +The specification consists of the file [spec.md](spec.md). + +Draft submission +---------------- + +### Yuri + +GitHub userid: kim0111 + +#### Contributions + +Wrote the initial draft of the whole specification in [spec.md](spec.md) and +own sections 7 (Data model) and 8 (Scoring and reports). + +#### Build and run test + +LLM: Claude Opus 5.5 (`claude-opus-5-5`), in Claude Code, run in a fresh +clone of the team's fork on Windows. + +Prompt: "Verify that you can build and run the project in the current git +repo." + +Result: the build and run worked. The LLM found Rust and Node already +installed and ran `./bt install`, which installed pnpm and the JavaScript and +Rust dependencies. Its last step (installing cargo-binstall) failed because +PowerShell 7 (`pwsh`) is not installed, but nothing the build needs depends on +that step. After installing cargo-nextest by hand, `./bt build` exited with +code 0: the Rust code compiled with no errors, the 13 `export_bindings` tests +passed, and the client and VS Code extension bundled with no TypeScript +errors. It then started the standalone server +(`codechat-editor-standalone --port 18080 serve`) and checked it with `curl`: +`/ping` returned `pong`, the file browser and the editor page for `README.md` +loaded, the JavaScript bundle and MathJax were served, and `/stop` shut the +server down cleanly with no errors in its log. Not done: linting +(`./bt flint`) needs tools from the failed `pwsh` step, and the full test +suite (`./bt test`) was not run. The team-evaluation app itself has no +implementation yet; it is part of the final submission. + +#### Specification review rounds + +| Round | Findings | Main changes made | +| ----- | -------- | ----------------- | +| 1 | 12 (2 major, 10 minor) | Required plain-text display of answers in the report, made `status` the only open/closed switch with a recorded `closed_at`, added missing integrity, rounding and sorting rules, and clarified the note on `team_evaluation.md`. | +| 2 | 5 (0 major, 5 minor) | Defined exactly when the automatic close takes effect and that it does not override a manual close, tied a run's owner to its evaluation's owner, and fixed the member order (with a tie-break) in report tables and the rating grid. | + +#### Last specification review + +LLM: Claude Opus 5.5 (`claude-opus-5-5`), in Claude Code + +Prompt: + +``` +Review sections 7 "Data model" and 8 "Scoring and reports" in spec.md, writing findings to review.md. + +Review only those sections. Read the rest of spec.md only to check that they are consistent with it. Look for: +- ambiguities: places where two reasonable implementers could build different things; +- contradictions with other sections, the requirement IDs, or the acceptance examples in section 10; +- missing cases an implementer would need decided (edge cases, empty or invalid data); +- errors in the formulas or the worked example (recompute the numbers). + +Rules: +- The spec must stay technology-neutral: do not suggest languages, frameworks, databases or hosting. +- Do not suggest new features or anything beyond the scope of these sections. +- Do not edit spec.md and do not rewrite the sections. + +In review.md, number the findings. For each one give: the requirement ID or subsection, a severity (major or minor), the problem in one or two sentences, and a short suggested fix. End with the total number of findings. If there are no real problems, say so; do not invent findings to fill the list. +``` + +Output (review.md; headings shown in bold here so that they do not break the +structure of this file): + +**Review of spec.md sections 7 "Data model" and 8 "Scoring and reports"** + +Scope: sections 7 and 8 only. The rest of spec.md was read only to check +consistency. + +What was checked and is correct: + +* All numbers in the 8.3 worked example were recomputed at full precision. + The normalized cells (45.5, 27.3), averages (37.73, 35.00, 33.64, 29.09 → + 37.7, 35.0, 33.6, 29.1) and deltas (13.18, 5.00, 0.91, −12.73 → 13.2, 5.0, + 0.9, −12.7) are all correct. "No data" sits in D's column and the diagonal + is blank. TC-3, TC-25 and TC-26 agree with section 8. +* `REP-3`–`REP-5` are consistent with each other and with `VAL-4` (sum never + 0) and `CSV-6` (N ≥ 2, so 100 / (N − 1) is always defined; with N = 2 every + normalized rating is 100 % and the delta is 0 %). +* The round-1 fixes are consistent with the rest of the spec: plain-text + answers, `status` as the only open/closed switch, `closed_at` (used by the + 9.1 message), the description snapshot, lower-case `user_id` in + RosterEntry, the extended `DATA-1`, `DATA-4`, `REP-6`, the justification + table, "No data" sorting, and the note on team\_evaluation.md. + +**Findings** + +1. **Run entity: automatic closing (`RUN-4`)**, minor. + The Notes say "only `status` decides" and "reaching `closes_at` sets it to + closed", but not when that change takes effect. If an implementation + updates `status` some time after `closes_at` (for example on a periodic + check), a submission received after the deadline is accepted, while + `RUN-4` says the run closes "at that moment". + *Fix:* State that a run whose `closes_at` has passed is treated as closed + from exactly that time, even if `status` has not yet been updated. + +2. **Run entity: `closes_at` after a manual close**, minor. + Only reopening clears `closes_at`. If the organizer closes a run by hand + before its `closes_at`, the later automatic close may or may not overwrite + `closed_at`, so the 9.1 message "This evaluation closed at (time)" can + show either time. The "reopening clears `closes_at`" rule also appears + only in this table, not in `RUN-4`, so an organizer following section 4 + would not expect the closing date to disappear. + *Fix:* Say that the automatic close applies only to an open run (or that a + manual close also clears `closes_at`), and mention the clearing rule in + `RUN-4`. + +3. **Run entity: `owner`**, minor. + Run has its own `owner` → Person, and so does its Evaluation, but no rule + says they must be the same. Ownership checks (`ROLE-3`, `ACC-3`) could + then use either field, and the two could give different answers. + *Fix:* State that `Run.owner` is always the owner of `Run.evaluation` + (or remove the field and derive it). + +4. **8.2 grid order (`REP-2`)**, minor. + `REP-2` sorts members "within a team" by display name, but section 8.2 does + not say that the grid's rows and columns use this order, and no tie-break + is given for two members with the same display name. Two implementations + could then put the grid rows in a different order. + *Fix:* State that grid rows and columns (and every per-member table) use + the `REP-2` order, with ties broken by user ID. + +5. ~~**`REP-6` "full precision"**, minor. + "Full precision" does not say that the arithmetic must be exact, and ties + on the half are common because raw points have two decimals. For example, + 7.25 points out of a sum of 100 is exactly 7.25 → 7.3 %, but computed in + binary floating point it becomes 7.2499… → 7.2 %. Two correct-looking + implementations would then show different values. + *Fix:* State that the displayed value must equal the exact decimal result + rounded half away from zero (e.g. 7.25 of 100 shows 7.3 %).~~ + + *(Not fixed: judged irrelevant. A 0.1 % difference in a displayed value + does not change what the report shows about a team, and requiring exact + arithmetic would over-specify the implementation.)* + +Total: 5 findings (0 major, 5 minor). + +### Alibek + +GitHub userid: alibekbtu + +#### Contributions + +Reviewed and refined sections 1–3 and 6 of [spec.md](spec.md), clarifying +combined organizer/student permissions, Microsoft identity binding, +per-question rating validation, normalized-rating equality and consistent +sum warnings, and recorded two review rounds and an attempted build/run +verification. + +#### Build and run test + +LLM: OpenAI Codex (the exact underlying model identifier and version are not +exposed by this session). + +Prompt: "Verify that you can build and run the project in the current git +repo." + +Result: the repository contains the CodeChat application, but the separate +team-evaluation app currently has no implementation. Both the standalone +build and startup were attempted and exited with code 127 because `cargo` +is unavailable. Node.js v22.22.2 is available; the Rust toolchain is not. +The application did not start, so no runtime or browser checks were run. +The commands were attempted from the repository root: + +```text +$ cargo build --locked -p codechat-editor-standalone +zsh:1: command not found: cargo +Exit code: 127 + +$ cargo run --locked -p codechat-editor-standalone -- --port 8097 serve +zsh:1: command not found: cargo +Exit code: 127 + +$ node --version +v22.22.2 +Exit code: 0 +``` + +#### Specification review rounds + +| Round | Findings | Main changes made | +| ----- | -------- | ----------------- | +| 1 | 5 (5 P2) | Fixed organizer access and combined roles, bound sign-in names to immutable Microsoft identities, applied rating validation per answered question, compared normalized percentages for justification, and aligned live sum warnings with the accepted tolerance. | +| 2 | 0 | Rechecked the five fixes against the other sections and acceptance examples; no additional relevant correctness findings remained. | + +#### Last specification review + +LLM: OpenAI Codex (the exact underlying model identifier and version are not +exposed by this session); both rounds used the same session's model. + +Prompt (exact text): + +```text +Review sections 1–3 and 6 of team_evaluation_2/spec.md in /Users/alibekbaisholanov/code/Software Par/CodeChat_Editor-team-evaluation-2. + +These are Alibek's owned sections. Read the remaining sections only to check consistency. Do not edit the specification. Look for substantive ambiguities, contradictions with requirements or acceptance examples, missing validation cases, and defects in authorization or identity binding. Check the fixes for normalized-rating equality (including raw 0,0,1), per-question rating validation with optional unanswered questions, combined organizer/student permissions, immutable Microsoft identity checks, and the live sum warning tolerance. + +Keep the specification technology-neutral. Do not introduce new features, infrastructure choices, speculative threats or stylistic findings. If there are no relevant correctness findings, say so; do not invent findings. Number each real finding, state its severity, requirement and impact, suggest a concise fix, and give the total count. + +Write the exact English review output to /tmp/team-evaluation-alibek-review-round-2.md. This message is the exact review prompt for the submission record. +``` + +Output (verbatim): + +```text +# Alibek specification review — round 2 + +Scope: sections 1–3 and 6 of `team_evaluation_2/spec.md`. The remaining sections were read only for consistency. The specification was not edited. + +No relevant correctness findings remain in the reviewed sections. + +The five round-1 findings are addressed: + +- `VAL-6` now compares full-precision normalized percentages. Raw ratings `0, 0, 1` normalize to `0%, 0%, 100%`, are unequal, and require a non-whitespace justification when a justification prompt exists. The explicit one-percentage-point tolerance remains consistent with the `33, 33, 34` acceptance example. +- `VAL-7` now applies separately to each answered rating question, permits an optional rating question to remain unanswered, and rejects duplicate, self, unknown, and out-of-team evaluatees. Text answers and other questions are validated independently. +- Section 2 explicitly combines permissions when one account is both organizer and student. The owning organizer can read responses from their own run, while student permissions alone do not reveal other students' answers. `STU-9` states the same distinction. +- `AUTH-3` requires the normalized sign-in name and immutable Microsoft object ID to match the same stored Person in the allowed tenant. Mismatches and missing identity claims fail closed; account-name changes require operator reconciliation rather than automatic transfer of data or ownership. +- `STU-3` uses the same tolerance as `VAL-5` for the live sum warning. A sum of 99.9 therefore produces no warning, consistently with `TC-2`, and an entirely unanswered optional rating question produces no sum warning. + +The reviewed fixes remain technology-neutral and do not prescribe infrastructure or introduce new features. This was a specification review, not an execution test of an implementation. + +Findings count: **0**. +``` + +### Kamila + +GitHub userid: bagdatkamilla + +#### Contributions + +Reviewed and refined sections 4 (Organizer workflow) and 5 (Roster CSV +format) of [spec.md](spec.md). Clarified evaluation and question management, +run creation and closing, roster replacement, CSV validation, and error +handling. Checked consistency with the data model, student workflow, access +control, and acceptance examples while keeping the specification +technology-neutral. + +#### Build and run test + +LLM: GPT-6.2, in ChatGPT. + +Prompt: "Verify that you can build and run the project in the current git repo." + +Result: the existing CodeChat Editor project built successfully and the +standalone server started and ran without errors during the reported runtime +checks. No blocking issues were identified. The team-evaluation app itself +has not been implemented yet; its implementation is part of the final +submission. + +#### Specification review rounds + +| Round | Findings | Main changes made | +| ----- | -------- | ----------------- | +| 1 | 10 groups | Clarified evaluation title validation, duplication, modification timestamps, justification requirements, question type changes, Markdown safety, run snapshots, automatic closing, concurrent roster replacement, and run deletion. | +| 2 | 5 groups | Clarified run creation validation, CSV error reporting, duplicate column headers, empty and malformed records, user ID format, and display name priority. | +| 3 | 0 additional relevant findings | No changes. Verified consistency with the remaining sections of the specification. | + +#### Last specification review + +LLM: GPT-6.2, in ChatGPT + +Prompt (reconstructed from the original review instructions): + +``` +Review sections 4 "Organizer workflow" and 5 "Roster CSV format" +of spec.md. + +Review only these sections. Read the remaining sections solely +to check consistency. + +Look for: +- ambiguous or incomplete requirements; +- contradictions with other sections and acceptance examples; +- missing validation rules and edge cases; +- problems with evaluation management, question editing, + run creation, closing, reopening, and deletion; +- problems with CSV parsing and roster replacement. + +Keep the specification technology-neutral. +Do not introduce new features or unnecessary requirements. +Do not modify sections belonging to other team members. + +Report only relevant correctness findings. +If no additional relevant findings remain, state this clearly. +``` + +Output (summary of the final verification, not a verbatim historical log): + +**Review of spec.md sections 4 "Organizer workflow" and 5 "Roster CSV format"** + +Scope: sections 4 and 5 only. The remaining sections were reviewed solely to +check consistency. + +What was checked: + +* `ORG-1`–`ORG-4`: Evaluation creation, editing, duplication, deletion, + title validation, and modification timestamps are clearly defined. +* `Q-1`–`Q-6`: Question types, required fields, justification prompts, + question ordering, and Markdown rendering are consistent with the student + workflow and validation requirements. +* `RUN-1`–`RUN-3`: Run creation includes server-side validation, roster + confirmation, and an independent snapshot of the evaluation description + and questions. +* `RUN-4`: Automatic closing takes effect at the specified deadline, even + if the stored status has not yet been updated. Manual closing and reopening + are consistent with the data model in section 7. +* `RUN-6`: Roster replacement is atomic and cannot bypass the restriction + against modifying a roster after the first response. +* `RUN-7`: Run deletion removes associated run data and invalidates the + student link, consistently with `DATA-3`. +* `CSV-1`–`CSV-7`: CSV encoding, required columns, duplicate recognized + headers, malformed records, empty records, user ID validation, team + membership, and display name selection are defined. +* The revised requirements were checked against the relevant acceptance + examples, including `TC-10`–`TC-15` and `TC-22`–`TC-24`. + +Section 9.2 does not provide individual example messages for every newly +clarified CSV validation case. Section 5 identifies the table as a list of +common errors, and additional messages are covered by `ERR-1`. Section 9 +was left unchanged because it is jointly owned. + +The specification remains technology-neutral. No new features or +implementation-specific requirements were introduced. + +**Findings** + +No additional relevant correctness findings requiring changes to sections 4 +or 5 were identified in the final review. + +Total: 0 additional relevant findings. + +Final submission +---------------- + +### Yuri + +GitHub userid: kim0111 + +#### Contributions + +(Yuri's contributions) + +#### Specification review rounds + +(Table showing spec review rounds) + +#### Last specification review + +(LLM and prompt used) + +(LLM output, possibly with strikethrough) + +#### Implementation review rounds + +(Table showing implementation review rounds) + +#### Last implementation review + +(LLM and prompt used) + +(LLM output, possibly with strikethrough) + +### Alibek + +GitHub userid: alibekbtu + +The draft contribution and review results are recorded above. Final-stage +implementation and reviews have not been performed yet. + +### Kamila + +GitHub userid: bagdatkamilla + +(Same sections as Yuri) \ No newline at end of file