Files
cesnimda 8f0f9bae22 docs: Added docs/s07-uat.md to close S07 with imported acceptance-run e…
- "docs/s07-uat.md"
- ".gsd/milestones/M001/slices/S07/tasks/T01-SUMMARY.md"

GSD-Task: S07/T01
2026-03-27 09:36:39 +01:00

9.1 KiB


id: S06 parent: M001 milestone: M001 provides:

  • A repeatable localhost preflight + seed + acceptance-run workflow for the M001 trust loop.
  • A deterministic live acceptance fixture (S06 Acceptance Labs / S06 Acceptance Backend Engineer) that surfaces saved package state, recruiter-thread correspondence, follow-up readiness, and dashboard/reminder visibility.
  • A recorded live acceptance artifact that downstream closure/UAT work can reference instead of reconstructing the environment from scratch.
  • Fresh live proof that the manual-send boundary still holds in the real stack. requires:
  • slice: S05 provides: The shared workflow-signal contract, integrated trust-loop regression, and manual-send-boundary behavior that S06 re-verified in the real environment. affects:
  • S07 key_files:
  • scripts/s06-preflight.sh
  • scripts/s06-acceptance-data.sh
  • scripts/s06-acceptance-data.test.sh
  • scripts/s06-acceptance-run.sh
  • docs/s06-acceptance-run.md
  • .gsd/DECISIONS.md
  • .gsd/KNOWLEDGE.md
  • .gsd/PROJECT.md key_decisions:
  • D013: seed the acceptance fixture through the live API contract with deterministic identifiers so reruns are idempotent and prove real code paths.
  • D014: allow the acceptance runner to mint a localhost-only admin JWT from checked-in dev JWT settings plus the local SQLite admin user when AUTH_TOKEN is absent.
  • D015: treat /api/auth/config reachability plus an auth-limited /api/admin/system probe as a guided partial-pass, and never echo bearer tokens in preflight output. patterns_established:
  • Use a preflight gate before browser UAT so backend/CORS/auth blockers fail fast with readable guidance instead of surfacing later as ambiguous frontend runtime errors.
  • Seed live acceptance fixtures through the same authenticated HTTP endpoints the UI uses, with deterministic company/title/thread/message identifiers, so reruns prove the real contract and stay idempotent.
  • Persist a single acceptance-run artifact (docs/s06-acceptance-run.md) that refreshes shell evidence without destroying the guided browser-observation section, so later slices can build on one stable handoff document.
  • Record manual-send-boundary evidence as both UI observation and network evidence; for this slice, drafting may call GET .../followup-draft but must not trigger POST .../send-followup without an explicit human action. observability_surfaces:
  • scripts/s06-preflight.sh console output for auth/db/gmailConfigured/ai readiness signals and clear failure guidance.
  • scripts/s06-acceptance-data.sh seed summary output (seed.result, job/company ids, workflow action, readiness level, reminder state).
  • docs/s06-acceptance-run.md plus docs/artifacts/s06-acceptance/logs/* for shell-step evidence and blocker guidance.
  • Recorded browser artifacts referenced from the acceptance doc (jobs/workspace, follow-up draft, reminders/dashboard, trace, timeline). drill_down_paths:
  • .gsd/milestones/M001/slices/S06/tasks/T01-SUMMARY.md
  • .gsd/milestones/M001/slices/S06/tasks/T02-SUMMARY.md
  • .gsd/milestones/M001/slices/S06/tasks/T03-SUMMARY.md duration: "" verification_result: passed completed_at: 2026-03-27T08:29:02.335Z blocker_discovered: false

S06: Live environment stabilization and integrated acceptance rerun

Stabilized the live localhost stack with a repeatable preflight + seed + acceptance runner flow and re-proved the /jobs → workspace → reminders/dashboard loop with recorded manual-send-boundary evidence.

What Happened

S06 turned the previously fragile live environment into a repeatable acceptance target instead of a one-off debugging session. The slice added a preflight gate that checks the real API contract before UI work starts, an idempotent live-data seed that creates or refreshes a deterministic acceptance fixture through the same HTTP endpoints the app uses in normal operation, and a single acceptance runner that ties preflight, seeding, the integrated trust-loop regression, and the live evidence document together. The resulting live run now proves that the seeded job appears on /jobs, opens the real workspace with saved Tailored CV and package state, shows deterministic recruiter-thread correspondence, appears on /reminders with the expected Follow up / Waiting 14d signals, and contributes to /dashboard analytics without frontend runtime failures. The slice also re-proved the manual-send boundary in the actual stack: opening or regenerating the follow-up draft issued GET /api/jobapplications/3/followup-draft but no POST /api/jobapplications/3/send-followup, so drafting stayed assistive and did not cross into autonomous sending. The main remaining live gap is Gmail-connected continuity: the seeded correspondence is visible, but this localhost run did not have a connected Gmail session and therefore did not execute a linked-thread refresh request. That gap is now explicit in the acceptance artifact instead of being mistaken for a fully proven live Gmail refresh.

Verification

Verified the assembled slice in the live worktree with the real backend and frontend running on the expected localhost origins. Commands run: bash scripts/s06-preflight.sh (exit 0, expected auth-limited partial-pass when /api/admin/system requires a token), TEST_AUTH_TOKEN="$TOKEN" AUTH_TOKEN="$TOKEN" bash scripts/s06-acceptance-data.test.sh (exit 0; missing-token, bad-token, and double-rerun cases all passed), AUTH_TOKEN="$TOKEN" bash scripts/s06-acceptance-data.sh (exit 0; seed.result=success, stable company/job fixture, seed.workflow.action=follow-up, seed.readiness.level=Ready, seed.reminders=Waiting 14d), and bash scripts/s06-acceptance-run.sh && test -s docs/s06-acceptance-run.md (exit 0). The recorded live browser evidence in docs/s06-acceptance-run.md confirms /jobs, workspace, /reminders, and /dashboard behavior plus the manual-send boundary and a clean dashboard reload with no console errors or failed requests.

Requirements Advanced

  • R008 — S06 re-proved the manual-send boundary in the live stack: follow-up drafting remained assistive, and the recorded network evidence showed no send endpoint call during draft review/regeneration.
  • R009 — S06 re-checked the individual-first loop in the real environment by proving one seeded job behaves coherently across /jobs, the per-job workspace, /reminders, and /dashboard.

Requirements Validated

None.

New Requirements Surfaced

None.

Requirements Invalidated or Re-scoped

None.

Deviations

Added two bounded implementation choices beyond the original plan to keep reruns repeatable in this real environment: a localhost-only JWT fallback inside the acceptance runner because the checked-in dev password no longer authenticates against the current SQLite snapshot, and an explicit preflight partial-pass path for the auth-limited /api/admin/system case so browser/UAT work is blocked only by true environment failures. Gmail continuity was recorded as not configured/not refreshed in this run rather than being overstated as a proven live success.

Known Limitations

This slice does not prove a real Gmail-connected linked-thread refresh in the local environment. The seeded recruiter correspondence is present and the workspace loop is otherwise live, but the browser run did not expose connected Gmail state or issue POST /api/gmail/refresh-linked-threads. The acceptance data fixture is intentionally deterministic and single-user; it is suitable for localhost reruns, not for multi-user or production seeding.

Follow-ups

S07 should turn this rerunnable acceptance flow into the final daily-loop UAT closure artifact, ideally in an environment where Gmail is actually connected so linked-thread refresh can be observed live. If the Gmail account remains unavailable locally, S07 should keep the limitation explicit rather than weakening the trust claim. If future slices rely on the S06 fixture, preserve the deterministic identifiers and rerun-safe update behavior instead of adding duplicate seed records.

Files Created/Modified

  • scripts/s06-preflight.sh — Provides the live API/auth/CORS preflight gate with readable failure guidance and an auth-limited partial-pass path.
  • scripts/s06-acceptance-data.sh — Seeds or refreshes the deterministic acceptance fixture through the live API and prints readiness/reminder output.
  • scripts/s06-acceptance-data.test.sh — Exercises missing-token, bad-token, and idempotent rerun cases for the acceptance seeding flow.
  • scripts/s06-acceptance-run.sh — Orchestrates preflight, seeding, the integrated trust-loop regression, log capture, and the acceptance document refresh.
  • docs/s06-acceptance-run.md — Records the live S06 acceptance rerun, browser observations, manual-send-boundary evidence, and the remaining Gmail continuity gap.
  • .gsd/DECISIONS.md — Captured S06 environment decisions, including live-API seeding, local JWT fallback, and preflight auth handling.
  • .gsd/KNOWLEDGE.md — Captured the auth-limited preflight behavior and the local admin/JWT rerun pattern for future agents.
  • .gsd/PROJECT.md — Updated project state to reflect S06 completion and the remaining S07 closure focus.