Back to notes
The Tesseract MemoryTechnical note

A valid worker secret isn't ownership of a render job

Quiet Lineage checks service access and claim ownership separately. Repeated handoffs also need the job's current state, because an active token isn't a one-use pass.

Topics

The dispatcher gives the worker a specific claim

The dispatcher checks capacity, sorts ready jobs by priority and age, and conditionally claims the expected ready row. It increments the attempt and saves the execution's token. The handoff carries that token with the job, post and shot IDs and prompt.

Payload parsing accepts an object or a JSON object string, but rejects arrays and other values. This gives the worker a defined request shape before it attempts to act on the claim.

Entry and updates answer different questions

The configured shared secret controls entry to the worker, with missing configuration treated as failure. The job ID and token then scope rendering and terminal updates to the claim supplied by the dispatcher. A valid service caller still needs that current claim.

Dispatch rollback adds a state check: the row must still be claimed under the same token. A late failure response therefore won't reset a row the worker has already moved into rendering.

A token can remain valid across two requests

The initial rendering update matches the job ID and token but doesn't require a status such as claimed. A second webhook carrying the same active token can reach that path again. This is a replay concern identified in the source, not an observed duplicate provider render.

The worker goes on to poll, check the download, save it to Drive, persist the asset, enqueue QA and record success. I'd repeat the handoff during those steps and simulate a lost response after acceptance. Each update needs both the right owner and a state that still permits the transition.

Claim ownership across dispatcher and worker

Service authentication protects entry; job ID and token scope state writes on both success and recovery paths.

Direct callAsync taskBlocked / denied
Queue ownership
Dispatch boundary
Worker completion

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 (11)
  1. 01 · Job record02 · Capacity and orderingReady and in-flight rows · Direct call
  2. 02 · Capacity and ordering03 · Conditional claimCandidate jobs · Direct call
  3. 03 · Conditional claim01 · Job recordClaimed + token · Direct call
  4. 03 · Conditional claim04 · Authenticated webhookWebhook payload · Async task
  5. 04 · Authenticated webhook05 · Worker rendering transitionAuthenticated request · Direct call
  6. 05 · Worker rendering transition01 · Job recordToken-scoped rendering write · Direct call
  7. 05 · Worker rendering transition06 · Persist artifact and enqueue QAProvider result · Direct call
  8. 06 · Persist artifact and enqueue QA07 · Token-scoped terminal writeStored artifact + QA job · Direct call
  9. 07 · Token-scoped terminal write01 · Job recordTerminal state · Direct call
  10. 03 · Conditional claim08 · Dispatch-failure recoveryHandoff failure · Blocked / denied
  11. 08 · Dispatch-failure recovery01 · Job recordRestore owned claim · Direct call