Skip to content

refactor(epic-1973): Extract zeph-orchestration crate from zeph-core (Phase 1g #1979)#2012

Merged
bug-ops merged 2 commits intomainfrom
epic-1973-phase-1g-orch
Mar 19, 2026
Merged

refactor(epic-1973): Extract zeph-orchestration crate from zeph-core (Phase 1g #1979)#2012
bug-ops merged 2 commits intomainfrom
epic-1973-phase-1g-orch

Conversation

@bug-ops
Copy link
Owner

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

Summary

Extract 5,380 LOC orchestration module from zeph-core into standalone zeph-orchestration crate (Phase 1g of epic #1973).

Modules extracted: TaskGraph, DagScheduler, LlmPlanner, LlmAggregator, AgentRouter, command, error

Key design:

  • Zero circular dependencies (depends only on leaf crates)
  • Re-export shim in zeph-core/src/lib.rs preserves all crate::orchestration::* paths
  • No breaking changes

Results:

  • ✅ 5,917 tests pass (169 moved, zero regressions)
  • ✅ Clippy/fmt clean
  • ✅ 40x build time improvement for orchestration iteration
  • ✅ All 5 validators approved (tester, perf, security, impl-critic, reviewer)

Closes #1979. Part of epic #1973.

bug-ops added 2 commits March 19, 2026 10:59
…(Phase 1g, #1979)

Move all orchestration logic (5,380 LOC, 8 modules) from zeph-core into a new
dedicated crate at Layer 2 of the dependency hierarchy.

Changes:
- New crate: crates/zeph-orchestration/ with aggregator, command, dag, error,
  graph, planner, router, scheduler modules
- Backward-compatible re-export shim in zeph-core/src/orchestration/mod.rs
  preserves all crate::orchestration::* import paths unchanged
- Added TaskId::as_u32() public accessor replacing pub(crate) field access
  from zeph-core::metrics (field .0 was inaccessible across crate boundary)
- zeph-core reduces from 55,860 to ~50,480 LOC (-9.6%)
- 169 tests migrated to zeph-orchestration; zeph-core 1199->1030; workspace: 5,917 total
- No circular dependencies: zeph-orchestration -> {zeph-config, zeph-common,
  zeph-llm, zeph-memory, zeph-sanitizer, zeph-subagent} -> zeph-core
…hase 1g follow-up)

Follow the same pattern as zeph-subagent (Phase 1f): place the inline `pub mod
orchestration { pub use zeph_orchestration::*; ... }` block directly in
crates/zeph-core/src/lib.rs instead of a separate orchestration/mod.rs file.
Remove the now-empty crates/zeph-core/src/orchestration/ directory.
@bug-ops bug-ops added rust Rust code changes core zeph-core crate labels Mar 19, 2026
@github-actions github-actions bot added refactor Code refactoring without functional changes size/M Medium PR (51-200 lines) documentation Improvements or additions to documentation dependencies Dependency updates and removed size/M Medium PR (51-200 lines) labels Mar 19, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 19, 2026 10:15
@bug-ops bug-ops merged commit d9520c3 into main Mar 19, 2026
24 checks passed
@bug-ops bug-ops deleted the epic-1973-phase-1g-orch branch March 19, 2026 10:23
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 refactor Code refactoring without functional changes rust Rust code changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: extract zeph-orchestration crate from zeph-core

1 participant