Skip to content

feat(orchestration): TaskGraph core types, DAG operations, persistence (Phase 1, #1235)#1249

Merged
bug-ops merged 2 commits intomainfrom
task-orchestration-phase1
Mar 5, 2026
Merged

feat(orchestration): TaskGraph core types, DAG operations, persistence (Phase 1, #1235)#1249
bug-ops merged 2 commits intomainfrom
task-orchestration-phase1

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

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

Summary

Implements Phase 1 of the Task Orchestration epic (#1235), delivering core types, DAG algorithms, and SQLite persistence for task graphs. Closes #1236.

  • Core types: TaskGraph, TaskNode, TaskId, GraphId, TaskStatus (7 variants), GraphStatus (6 variants), FailureStrategy (4 variants), TaskResult
  • DAG algorithms: validate (structure + cycle detection via Kahn's), toposort, ready_tasks (idempotent), propagate_failure (Abort/Skip/Retry/Ask with BFS transitive propagation)
  • Persistence: RawGraphStore trait in zeph-memory (raw JSON), GraphPersistence<S> typed wrapper in zeph-core, SqliteGraphStore implementation, migration 022_task_graphs.sql
  • Config: [orchestration] TOML section with enabled, max_tasks, max_parallel, default_failure_strategy, default_max_retries, task_timeout_secs
  • Feature flag: orchestration (optional, included in full)

Key design decisions

  • Circular dependency avoided: RawGraphStore operates on opaque JSON strings in zeph-memory; zeph-core handles typed serialization via GraphPersistence<S>
  • JSON blob persistence (single task_graphs table) — simpler for MVP, per-node queries deferred to Phase 3
  • max_tasks enforced in validate(), goal length capped at 1024 chars
  • FailureStrategy::FromStr + OrchestrationConfig::failure_strategy() for validated config parsing
  • ISO-8601 timestamps consistent with codebase

Stats

  • 21 files changed, +1760 lines
  • 53 new tests (4174 total), all passing
  • fmt, clippy, nextest all green

Test plan

  • cargo +nightly fmt --check
  • cargo clippy --workspace --features full -- -D warnings
  • cargo nextest run --workspace --features full --lib --bins (4174 passed)
  • cargo check --workspace (compiles without orchestration feature)
  • Validated by: testing engineer, performance engineer, security auditor, implementation critic, code reviewer

bug-ops added 2 commits March 5, 2026 23:07
…e (Phase 1, #1235) (#1236)

Add task orchestration module with core types (TaskGraph, TaskNode, TaskId,
GraphId, TaskStatus, GraphStatus, FailureStrategy, TaskResult), DAG algorithms
(validate, toposort, ready_tasks, propagate_failure), OrchestrationConfig,
OrchestrationError, and SQLite persistence via RawGraphStore/GraphPersistence.

All code feature-gated under `orchestration` (optional, included in `full`).
Migration 022_task_graphs.sql with JSON blob persistence. 53 new tests.
@github-actions github-actions bot added enhancement New feature or request size/XL Extra large PR (500+ lines) documentation Improvements or additions to documentation memory zeph-memory crate (SQLite) rust Rust code changes core zeph-core crate dependencies Dependency updates labels Mar 5, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 5, 2026 22:11
@bug-ops bug-ops merged commit 5a7ec31 into main Mar 5, 2026
28 checks passed
@bug-ops bug-ops deleted the task-orchestration-phase1 branch March 5, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate dependencies Dependency updates documentation Improvements or additions to documentation enhancement New feature or request memory zeph-memory crate (SQLite) rust Rust code changes size/XL Extra large PR (500+ lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(orchestration): Phase 1 — TaskGraph core types, DAG operations, persistence

1 participant