--- estimated_steps: 12 estimated_files: 3 skills_used: [] --- # T02: Seed acceptance-ready job data Create a seed script that prepares a richer acceptance fixture (job, correspondence, saved package, follow-up readiness) using live API calls. - Why: current DB has only 1 low-signal job; acceptance rerun needs actionable overview + workspace state. - Steps: 1) Write `scripts/s06-acceptance-data.sh` (bash, executable) that requires `AUTH_TOKEN` env; uses `scripts/s06-preflight.sh` first, then POSTs to `/api/jobapplications` (or PUT existing ID) to create a job with saved package fields, correspondence entry, reminder/follow-up signals, and notes. 2) Add curl helpers for adding correspondence (`/api/correspondence/{jobId}` or equivalent), saving package material, and setting workflow/readiness if needed; use deterministic titles so rerun is idempotent (update if exists). 3) Emit a short summary of created/updated IDs so the acceptance run can target them; avoid logging token. 4) Document any manual token retrieval step in script comments. - Failure Modes (Q5): missing AUTH_TOKEN → fail with guidance; 401/403 → explain token issue; 5xx → print response and fail; malformed response → show body and fail. - Load Profile (Q6): few API calls; minimal DB impact. - Negative Tests (Q7): run without AUTH_TOKEN (expect failure); rerun twice (should succeed idempotently); simulate 401 by bad token (expect clear message). - Must-haves: script seeds at least one job with saved package + correspondence + follow-up readiness; outputs job id for UAT; uses preflight. - Verification: `bash scripts/s06-acceptance-data.sh` ## Inputs - ``scripts/s06-preflight.sh`` - ``README.md`` - ``JobTrackerApi/Controllers/JobApplicationsController.cs`` - ``JobTrackerApi/Controllers/CorrespondenceController.cs`` ## Expected Output - ``scripts/s06-acceptance-data.sh`` - ``README.md`` ## Verification bash scripts/s06-acceptance-data.sh ## Observability Impact Provides seed summary output (job id, correspondence count) to inspect readiness; failures surface via script exit and printed API responses.