Skip to content

Intent, processing and receipts

Background work separates an admitted intention from processing attempts and a confirmed result. An interactive request can save a record or enqueue work while the requested external outcome remains pending. The owning workflow’s identity, version and receipt determine completion; there is no universal completed state that means the same thing for every queue.

Work Durable intent/attempt Outcome that must be checked
AP bookkeeping Approved frozen snapshot, export claim and local connector command Expected provider reference, command state and verified readback
Approved-time handoff Approved time snapshot and payroll outbox Handoff receipt; not payroll execution or payment
Mail intake Attested binding/checkpoint and leased copy/interpretation job Verified copy or current candidate update matching source/version
Customer notification Durable notification with attempt/backoff state Workflow’s provider submission/result evidence; not customer acknowledgement
Import schedule Enabled due schedule and its import run Source/target reconciliation for that run; a scan tick alone is insufficient

The transaction reference identifies atomic claims and mutations. External recovery owns uncertain provider results. A database transaction can preserve a valid intention without making a network send or object transfer atomic with that transaction.

Workers can claim bounded batches so two processors do not intentionally execute the same live lease. AP export work has claim identity and stale-claim recovery; unified mail uses binding and job leases with source/version-checked completion. The mail worker’s reviewed binding lease is 1,800 seconds and job lease 600 seconds. A late processor must satisfy the current lease and candidate predicates before writing its result. Process-local overlap locks complement those durable rules.

A retryable read, postponed budget job and unknown write result are different. The mail worker treats recognized deferred conditions, such as exhausted daily AI budget or an unverified copy, separately from malformed input and provider failure. AP commands with ambiguous acceptance move to reconciliation rather than being resubmitted with a new identity. Customer notifications have their own bounded attempts/backoff, not the mail-intake queue’s policy.

Historical replay must suppress new notification intent for old facts. A paused worker is not a substitute for that rule: an incorrectly queued event can create a real effect when processing resumes.

Mail source progress records observed and through-sequence information plus coverage. Incomplete originals/attachments can keep the durable checkpoint eligible for a later retry. A projected row may therefore exist while generation completion remains partial. Originals owns that coverage.

Technical artifacts can also precede business completion: an encrypted copy, uploaded attachment or saved model response can exist without a confirmed routed invoice. Storage transfer, domain transaction and provider command have separate failure boundaries. Do not delete all intermediate artifacts or mark every job successful to make the queue look empty.

Synthetic Export A is claimed and its connector POST times out. The request may have been accepted. Retain the local key/command identity and inspect the current external state. An API process restart or a fresh heartbeat supplies no evidence about whether bookkeeping occurred.

Synthetic Candidate B has a verified original but its interpretation budget is full. That can be a safe deferred business item during a successfully completed worker tick. Authorized manual classification may still progress it under the candidate’s source/version checks. Conversely, an enabled scheduler whose claim query fails on every tick is not healthy completed work.

Use durable operation/event/receipt identity to explain progress. A timestamp can mean attempted, leased, observed or completed; read the field’s owner before using it as success. Inspect the current error category and retry eligibility, not just queue length. Stalled work gives the ordered diagnostic path. The PR records tests with substituted providers and any reused SQL evidence; this source review performs no queue mutation, real send or financial approval and does not promise exactly-once external effects.