generated from john/python-template
4.9 KiB
4.9 KiB
Job Acceptance Criteria
Purpose: Define implementation-ready acceptance criteria for Job Create, Read, Update, and Delete workflows.
Companion documents:
- docs/ui/entities/job/user-journey.md
- docs/ui/entities/job/schema-mapping.md
Scope
This checklist covers:
- Create flow
- Read flow
- Update flow
- Delete flow
This checklist does not cover:
- provider-specific transcription internals
- advanced workflow scheduling and queue orchestration controls
- multi-job bulk operations
Create Acceptance Criteria
CR-1 Job creation entry
- Given the user is on the Jobs page
- When the user selects Create job
- Then the user is taken to Job detail/create mode
CR-2 Required create values
- document_id must be selected before submit
- at least one source file must be uploaded before submit
- each uploaded file creates a Source linked to the selected Document
- each created Source is linked to the new Job through JobSource
CR-3 Source ordering behavior
- Given multi-file or folder upload
- When source records are created
- Then page ordering follows alphabetical order of original filenames
- Then helper text explains how filename conventions control ordering
CR-4 Provider/model/prompt visibility
- provider, model, and prompt_name are visible in create flow when known
- provider, model, and prompt_name are visible in detail flow when known
- if values are unknown at create time, UI shows clear unknown or pending state without blocking submit
CR-5 Successful create outcome
- Given valid inputs
- When the user submits create
- Then the Job record is created and linked to selected Document
- Then source and JobSource records are created for uploads
- Then job status is queued or processing based on execution timing
- Then the user is routed to Job detail mode
CR-6 Create failure outcome
- Given create validation or persistence failure
- Then clear error feedback is shown
- Then no false success feedback is shown
- Then entered selections are preserved where possible
- Then retry path remains available
Read Acceptance Criteria
RD-1 Jobs list retrieval
- Given one or more jobs exist
- When the user opens the Jobs page
- Then all jobs are listed in a table or equivalent list surface
RD-2 Jobs list fields
- Jobs list shows job id
- Jobs list shows status
- Jobs list shows created or updated timestamps
- Jobs list shows retry_count when available
- Jobs list provides navigation to Job detail for each row
RD-3 Job detail retrieval
- Given a valid job id
- When the user opens Job detail
- Then job metadata for that record only is shown
- Then document-scoped navigation links for Sources and Jobs are shown
RD-4 Detail execution context visibility
- provider, model, and prompt_name are displayed when known
- status lifecycle value is visible
- source-level transcription and revision context remains deferred in the current UI
RD-5 Missing and invalid id states
- Given an invalid job id format
- Then UI shows invalid job id state without crashing
- Given a valid but nonexistent job id
- Then UI shows job not found state without crashing
Update Acceptance Criteria
UP-1 Revision edit entry
- Given a job detail page
- When the user opens the page
- Then document-scoped navigation links are available
UP-2 Revision validation
- source revision editing remains deferred in the current UI
UP-3 Successful revision save
- deferred until the source revision UI is restored
UP-4 Revision save failure
- deferred until the source revision UI is restored
UP-5 Job lifecycle state update visibility
- status changes from queued to processing to terminal states are reflected in UI
- retry_count updates are reflected when retry logic runs
- users cannot directly edit lifecycle state fields in first release
Delete Acceptance Criteria
DL-1 Delete entry and confirmation
- job deletion is deferred in the current UI
DL-2 Dependency guardrails
- deferred until a job delete flow is reintroduced
DL-3 Blocked delete behavior
- deferred until a job delete flow is reintroduced
DL-4 Successful delete
- deferred until a job delete flow is reintroduced
DL-5 Delete failure
- deferred until a job delete flow is reintroduced
Cross-Criteria Quality Gates
QG-1 Separation of intent and implementation
- UX intent remains in user-journey.md
- Current versus target implementation mapping remains in schema-mapping.md
QG-2 Traceability
- Each accepted behavior maps to at least one UI action or service path
- No acceptance criterion contradicts first-release deferred items
QG-3 First-release constraints
- Jobs page remains list-all with explicit Create job action
- Job create requires Document selection and source upload
- provider/model/prompt_name are visible to users when known
- manual retry controls may remain deferred while status visibility is required