Skip to content

feat(orchestration): VeriMAP predicate gate, cascade abort defense, interop spec#3097

Merged
bug-ops merged 2 commits intomainfrom
orchestration-research
Apr 17, 2026
Merged

feat(orchestration): VeriMAP predicate gate, cascade abort defense, interop spec#3097
bug-ops merged 2 commits intomainfrom
orchestration-research

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Apr 17, 2026

Summary

New config fields

Field Default Purpose
verify_predicate_enabled false Enable predicate gate
max_predicate_replans 2 Predicate-specific replan budget
predicate_provider "" LLM provider for evaluation (falls back to main)
predicate_timeout_secs 30 Timeout for predicate LLM calls
cascade_chain_threshold 3 Consecutive errors before DAG abort
cascade_failure_rate_abort_threshold 0.0 Fan-out failure rate abort (opt-in)
lineage_ttl_secs 3600 Error lineage entry TTL

Test plan

  • 8134 tests pass (cargo nextest run --workspace --lib --bins)
  • clippy -D warnings clean on touched crates
  • fmt check clean
  • LLM serialization gate (required before merge): live API session test — PR touches LlmPlanner prompt assembly and new chat_typed::<EvalResponse> call. Run cargo run --features full -- --config .local/config/testing.toml and verify multi-turn prompt + tool call round-trip, no 400/422 errors, debug dump shows well-formed messages array.

Related

@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 Apr 17, 2026
@bug-ops bug-ops force-pushed the orchestration-research branch from 8d3dfa6 to 1020e72 Compare April 17, 2026 11:58
@bug-ops bug-ops enabled auto-merge (squash) April 17, 2026 12:21
@github-actions github-actions Bot added the tests Test-related changes label Apr 17, 2026
bug-ops added 2 commits April 17, 2026 14:35
…nterop spec

Implements three orchestration improvements:

**VeriMAP per-subtask verification predicates (#2269)**
- Add `verify_predicate: Option<VerifyPredicate>` and `predicate_outcome: Option<PredicateOutcome>`
  to `TaskGraph` nodes (`#[serde(default)]`, backward-compatible)
- Predicate gate in `dag::ready_tasks()`: blocks downstream dispatch until predicate resolves;
  failure triggers replan via dedicated `max_predicate_replans` budget (separate from `max_replans`)
- `SchedulerAction::VerifyPredicate` emitted idempotently each tick; in-flight dedup via HashSet
- `LlmPlanner` prompt updated to emit `verify_criteria` alongside `task_description`
- `ContentSanitizer` threaded into `PredicateEvaluator` to prevent prompt injection
- `tokio::time::timeout` wraps every predicate LLM call (`predicate_timeout_secs`, default 30s)
- New config fields: `verify_predicate_enabled`, `max_predicate_replans`, `predicate_provider`,
  `predicate_timeout_secs`

**Error cascade abort defense (#2407)**
- New `lineage.rs` module: `ErrorLineage`, `LineageEntry`, `LineageKind`, `classify_error`
- `CascadeDetector::evaluate_abort()` returns `AbortDecision`; new `cascade_failure_rate_abort_threshold`
- `DagScheduler::lineage_chains: HashMap<TaskId, ErrorLineage>` side-table (mirrors `cascade_detector`)
- Cascade abort on N consecutive chain errors: `OrchestrationError::CascadeAborted { root, chain }`
- Lineage entries pruned on task Completed + TTL-based retain on Failed insertion
- `inject_tasks()` resets lineage for affected tasks
- New config fields: `cascade_chain_threshold` (default 3), `cascade_failure_rate_abort_threshold`
  (default 0.0, opt-in), `lineage_ttl_secs`

**Agent interoperability protocol gap analysis (#2307)**
- New `specs/045-interop-protocol-gaps/spec.md`: capability matrix for MCP, ACP, A2A, ANP
  including capability re-negotiation row; protocol selection guidance; ANP deferred as P4
- Addendums to `specs/013-acp/spec.md` and `specs/014-a2a/spec.md` with positioning notes
- ACP 0.11.x capability re-negotiation marked Unverified; P3 follow-up documented in spec

Closes #2269, #2407, #2307.

NOTE: LLM serialization gate required before merge — PR touches LlmPlanner prompt assembly
and new `chat_typed::<EvalResponse>` path. Run live API session test per CLAUDE.md rules.
@bug-ops bug-ops force-pushed the orchestration-research branch from 26f77fc to 03937d6 Compare April 17, 2026 12:35
@bug-ops bug-ops merged commit 2aca051 into main Apr 17, 2026
32 checks passed
@bug-ops bug-ops deleted the orchestration-research branch April 17, 2026 12:41
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) tests Test-related changes

Projects

None yet

1 participant