Skip to content

feat(orchestration): count tasks completed before cancellation in metrics#1690

Merged
bug-ops merged 3 commits intomainfrom
feat/issue-1612/count-tasks-completed
Mar 13, 2026
Merged

feat(orchestration): count tasks completed before cancellation in metrics#1690
bug-ops merged 3 commits intomainfrom
feat/issue-1612/count-tasks-completed

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 13, 2026

Summary

  • In finalize_plan_execution(), the GraphStatus::Canceled arm computed done_count but never called update_metrics(), leaving tasks_completed under-reported when a plan was canceled mid-execution.
  • Added self.update_metrics(|m| m.orchestration.tasks_completed += done_count as u64) in the Canceled arm, mirroring the Completed arm.
  • Updated the COV-02 test to assert the metric is incremented via a watch::channel receiver.

Test plan

  • cargo nextest run -p zeph-core -E 'test(finalize_plan_execution_canceled)' passes
  • Full suite: cargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins — 5298 passed, 0 failed

Closes #1612

…rics

In finalize_plan_execution(), the GraphStatus::Canceled arm already
computed done_count but never passed it to update_metrics(). This caused
tasks_completed to be under-reported when a plan was canceled mid-execution.

Mirrors the Completed arm: calls update_metrics(|m| m.orchestration.tasks_completed
+= done_count as u64) immediately after computing done_count.

Updated COV-02 test to assert the metric is incremented via a watch channel
receiver.

Closes #1612
@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate enhancement New feature or request size/S Small PR (11-50 lines) labels Mar 13, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 13, 2026 21:15
@bug-ops bug-ops merged commit 4c1751a into main Mar 13, 2026
15 checks passed
@bug-ops bug-ops deleted the feat/issue-1612/count-tasks-completed branch March 13, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/S Small PR (11-50 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: count tasks completed before cancellation in orchestration metrics

1 participant