Back to notes
The Tesseract MemoryTechnical note

What a queue claim readback actually proves

Reading the owner token back can catch an overwritten claim before processing, but recovery still needs to distinguish unfinished work from a completed stage whose save failed.

Topics

Choose work from job state and content state

The worker accepts scheduled or targeted requests and sets a run identity, batch size, retry limit and claim timeout. Selection excludes finished jobs and active claims. Retryable failures enter only when explicitly enabled or targeted.

A queue row isn't the whole story. The selector also checks for existing descriptions, prompts and the expected text file. An explicit revision request can reopen a package, but an ordinary run shouldn't treat completed content as missing merely because another stage failed.

Check ownership at the point of processing

The worker creates a token from owner, run and job IDs, upserts the job as in progress, and reads the row again. Context preparation requires both the matching token and expected state. If another claim overwrote the row before this read, the worker takes the failure path.

The write and read are still separate operations. The upsert doesn't require the previous owner or state, and another worker can act between them. Readback therefore detects one lost-ownership case; it doesn't provide an atomic reservation or an exactly-once guarantee.

Preserve what succeeded inside a failed job

Failure results include their step, code and retry or terminal flags. Attempt limits and validation, permission, authentication or schema errors affect the route, with terminal work offered review actions such as retry, hold and close.

A selected save failure can retain a completed description status. That gives the next decision useful information about what exists, without claiming that a repeated external operation is safe.

No concurrency test was run for this note. The optional image handoff also remains in the exports despite older README wording; it requires an explicit request and fails when its workflow isn't configured.

Job claim readback and failure routing

The worker writes a claim, then reads the owner back. Those are separate operations, so the readback isn't an atomic reservation.

Direct callAsync taskResponse / returnBlocked / denied
Worker logic
Data-table state
Processing and recovery

Scroll or drag the background to move. Use the zoom buttons to resize.Arrow keys move between components. Enter selects.

Choose a component to explore

Select a numbered component on the map or use the component menu. Its details and connections will appear here.

No component selected.

All connections (10)
  1. 01 · Normalized worker request02 · Job rowsquery candidates · Direct call
  2. 02 · Job rows03 · Eligibility selectorobserved rows · Response / return
  3. 03 · Eligibility selector04 · Claim upserteligible bounded batch · Direct call
  4. 04 · Claim upsert05 · Claimed row readbackwrite then query · Async task
  5. 05 · Claimed row readback06 · Expected owner still present?stored owner token · Response / return
  6. 06 · Expected owner still present?07 · Context and prompt stagesmatching owner · Direct call
  7. 06 · Expected owner still present?08 · Typed failure outcomeclaim lost · Blocked / denied
  8. 07 · Context and prompt stages08 · Typed failure outcomestage error · Response / return
  9. 08 · Typed failure outcome02 · Job rowsrecord retryable state · Direct call
  10. 08 · Typed failure outcome09 · Terminal review recordterminal review required · Async task