Define customer-visible report states and overload responses
The API returns accepted for jobs that may wait indefinitely, so customers repeatedly click generate.
- Focused work estimate
- 2h 30m + prerequisites
- Priority in the scenario
- Medium
- Engineering practice
- API design · State modeling
Estimated field mix
- API design50%
- System design30%
- Backend20%
Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.
Review it, then add it to your workspace.
The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.
Project context
A fictional analytics product lets customers schedule expensive reports at the top of the hour. The API remains available only if report work is admitted and cancelled predictably.
Setup prerequisites
- Create a local scheduler model and synthetic report jobs.
- Use fake execution providers; no customer queries or candidate code run on worker hosts.
Preceding work
Complete these dependencies, or supply their agreed outputs before taking this ticket.
Acceptance criteria
- Distinguish rejected, queued, running and terminal states.
- Specify bounded queue age and a retryable admission response.
- Define what acceptance durably guarantees.
Implementation constraints
- Use explicit state transitions and stable job identities.
Verification to include
- Trace an admitted report to its durable queue state.
- Reject an over-capacity request without creating a phantom report.
Deliverables
- Admission response contract and state table
Rollout and recovery
Review the contract before accepting schedules; keep overload behavior explicit in the prototype.
Value of the work
For the engineer: Practice workload modeling, fairness and cancellation architecture.
For the team: Review controllable operating costs and predictable customer-facing overload behavior.
Evidence boundaries
Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.
Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.