feat(orchestration): VeriMAP predicate gate, cascade abort defense, interop spec#3097
Merged
feat(orchestration): VeriMAP predicate gate, cascade abort defense, interop spec#3097
Conversation
8d3dfa6 to
1020e72
Compare
…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.
…, fix broken rustdoc links
26f77fc to
03937d6
Compare
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
TaskGraph; predicate gate indag::ready_tasks()blocks downstream dispatch until LLM-evaluated criterion passes; failure triggers replan via dedicatedmax_predicate_replansbudget;ContentSanitizerprevents prompt injection; timeout guard prevents scheduler hanglineage_chainsside-table inDagSchedulertracks consecutive error chains;CascadeAbortDetectoraborts DAG on N-deep failure chain; full lineage inOrchestrationError::CascadeAbortedspecs/045-interop-protocol-gaps/spec.mdwith MCP/ACP/A2A/ANP capability matrix; ANP deferred P4; ACP 0.10 confirmed, re-negotiation UnverifiedNew config fields
verify_predicate_enabledfalsemax_predicate_replans2predicate_provider""predicate_timeout_secs30cascade_chain_threshold3cascade_failure_rate_abort_threshold0.0lineage_ttl_secs3600Test plan
cargo nextest run --workspace --lib --bins)LlmPlannerprompt assembly and newchat_typed::<EvalResponse>call. Runcargo run --features full -- --config .local/config/testing.tomland verify multi-turn prompt + tool call round-trip, no 400/422 errors, debug dump shows well-formedmessagesarray.Related
CascadeDetector::descendant_countforward-adjacency cache)