generated from john/python-template
5.6 KiB
5.6 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 source preview or source warning state is 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 is visible
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 with source context
- When the user enters revision edit flow
- Then revised_text input is available
UP-2 Revision validation
- revised_text cannot be saved as empty after trimming
- Warning feedback is shown for invalid empty input
UP-3 Successful revision save
- Given valid revision text
- When the user saves
- Then revised_text persists
- Then success feedback is shown
- Then refreshed revision content is visible
UP-4 Revision save failure
- Given backend failure during revision save
- Then clear error feedback is shown
- Then the user-entered text remains available for retry where possible
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
- Given a job detail context with delete affordance
- When the user selects delete job
- Then a permanent-action confirmation dialog appears
DL-2 Dependency guardrails
- If deletion policy requires retention handling for related JobSource history, delete is blocked
- If deletion policy allows dependent cleanup path, delete can proceed
DL-3 Blocked delete behavior
- When blocked
- Then UI explains dependency constraints
- Then UI provides cleanup guidance
DL-4 Successful delete
- Given no blocking dependencies
- When the user confirms deletion
- Then job is removed
- Then success feedback is shown
- Then the user returns to Jobs list
DL-5 Delete failure
- Given backend failure during delete
- Then clear error feedback is shown
- Then the user remains in Job context with retry path
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