bdc47dde7f
GSD-Unit: M001/S06/T01
2.1 KiB
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:
- Write
scripts/s06-acceptance-data.sh(bash, executable) that requiresAUTH_TOKENenv; usesscripts/s06-preflight.shfirst, 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. - 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). - Emit a short summary of created/updated IDs so the acceptance run can target them; avoid logging token.
- Document any manual token retrieval step in script comments.
- Write
- 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.shREADME.mdJobTrackerApi/Controllers/JobApplicationsController.csJobTrackerApi/Controllers/CorrespondenceController.cs
Expected Output
scripts/s06-acceptance-data.shREADME.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.