Refactor TaskContext to hold and use a Durable client #62
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We now delegate to the existing 'spawn_by_name' (wrapping it in a checkpoint in TaskContext). This lets us re-use all of the existing logic, including the OpenTelemetry context propagation logic. This will give us a tree structure in OpenTelemetry - subtasks will use their parent task as the parent trace
Note
Modernizes task execution plumbing to flow a
Durableclient instead of raw pool/queue/registry, simplifying APIs and reusing client logic.Durableand uses it for DB ops, telemetry fields, andspawn_by_name(checkpoint-wrapped), injectingparent_task_idfor cascade cancellation/trace treesDurable, uses it for claiming/executing tasks, registry lookups, metrics, and pool access; start path simplifiedclone_inner, exposesregistry(), switches pool ownership toAtomicBool, and serializesparent_task_idvia spawn optionsTaskError::SubtaskSpawnFailedwith JSON serialization;SpawnOptionsgains crate-privateparent_task_idWritten by Cursor Bugbot for commit e8e42f3. This will update automatically on new commits. Configure here.