# S07 UAT Closure: Daily-loop evidence seam

This document closes S07 by **importing evidence from the executed S06 acceptance run** instead of duplicating that generated run log. The canonical execution artifact remains `docs/s06-acceptance-run.md`, produced by `scripts/s06-acceptance-run.sh`.

## Latest execution window

- Acceptance shell rerun id: `20260327T084839Z`
- Acceptance shell generated at (UTC): `2026-03-27T08:48:39Z`
- Browser verification window: `2026-03-27T08:38:51Z` through `2026-03-27T08:46:41Z`
- Environment used: localhost UI `http://localhost:3000` + API `http://localhost:5202/api`
- Auth path used for browser verification: local-dev admin JWT equivalent to the existing runner fallback, used only to reach the real authenticated UI in this localhost worktree

## Evidence source and seam

- Canonical acceptance artifact: `docs/s06-acceptance-run.md`
- Acceptance runner: `scripts/s06-acceptance-run.sh`
- Imported-evidence rule: this S07 document summarizes the cross-surface proof and links back to the acceptance artifact; detailed shell/browser output stays in the S06 run document and its linked artifacts.
- Evidence scope carried forward here: `/jobs` → workspace → `/reminders` → `/dashboard`, plus the follow-up draft manual-send boundary and Gmail continuity status.

## Seeded job identity

The seeded job used for the daily-loop proof is:

- Company: `S06 Acceptance Labs`
- Role: `S06 Acceptance Backend Engineer`
- Surface identity anchor: the same seeded row is the object traced across `/jobs`, the job workspace, `/reminders`, and `/dashboard`.

## Surface coherence summary

The imported acceptance evidence proves one seeded job stays coherent across the main overview surfaces:

1. **`/jobs`**
   - The live table rendered `S06 Acceptance Labs • S06 Acceptance Backend Engineer`.
   - The row showed the expected trust/status badges, including `Follow up`, `CV ready`, and `Waiting`.
   - The row opened the real job workspace for that same seeded record instead of a detached placeholder flow.

2. **Workspace**
   - Opening the seeded job from `/jobs` loaded the real workspace dialog.
   - The tailored CV content was present for the same seeded job and still began with `Saved acceptance tailored CV highlighting ASP.NET Core delivery, workflow trust signals...`.
   - The correspondence tab showed the seeded recruiter-thread message `Backend Engineer follow-up` for that same record.

3. **`/reminders`**
   - The seeded job appeared under `Needs Follow-up`.
   - Reminder-facing badges and follow-up date matched the seeded acceptance state: `Follow up`, `Waiting 14d`, and `Follow-up: 10/03/2026`.

4. **`/dashboard`**
   - Dashboard counters and company activity reflected the same integrated seeded state.
   - The route showed `Active applications = 2`, `Applied (30 days) = 2`, `Responses logged = 1`, and `Top companies by activity` included `S06 Acceptance Labs`.
   - A clean reload of `/dashboard` completed with explicit browser assertions for **no console errors** and **no failed requests**.

## Manual-send boundary evidence

The acceptance rerun preserved the manual-send boundary for follow-up email behavior:

- The workspace follow-up draft tab rendered the real draft UI for the seeded job.
- The live UI showed separate `Copy Draft` and `Send And Log Email` actions, preserving explicit human intent at the send boundary.
- In this build, switching to the draft tab did not emit a newly captured request by itself, so the live draft endpoint was rechecked from the authenticated browser context and returned `GET /api/jobapplications/3/followup-draft -> 200` with subject/body payload present.
- During the observed browser pass, **no** `POST /api/jobapplications/3/send-followup` request was triggered.
- Therefore, this run still proves draft review stayed on the safe/manual side of the boundary: the system prepared the draft but did not auto-send mail.

## Gmail continuity status

Gmail continuity was **not proven as a passing live-sync behavior in this local run**.

- The correspondence evidence for the seeded job was present in the real workspace.
- The `Linked Gmail thread continuity` banner was not visibly surfaced during this pass.
- No linked-thread refresh activity was observed in the browser verification flow.
- The correct interpretation is: local run evidence preserved seeded correspondence visibility, but Gmail-connected continuity remains a stated limitation/known boundary for this execution, not an implied success.

## UI regression results

The S07 closure now cites the focused UI regression pair that encodes the same cross-surface daily-loop contract at component/integration-test level.

- Regression command: `CI=true npm --prefix /home/pi/development/JobTracker/.gsd/worktrees/M001/job-tracker-ui test -- --runInBand --watch=false src/daily-control-loop.test.tsx src/workflow-trust-signals.test.tsx`
- Executed at (UTC): `2026-03-27T08:51:50Z` initial attempt, repaired and passing rerun completed during the same execution window
- Initial failure mode observed: `react-scripts: not found` from the planned npm test invocation; repaired by running `npm --prefix /home/pi/development/JobTracker/.gsd/worktrees/M001/job-tracker-ui install`
- Final result: `2 passed, 2 total` test suites; `6 passed, 6 total` tests; `0` snapshots; Jest runtime `5.53 s`
- Flake note: no behavioral flake was observed in the focused test pair. Output did include repeat `React Router Future Flag Warning` console warnings, but they did not fail the suites and were stable across the passing rerun.
- Closure guardrail: if this focused regression command fails on a future rerun, this document should not be used to claim daily-loop UAT closure until the failures are investigated and the cross-surface contract is re-proven.

## Acceptance artifact links

These links point to the executed S06 acceptance evidence imported by this S07 closure:

- Acceptance run doc: `docs/s06-acceptance-run.md`
- Acceptance shell logs:
  - `docs/artifacts/s06-acceptance/logs/20260327T084839Z-preflight.log`
  - `docs/artifacts/s06-acceptance/logs/20260327T084839Z-acceptance-data.log`
  - `docs/artifacts/s06-acceptance/logs/20260327T084839Z-end-to-end-trust-loop.log`
- Jobs/workspace debug artifact: `/home/pi/development/JobTracker/.artifacts/browser/2026-03-27T08-46-41-172Z-s07-jobs-workspace`
- Follow-up draft debug artifact: `/home/pi/development/JobTracker/.artifacts/browser/2026-03-27T08-44-29-745Z-s07-followup-draft`
- Reminders debug artifact: `/home/pi/development/JobTracker/.artifacts/browser/2026-03-27T08-44-55-926Z-s07-reminders`
- Dashboard debug artifact: `/home/pi/development/JobTracker/.artifacts/browser/2026-03-27T08-46-10-205Z-s07-dashboard`
- Browser trace zip: `/home/pi/development/JobTracker/.artifacts/browser/2026-03-27T08-38-51-567Z-session/s07-acceptance.trace.zip`
- Browser timeline JSON: `/home/pi/development/JobTracker/.artifacts/browser/2026-03-27T08-38-51-567Z-session/s07-acceptance-timeline.json`

## Rerun commands

Use the existing acceptance runner rather than editing this document by hand:

```bash
bash /home/pi/development/JobTracker/.gsd/worktrees/M001/scripts/s06-preflight.sh
bash /home/pi/development/JobTracker/.gsd/worktrees/M001/scripts/s06-acceptance-run.sh
```

If auth is required for seeding against a non-default/local context, export `AUTH_TOKEN` before rerunning the acceptance script.

## Closure statement

S07 closes the daily-loop UAT requirement by attaching a dedicated artifact to the executed acceptance evidence seam: one seeded job (`S06 Acceptance Backend Engineer`) is shown coherently across `/jobs`, the workspace, `/reminders`, and `/dashboard`, while the follow-up flow preserves the manual-send boundary and the Gmail continuity limitation remains explicitly called out rather than overstated.
