Skip to content

feat(tools,orchestration): utility-guided tool dispatch and cascade-aware DAG routing#2470

Merged
bug-ops merged 1 commit intomainfrom
feat/issue-2424/utility-guided-orchestration
Mar 30, 2026
Merged

feat(tools,orchestration): utility-guided tool dispatch and cascade-aware DAG routing#2470
bug-ops merged 1 commit intomainfrom
feat/issue-2424/utility-guided-orchestration

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

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

Summary

Changes

  • crates/zeph-tools/src/utility.rs — new UtilityScorer with interior mutability (21 unit tests)
  • crates/zeph-orchestration/src/cascade.rs — new CascadeDetector with bounded region health map (14 unit tests)
  • crates/zeph-orchestration/src/topology.rsTreeOptimized/CascadeAware variants, merged strategy selection method
  • crates/zeph-orchestration/src/scheduler.rs — cascade integration in tick(), inject_tasks() reset, Sequential exclusion
  • crates/zeph-core/src/agent/tool_execution/native.rs — utility gate at tool dispatch
  • crates/zeph-tools/src/config.rsUtilityScoringConfig with startup validation
  • crates/zeph-config/src/experiment.rscascade_routing, cascade_failure_threshold, tree_optimized_dispatch fields

Test plan

  • cargo +nightly fmt --check — clean
  • cargo clippy --workspace --features full --lib --bins -- -D warnings — zero warnings
  • cargo nextest run --workspace --features full --lib --bins — 6810 passed, 15 skipped
  • Security audit: fail-closed behavior verified, user_requested bypass restricted to explicit user commands only, config rejects negative weights
  • All 11 High/Medium critique findings addressed and verified in code

…ware DAG routing (#2424, #2425)

Utility-guided tool dispatch (zeph-tools, zeph-core):
- Add UtilityScorer in zeph-tools/src/utility.rs scoring tool calls on
  estimated gain, step cost, redundancy, and uncertainty
- Insert utility gate in tool_execution/native.rs: fail-closed on scoring
  errors, LLM-requested tools always go through the gate
- Config: [tools.utility] enabled, threshold, and per-signal weights with
  startup validation rejecting negative and non-finite values
- 21 unit tests covering edge cases, fail-closed behavior, and turn reset

Cascade-aware DAG routing (zeph-orchestration):
- Add CascadeDetector in zeph-orchestration/src/cascade.rs tracking
  per-region failure rates with bounded region_health map
- Extend TopologyClassifier with TreeOptimized and CascadeAware dispatch
  strategy variants; merge strategy() and strategy_with_config() into
  single method
- Integrate cascade reordering in DagScheduler::tick(); Sequential tasks
  skipped from reordering; region health reset on inject_tasks()
- Config: [orchestration] cascade_routing, cascade_failure_threshold,
  tree_optimized_dispatch; cascade_routing requires topology_selection=true
- 14 unit tests covering inject_tasks reset, sequential exclusion, and
  config guard

Closes #2424, #2425
@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/XL Extra large PR (500+ lines) labels Mar 30, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 30, 2026 20:42
@bug-ops bug-ops merged commit 91c6cae into main Mar 30, 2026
27 checks passed
@bug-ops bug-ops deleted the feat/issue-2424/utility-guided-orchestration branch March 30, 2026 20:49
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/XL Extra large PR (500+ lines)

Projects

None yet

1 participant