Skip to content

Conversation

@Aaron1011
Copy link
Member

@Aaron1011 Aaron1011 commented Jan 22, 2026

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 Durable client instead of raw pool/queue/registry, simplifying APIs and reusing client logic.

  • TaskContext now stores Durable and uses it for DB ops, telemetry fields, and spawn_by_name (checkpoint-wrapped), injecting parent_task_id for cascade cancellation/trace trees
  • Worker accepts/clones Durable, uses it for claiming/executing tasks, registry lookups, metrics, and pool access; start path simplified
  • Durable adds clone_inner, exposes registry(), switches pool ownership to AtomicBool, and serializes parent_task_id via spawn options
  • New TaskError::SubtaskSpawnFailed with JSON serialization; SpawnOptions gains crate-private parent_task_id
  • Tests updated to new spawn/options patterns (mutable defaults) and refactored APIs

Written by Cursor Bugbot for commit e8e42f3. This will update automatically on new commits. Configure here.

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
@Aaron1011 Aaron1011 marked this pull request as ready for review January 22, 2026 21:38
cursor[bot]

This comment was marked as outdated.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@Aaron1011 Aaron1011 added this pull request to the merge queue Jan 23, 2026
Merged via the queue into main with commit b779f5a Jan 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants