{
  "blueprint": "shift-scheduling",
  "builder": "Claude, following the phase prompts in order (a fresh subagent per phase that saw only the spec and the build folder)",
  "testedSpecSha256": "b0d3d02e80d540e6ea7acc192207db5dc64bc4c029f09104d58a42ea5575173e",
  "reviewDate": "2026-11-07",
  "reviewMethod": "Playwright scripts (Chromium) clicked through the build as the named seed people (Rosa, Ana, Ben, Jo, Lee, Mia) from the development \"sign in as\" switcher, asserting on what was on screen; where a check says the server must refuse something the script also made the request directly (People and wages as Ben, Ben's availability as Jo, a claim on the Barista shift as Mia, the draft week of Oct 26 and its shifts as Ben, and a hard-conflict assignment posted with an override note). The seed's \"today\" was pinned to Thursday, October 15, 2026 so the dates match the checks. Emails were read on the Outbox screen; the calendar feed was fetched by its link and parsed, before and after Make a new link; the CSV export was downloaded and parsed; the print view was printed to PDF by Chromium and its pages counted. The run below is the single final run on a fresh database after all spec gaps were fixed: Phases 1 and 2 start from a fresh seed and Phases 3 and 4 continue on the same data, as the build plan says. Earlier per-phase runs found the gaps and are not counted. Results are final post-fix checks, not first-attempt success rates or an independent human audit.",
  "automatedTests": {
    "passed": 66,
    "total": 66,
    "command": "npm test",
    "rerunDuringReview": true
  },
  "gapsFixed": 84,
  "runs": [
    {
      "startedAt": "2026-11-07T10:11:11.643Z",
      "finishedAt": "2026-11-07T10:11:26.384Z",
      "phases": [
        1,
        2,
        3,
        4
      ],
      "passed": 20,
      "total": 20,
      "items": [
        {
          "phase": 1,
          "text": "Signed in as Rosa, People shows the eight people with their positions and wages; signed in as Ben, wages are not visible anywhere and a direct request for them is refused.",
          "status": "pass",
          "evidence": "Signed in as Rosa, People lists 8 people: Ana Lima ($19.00), Ben Cho ($17.50), Jo Park ($17.00), Kai Brooks ($18.50), Lee Grant ($17.00), Mia Torres ($18.50), Rosa Diaz ($26.00), Sam Okafor ($19.50), each with positions (e.g. \"Ana Lima ana@harborcafe.example Barista, Shift lead $19.00/h 40 h Active\"). Signed in as Ben, no dollar amount appears on /, /availability, /time-off; direct requests GET /people 403, GET /api/people 403, GET /people/per_ben 403, GET /api/people/per_ana 403, none containing a wage."
        },
        {
          "phase": 1,
          "text": "Jo marks herself unavailable on Wednesdays from 18:00 to 22:00 and sees it on her availability; she cannot edit Ben's.",
          "status": "pass",
          "evidence": "Signed in as Jo, added Wednesday 18:00 to 22:00; her availability now reads \"Tuesday, all day (classes)\" and \"Wednesday, 18:00 to 22:00\". Jo has no way to open Ben's: GET /availability?person=per_ben 403, POST /availability for Ben 403; Rosa's view of Ben's availability shows no new entry."
        },
        {
          "phase": 1,
          "text": "Ben requests Monday Oct 19 off and Rosa's approval is refused with \"Ben has 1 shift on Oct 19. Reassign it first.\"; Ben requests Monday Nov 2 instead, Rosa approves it, and Ben's email appears in the outbox.",
          "status": "pass",
          "evidence": "Ben requested Mon Oct 19; Rosa's Approve showed \"Ben has 1 shift on Oct 19. Reassign it first.\" Ben then requested Mon Nov 2; Rosa approved it (Decided row \"Ben Cho Mon Nov 2 Approved by Rosa Diaz None\") and the outbox has \"Thu Oct 15, 09:00 ben@harborcafe.example Time off Nov 2: approved Time off decided logged\"."
        },
        {
          "phase": 1,
          "text": "Deactivating Ana Lima is refused because she has future shifts.",
          "status": "pass",
          "evidence": "Signed in as Rosa, Deactivate on Ana Lima is refused: \"Ana has 3 future shifts (Thu Oct 15, Wed Oct 21 and Thu Oct 22). Reassign or open them before deactivating Ana.\"; People still shows \"Ana Lima ana@harborcafe.example Barista, Shift lead $19.00/h 40 h Active\"."
        },
        {
          "phase": 2,
          "text": "Reassigning Tuesday's opening shift from Ben Cho to Jo Park shows \"Jo is unavailable on Tuesdays (classes).\" and will not save without an override note; cancel it.",
          "status": "pass",
          "evidence": "Signed in as Rosa, reassigning Tuesday Oct 20's opening shift (Barista 06:00–14:00 $140.00) from Ben Cho to Jo Park shows \"Jo is unavailable on Tuesdays (classes).\"; pressing \"Save with override note\" with the note empty does not save (page still warns; \"To save anyway, add an override note below. Otherwise change the shift or cancel.\"). After Cancel the grid still shows Ben's Tuesday cell \"Barista 06:00–14:00 $140.00 +\" and nothing in Jo's."
        },
        {
          "phase": 2,
          "text": "Reassigning Friday's opening shift from Jo Park to Ana Lima warns \"Only 8 hours of rest after Thursday's shift (10 hours minimum).\"; cancel it.",
          "status": "pass",
          "evidence": "Reassigning Friday Oct 23's opening shift (Barista 06:00–14:00 $136.00) from Jo Park to Ana Lima (who closes Thursday at 22:00) warns \"Only 8 hours of rest after Thursday's shift (10 hours minimum).\"; cancelled, Jo's Friday cell still reads \"Barista 06:00–14:00 $136.00 +\"."
        },
        {
          "phase": 2,
          "text": "Assigning Ben Cho the open Saturday shift warns \"Ben would have 40 hours this week (35 maximum).\"; saving it with the note \"Covering this week\" stores the note in the event log; then make the shift open again.",
          "status": "pass",
          "evidence": "Assigning Ben Cho the open Saturday Oct 24 shift (Barista 08:00–16:00 $144.00) warns \"Ben would have 40 hours this week (35 maximum).\"; saved with the note \"Covering this week\" (Ben's Saturday cell then \"Barista 08:00–16:00 $140.00 ⚠ Overridden Ben would have 40 hours this week (35 maximum). +\"); the Event log shows \"Override note: “Covering this week”\". Then \"Make this an open shift\": the Open shifts row's Saturday reads \"Barista 08:00–16:00 $144.00 +\"."
        },
        {
          "phase": 2,
          "text": "Assigning Kai Brooks to Saturday's kitchen shift is refused with \"Kai has approved time off Oct 24 to 25.\", and assigning Lee Grant to Wednesday's kitchen shift is refused with \"Lee isn't set up for Kitchen.\"",
          "status": "pass",
          "evidence": "Assigning Kai Brooks to Saturday Oct 24's kitchen shift is refused: \"Kai has approved time off Oct 24 to 25.\" (no override offered; a direct POST with an override note also leaves it with Mia, HTTP 422). Assigning Lee Grant to Wednesday Oct 21's kitchen shift is refused: \"Lee isn't set up for Kitchen.\" Both shifts stay with Mia and Kai."
        },
        {
          "phase": 2,
          "text": "The footer shows Monday at $632.00 and the week at 192 hours and $3,792.00, with the open Saturday shift costed at $144.00.",
          "status": "pass",
          "evidence": "Footer rows: \"Hours 32 h 32 h 32 h 32 h 32 h 16 h 16 h\" and \"Labor $632.00 $632.00 $648.00 $648.00 $648.00 $292.00 $292.00\" (Monday $632.00); \"Week total: 192 hours, $3,792.00 labor (24 shifts, 1 open; open shifts are costed at the average wage of the people who hold the position)\"; the open Saturday block reads \"Barista 08:00–16:00 $144.00 +\"."
        },
        {
          "phase": 2,
          "text": "Publishing the week of Oct 19 sends each of the eight people with shifts exactly one \"Your shifts\" email, announces the open Saturday shift to the five baristas, and makes the week visible to staff.",
          "status": "pass",
          "evidence": "Before publishing, Ben's request for the week of Oct 19 returned 404. Rosa pressed Publish: the outbox has 8 \"Your shifts for the week of Oct 19\" emails, one each to rosa, ana, ben, jo, lee, sam, kai, mia, and 5 \"Open shift: Barista, Sat Oct 24, 08:00 to 16:00\" emails to ana, ben, jo, lee, sam. Signed in as Ben, the week of Oct 19 now shows (names and times, no costs)."
        },
        {
          "phase": 2,
          "text": "After publishing, changing Lee Grant's Monday closing shift to start at 15:00 emails Lee the before and after times.",
          "status": "pass",
          "evidence": "Changing Lee Grant's published Monday Oct 19 closing shift to start at 15:00 put one email to Lee in the outbox (\"Thu Oct 15, 09:00 lee@harborcafe.example Your shift on Mon Oct 19 changed Shift changed logged\") whose body reads: Before: Mon Oct 19, 14:00 to 22:00, Barista / After: Mon Oct 19, 15:00 to 22:00, Barista."
        },
        {
          "phase": 3,
          "text": "Signed in as Lee Grant, My shifts shows Jo's swap request for Saturday Oct 17; accepting it puts it in Rosa's Requests, and Rosa's approval moves the shift to Lee and emails both.",
          "status": "pass",
          "evidence": "Signed in as Lee Grant, My shifts shows \"Jo Park asked you to take their shift: Sat Oct 17 · Barista 08:00 to 16:00\"; after Accept swap, Rosa's Requests shows \"Swap Jo Park swaps their shift to Lee Grant (Lee Grant accepted) Sat Oct 17, 08:00 to 16:00, Barista Conflict check: ✓ No conflicts for Lee. Approve Decline\". Rosa pressed Approve: in the week of Oct 12 Lee's Saturday cell reads \"Barista 08:00–16:00 $136.00 +\" and Jo's is empty; the outbox has \"Approved: your swap for Sat Oct 17\" to jo and lee."
        },
        {
          "phase": 3,
          "text": "Signed in as Ben, claiming the open Saturday Oct 24 shift is refused with \"Ben would have 40 hours this week (35 maximum).\"",
          "status": "pass",
          "evidence": "Signed in as Ben, the open shift \"Sat Oct 24 · Barista 08:00 to 16:00 (8 hours)\" is offered; Claim this shift is refused with \"You can't claim this shift: Ben would have 40 hours this week (35 maximum).\", and nothing reaches Rosa's Requests."
        },
        {
          "phase": 3,
          "text": "Signed in as Mia Torres (Kitchen only), the open Barista shift is not offered, and a direct claim request for it is refused.",
          "status": "pass",
          "evidence": "Signed in as Mia Torres (Kitchen only), My shifts has 0 claim buttons and the word \"Barista\" appears nowhere (\"Open shifts you can claim: No open shifts for your positions right now.\"). A direct POST /my/claims for the open Barista shift returns 403 \"You can only claim open shifts for positions you hold.\", and no claim reaches Rosa's Requests."
        },
        {
          "phase": 3,
          "text": "Signed in as Lee, claiming the same shift puts the claim in Rosa's Requests; a later claim by Ana shows as \"2nd in line\"; approving Lee's claim assigns the shift to Lee and declines Ana's claim with an email to her.",
          "status": "pass",
          "evidence": "Lee claimed the open Saturday Oct 24 shift, then Ana claimed it; Ana's My shifts shows \"2nd in line\". Rosa's Requests: \"Claim Lee Grant claims the open shift 1st in line Sat Oct 24, 08:00 to 16:00, Barista Requested Thu Oct 15, 09:00 Conflict check: ✓ No conflicts for Lee. Approve Decline\" and \"Claim Ana Lima claims the open shift 2nd in line Sat Oct 24, 08:00 to 16:00, Barista Requested Thu Oct 15, 09:00 Conflict check: ✓ No conflicts for Ana. Approve Decline\". Approving Lee's claim puts it in Lee's Saturday cell (\"Barista 08:00–16:00 $136.00 +\"); Ana's claim is declined and the outbox has \"Declined: your claim for Sat Oct 24\" to ana."
        },
        {
          "phase": 3,
          "text": "Ana asks to drop her Wednesday Oct 21 shift with a reason; after Rosa approves, the shift is open and announced to the other four baristas (Ben, Jo, Lee and Sam).",
          "status": "pass",
          "evidence": "Ana asked to drop her Wednesday Oct 21 closing shift with the reason \"Family visit that evening\"; Rosa's Requests card read \"Drop Ana Lima asks to drop the shift. Reason: “Family visit that evening” Wed Oct 21, 14:00 to 22:00, Barista Requested Thu Oct 15, 09:00 Conflict check: ✓ No conflicts: the shift becomes open and is announced to 4 eligible people. Approve Decline\". After Approve, the Open shifts row's Wednesday reads \"Barista 14:00–22:00 $144.00 +\" and \"Open shift: Barista, Wed Oct 21, 14:00 to 22:00\" went to the other baristas: ben, jo, lee, sam."
        },
        {
          "phase": 3,
          "text": "Rosa copies the week of Oct 19 into a draft for Oct 26; signed in as Ben, that week is not visible, and a direct request for its shifts is refused.",
          "status": "pass",
          "evidence": "Rosa copied the week of Oct 19 into a draft for Oct 26 (\"Week total: 191 hours, $3,759.00 labor (24 shifts, 1 open; open shifts are costed at the average wage of the people who hold the position)\", 24 shifts). Signed in as Ben, My shifts shows nothing from that week, and direct requests are refused: GET /schedule?week=2026-10-26 404, GET /api/schedule?week=2026-10-26 404, GET /shifts/shf_a88b4424d0e02960 403, POST /my/drops 404, POST /my/claims 404."
        },
        {
          "phase": 4,
          "text": "Ben's calendar feed lists his published shifts with position and times and nothing from the draft week of Oct 26; after he regenerates the link, the old link returns Not found.",
          "status": "pass",
          "evidence": "Signed in as Ben, the Calendar page gives the feed link /calendar/…ics (text/calendar); it lists 8 events, all his published Barista 06:00 to 14:00 shifts on 10/12, 10/13, 10/14, 10/15, 10/19, 10/20, 10/21, 10/22 (e.g. SUMMARY \"Barista shift\\, 06:00 to 14:00\", DESCRIPTION \"Barista at Harbor Café\\nMon Oct 12\\, 06:00 to 14:00 (America/New_York)\"), none from the draft week of Oct 26. After \"Make a new link\", the old link shows \"Not found.\" (HTTP 404) and the new one returns 200."
        },
        {
          "phase": 4,
          "text": "Exporting the week of Oct 19 downloads a CSV with one row per shift, hours and cost, with Ana's dropped Wednesday shift shown as Open.",
          "status": "pass",
          "evidence": "Signed in as Rosa, Export CSV on the week of Oct 19 downloads \"harbor-cafe-week-of-2026-10-19.csv\" with the header \"Person,Position,Date,Start,End,Hours,Cost\" and 24 rows, one per shift, each with hours and cost (they add up to 191 hours and $3759.00). Ana's dropped Wednesday Oct 21 closing shift is the row \"Open,Barista,2026-10-21,14:00,22:00,8.00,144.00\"."
        },
        {
          "phase": 4,
          "text": "The print view fits the week of Oct 19 on one landscape page.",
          "status": "pass",
          "evidence": "The Print view of the week of Oct 19 (\"Harbor Café · Week of Oct 19 to 25, 2026\", 9 grid rows) printed by Chromium with its own @page settings is 1 page, 792 x 612 pt (landscape)."
        }
      ]
    }
  ],
  "notTested": [
    "Production sign-in: every check used the development \"sign in as\" switcher; Google sign-in and magic links were not built or tried.",
    "Real email delivery: every email was logged in the outbox; no email provider was configured.",
    "The hourly retry job on a real scheduler: the endpoint exists and the build's own tests call it, but no cron was set up.",
    "Hosting: the checks ran on localhost, not on a public https address.",
    "Calendar apps: the feed was fetched and parsed, not subscribed to from iPhone, Google Calendar or Outlook.",
    "Printing on paper: the print view was printed to PDF by Chromium only.",
    "Daylight-saving weeks and phone layout beyond one 390-pixel Chromium viewport; no physical phone was used.",
    "Spec fixes that no acceptance check covers (positions, templates, deleting shifts, the retry job, the CSV formula guard) are covered only by the build's own choices and tests, or not at all."
  ]
}
