# S07: Daily-loop UAT artifact closure — UAT **Milestone:** M001 **Written:** 2026-03-27T08:59:47.615Z # S07 UAT — Daily-loop UAT artifact closure ## Preconditions - Local API is running at `http://localhost:5202` and UI is running at `http://localhost:3000`. - The S06 acceptance fixture can be seeded via `bash scripts/s06-acceptance-run.sh`. - Seeded job identity exists after rerun: `S06 Acceptance Labs` / `S06 Acceptance Backend Engineer`. - Browser session can reach the authenticated localhost UI used by the S06 acceptance flow. ## Test Case 1 — `/jobs` anchors the seeded daily-loop job 1. Run `bash scripts/s06-preflight.sh`. - Expected: script reaches `/api/auth/config`; auth-limited partial pass is acceptable, but API reachability must succeed. 2. Run `bash scripts/s06-acceptance-run.sh`. - Expected: `docs/s06-acceptance-run.md` is refreshed and reports overall runner result `pass`. 3. Open `/jobs` in the authenticated UI session. - Expected: the table contains `S06 Acceptance Labs • S06 Acceptance Backend Engineer`. 4. Inspect the seeded row state. - Expected: the row shows `Follow up`, `CV ready`, and `Waiting` badges. 5. Open the row’s workspace entry. - Expected: the real job workspace opens for the same seeded job, not a disconnected placeholder. ## Test Case 2 — Workspace preserves the same job identity and real seeded content 1. From the seeded workspace, inspect the tailored CV area. - Expected: saved tailored CV content is present and begins with `Saved acceptance tailored CV highlighting ASP.NET Core delivery, workflow trust signals...`. 2. Switch to the correspondence view. - Expected: the seeded recruiter-thread message `Backend Engineer follow-up` is visible for the same job. 3. Record Gmail continuity status honestly. - Expected: if a linked-thread continuity banner/refresh signal is visible, capture it explicitly; if not, record Gmail continuity as not proven in this run rather than marking it passed. ## Test Case 3 — `/reminders` and `/dashboard` reflect the same seeded state 1. Navigate to `/reminders`. - Expected: the seeded job appears under `Needs Follow-up`. 2. Inspect reminder state. - Expected: `Follow up`, `Waiting 14d`, and `Follow-up: 10/03/2026` are all visible for the seeded job. 3. Navigate to `/dashboard`. - Expected: dashboard counters show `Active applications = 2`, `Applied (30 days) = 2`, and `Responses logged = 1`. 4. Inspect company activity. - Expected: `Top companies by activity` includes `S06 Acceptance Labs`. 5. Reload `/dashboard` after clearing diagnostics. - Expected: no browser console errors and no failed network requests are observed in the clean dashboard pass. ## Test Case 4 — Follow-up drafting stays on the manual side of the boundary 1. Open the seeded job workspace follow-up draft area. - Expected: separate `Copy Draft` and `Send And Log Email` controls are visible. 2. Verify draft retrieval without sending. - Expected: the live draft content is present in the workspace; if the tab does not emit a fresh captured request, confirm `GET /api/jobapplications/3/followup-draft` succeeds from the authenticated browser context. 3. Observe browser/network activity during passive draft review. - Expected: no `POST /api/jobapplications/3/send-followup` request occurs unless the explicit send action is clicked. 4. Record the outcome. - Expected: UAT notes state that the system prepared the draft but did not auto-send email. ## Test Case 5 — Deterministic regression guardrail for closure 1. Run `CI=true npm --prefix job-tracker-ui test -- --runInBand --watch=false src/daily-control-loop.test.tsx src/workflow-trust-signals.test.tsx`. - Expected: both suites pass (`2 passed, 2 total`) and all six tests pass. 2. Confirm `docs/s07-uat.md` contains a `UI regression results` section. - Expected: the doc records the command, pass result, and the rule that closure must not be claimed if this regression pair fails on rerun. ## Edge Cases / Failure Handling - If `scripts/s06-preflight.sh` cannot reach `http://localhost:5202/api`, stop and recover the local API before claiming closure. - If `scripts/s06-acceptance-run.sh` fails to seed/update the fixture or reports a non-pass result, do not claim S07 closure; capture the runner logs and fix the blocker first. - If the focused UI regression command fails with `react-scripts: not found`, run `npm --prefix job-tracker-ui install` and retry before treating the slice as regressed. - If the seeded job is visible but Gmail-linked continuity is not, record that as a limitation; do not silently convert seeded correspondence visibility into a Gmail-sync pass. - If any passive browser observation shows a `send-followup` POST without the explicit send action, treat it as a blocker against R008 and fail the UAT closure.