Skip to content

release: v0.5.0 - #40

Merged
stav121 merged 1 commit into
mainfrom
release/v0.5.0
Aug 24, 2026
Merged

stav121 merged 1 commit into
mainfrom
release/v0.5.0

Conversation

@stav121

@stav121 stav121 commented Aug 24, 2026

Copy link
Copy Markdown
Owner

BREAKING: task steps now receive a TaskContext. The step-closure signature changed from FnMut() -> Future to FnMut(TaskContext) -> Future; add a parameter to every step (use |_ctx| to ignore it). Lifecycle callbacks (on_success/on_failure/on_finish) are unchanged.

  • Added TaskContext, handed to every step for each attempt: identity (task_id, task_name, run_id, step_index, attempt), a task-level Blackboard (ctx.blackboard()), and a fresh per-run store (ctx.run_store()) for XCom-like step-to-step data flow within a run (B-ergo-2)
  • Added TaskBuilder::blackboard(...) to attach a shared task-level blackboard (defaults to a fresh, empty one)
  • Added TaskSpawner (via TaskScheduler::spawner) for adding tasks to a running scheduler: spawn() is fire-and-forget, spawn_get_id() awaits the assigned id or a duplicate-name/execution error; requests are drained each scheduler round
  • Observable/controllable registry is now populated at add_task time, so a SchedulerHandle can observe and control tasks before run() is called, not only mid-round
  • Exported TaskContext and TaskSpawner from the crate root
  • Migrated all existing steps, doctests and the 10 bundled examples to the new |_ctx| signature; added examples/context_and_spawner.rs (per-run store handoff, task-level blackboard across runs, runtime task injection)
  • Added unit and doctests (96 unit + 49 doctests by default; 98 unit + 49 doctests with --features serde); clippy --all-targets, fmt and cargo doc -D warnings clean
  • Updated README (new "Step context and data flow" and "Adding tasks at runtime" sections, 0.4->0.5 migration notes) and lib.rs Highlights
  • Bumped version to 0.5.0

BREAKING: task steps now receive a TaskContext. The step-closure signature changed from FnMut() -> Future to FnMut(TaskContext) -> Future; add a parameter to every step (use |_ctx| to ignore it). Lifecycle callbacks (on_success/on_failure/on_finish) are unchanged.

- Added TaskContext, handed to every step for each attempt: identity (task_id, task_name, run_id, step_index, attempt), a task-level Blackboard (ctx.blackboard()), and a fresh per-run store (ctx.run_store()) for XCom-like step-to-step data flow within a run (B-ergo-2)
- Added TaskBuilder::blackboard(...) to attach a shared task-level blackboard (defaults to a fresh, empty one)
- Added TaskSpawner<T> (via TaskScheduler::spawner) for adding tasks to a running scheduler: spawn() is fire-and-forget, spawn_get_id() awaits the assigned id or a duplicate-name/execution error; requests are drained each scheduler round
- Observable/controllable registry is now populated at add_task time, so a SchedulerHandle can observe and control tasks before run() is called, not only mid-round
- Exported TaskContext and TaskSpawner from the crate root
- Migrated all existing steps, doctests and the 10 bundled examples to the new |_ctx| signature; added examples/context_and_spawner.rs (per-run store handoff, task-level blackboard across runs, runtime task injection)
- Added unit and doctests (96 unit + 49 doctests by default; 98 unit + 49 doctests with --features serde); clippy --all-targets, fmt and cargo doc -D warnings clean
- Updated README (new "Step context and data flow" and "Adding tasks at runtime" sections, 0.4->0.5 migration notes) and lib.rs Highlights
- Bumped version to 0.5.0
@stav121 stav121 added the enhancement New feature or request label Aug 24, 2026
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.78378% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.93%. Comparing base (b39e1fc) to head (bd66e7c).

Files with missing lines Patch % Lines
src/task.rs 80.95% 8 Missing ⚠️
src/scheduler.rs 85.18% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #40      +/-   ##
==========================================
+ Coverage   76.46%   76.93%   +0.47%     
==========================================
  Files           7        7              
  Lines         684      750      +66     
==========================================
+ Hits          523      577      +54     
- Misses        161      173      +12     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stav121
stav121 merged commit d8c1ae2 into main Aug 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant