feat(orchestration): TaskGraph core types, DAG operations, persistence (Phase 1, #1235)#1249
Merged
feat(orchestration): TaskGraph core types, DAG operations, persistence (Phase 1, #1235)#1249
Conversation
…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.
…ase1 # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Implements Phase 1 of the Task Orchestration epic (#1235), delivering core types, DAG algorithms, and SQLite persistence for task graphs. Closes #1236.
TaskGraph,TaskNode,TaskId,GraphId,TaskStatus(7 variants),GraphStatus(6 variants),FailureStrategy(4 variants),TaskResultvalidate(structure + cycle detection via Kahn's),toposort,ready_tasks(idempotent),propagate_failure(Abort/Skip/Retry/Ask with BFS transitive propagation)RawGraphStoretrait in zeph-memory (raw JSON),GraphPersistence<S>typed wrapper in zeph-core,SqliteGraphStoreimplementation, migration022_task_graphs.sql[orchestration]TOML section withenabled,max_tasks,max_parallel,default_failure_strategy,default_max_retries,task_timeout_secsorchestration(optional, included infull)Key design decisions
RawGraphStoreoperates on opaque JSON strings in zeph-memory; zeph-core handles typed serialization viaGraphPersistence<S>task_graphstable) — simpler for MVP, per-node queries deferred to Phase 3max_tasksenforced invalidate(),goallength capped at 1024 charsFailureStrategy::FromStr+OrchestrationConfig::failure_strategy()for validated config parsingStats
Test plan
cargo +nightly fmt --checkcargo clippy --workspace --features full -- -D warningscargo nextest run --workspace --features full --lib --bins(4174 passed)cargo check --workspace(compiles without orchestration feature)