Files
jobtrackingapp/.gsd/milestones/M001/slices/S06/tasks/T02-PLAN.md
T
2026-03-27 08:54:34 +01:00

2.1 KiB

estimated_steps, estimated_files, skills_used
estimated_steps estimated_files skills_used
12 3

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.