noCV
QUEUE-101 · Account for accepted work

Expose a document job's current phase and terminal reason

Practice briefStoryFoundational

The portal shows Processing for both queued and permanently rejected documents. Support cannot tell whether a file is waiting, rendering, or never going to finish.

Focused work estimate
1h 30m + prerequisites
Priority in the scenario
Medium
Engineering practice
State projection · Tenant isolation · API design

Estimated field mix

  • API design40%
  • Platform engineering30%
  • Backend30%

Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.

Your next step

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 internal document portal creates previews through a trusted mock renderer. Large batches crowd out small teams, failed documents retry forever, and operators lack a safe replay command. This exercise never executes uploaded code or real document macros.

Setup prerequisites

  • Queue semantics
  • Database transactions
  • Operational metrics

Preceding work

No earlier ticket is required. Complete the project setup above.

Acceptance criteria

  • Expose QUEUED, RUNNING, SUCCEEDED, FAILED, and CANCELLED through an allowlisted projection.
  • Include a stable terminal reason code and last transition time.
  • Deny jobs owned by another tenant.

Implementation constraints

  • Only service transition methods may update lifecycle state; logs are not the source of truth.

Verification to include

  • Read queued and failed fixture jobs with distinct explanations.
  • Reject foreign-tenant lookup and ensure renderer payloads are absent.

Deliverables

  • Job status contract and authorized read endpoint

Rollout and recovery

Switch status reads for synthetic jobs first; retain historical transition records if the view is reverted.

Value of the work

For the engineer: Practice asynchronous lifecycle control, fair scheduling, bounded retries, and artifact recovery with a deterministic provider.

For the team: See how an engineer accounts for accepted work and reduces operational toil without granting operators broad data access.

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.