noCV
QUEUE-103 · Account for accepted work

Commit job acceptance and dispatch intent together

Practice briefBugAdvanced

The portal returns 202 after storing a job, then loses Redis connectivity before enqueueing it. The job stays QUEUED forever with no delivery attempt.

Focused work estimate
3h 30m + prerequisites
Priority in the scenario
High
Engineering practice
Transactional outbox · Durable acceptance · Idempotency

Estimated field mix

  • Distributed systems40%
  • Database engineering30%
  • Platform engineering30%

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

Pattern topics

  • Transactional OutboxApply

    Commit acceptance and dispatch intent in one transaction, then demonstrate recovery after the queue is unavailable or the process stops before dispatch.

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

Complete these dependencies, or supply their agreed outputs before taking this ticket.

Acceptance criteria

  • Commit accepted job records and durable dispatch intents atomically.
  • Dispatch retries use deterministic job identities.
  • A failed database transaction cannot return accepted status.

Implementation constraints

  • Queue messages contain identifiers and bounded metadata, not document bytes.

Verification to include

  • Lose Redis after acceptance and recover every job when dispatch resumes.
  • Fail the database commit and assert neither job nor dispatch intent exists.

Deliverables

  • Outbox-backed acceptance and recovery reproduction

Rollout and recovery

Drain synthetic pending intents through the new dispatcher; pause dispatch without deleting accepted work to rollback.

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.