Conversation
…fy-Replan (#2219, #2202) Add topology-aware DAG dispatch and verification-driven replanning to zeph-core orchestration. Topology-routing (#2219): - Extend TopologyClassifier with FanIn and Hierarchical topology variants - Add DispatchStrategy enum: FullParallel, Sequential, LevelBarrier, Adaptive - Replace suggest_max_parallel() with analyze() returning full TopologyAnalysis including per-task depths as HashMap<TaskId, usize> - DagScheduler uses LevelBarrier dispatch for hierarchical graphs; topology_dirty flag defers re-analysis to tick start after inject_tasks() Plan-Execute-Verify-Replan (#2202): - Add PlanVerifier<P: LlmProvider> in verifier.rs with verify() and replan() - VerificationResult with structured Gap list and GapSeverity (Critical/Important/Minor) - Fail-open on LLM error; consecutive failure tracking with ERROR log at >=3 failures - SchedulerAction::Verify emitted when verify_completeness=true; budget enforced only in inject_tasks() (not in emission gate) - Per-task replan caps (HashMap<TaskId, u32>) and global max_replans counter - LevelBarrier current_level reset to min(current, shallowest_non_terminal_depth) after dirty re-analysis to prevent injected tasks from being silently skipped - New config: verify_provider, verify_max_tokens, max_replans, verify_completeness with --migrate-config support Breaking: suggest_max_parallel() removed; use analyze().max_parallel instead. Closes #2219, #2202
b54af60 to
a84db0e
Compare
bug-ops
added a commit
that referenced
this pull request
Mar 28, 2026
#2252) Activate the existing PlanVerifier skeleton with per-task and whole-plan verification gates, a completeness_threshold config field, and a single-cycle gap-filling replan loop based on the VMAO paper (arXiv:2603.11445). - Add completeness_threshold: f32 (default 0.7) to OrchestrationConfig with sanitizer clamping to [0.0, 1.0] and startup validation - Add verify_plan() for whole-plan verification after DagScheduler completion - Add replan_from_plan() generating root TaskNodes for plan-level gaps - Wire SchedulerAction::Verify handler in agent loop (was a no-op since #2235) - Add whole-plan verification step between Done{Completed} and aggregation - Partial replan DAG runs in a separate DagScheduler with max_replans=0 and verify_completeness=false to prevent recursive loops (INV-2) - Partial DAG outputs merged with original task outputs before aggregation - Output truncated to verify_max_tokens*4 chars before verify_plan() call - GapSeverity implements Display returning lowercase names consistent with serde snake_case serialization and LLM system prompt expectations - All LLM error paths are fail-open: verify returns complete=true, replan returns empty Vec, whole-plan verify returns None - 25 new unit tests across verifier.rs and experiment.rs - verify_completeness = false by default; no behavior change when disabled Closes #2252
5 tasks
bug-ops
added a commit
that referenced
this pull request
Mar 28, 2026
#2252) Activate the existing PlanVerifier skeleton with per-task and whole-plan verification gates, a completeness_threshold config field, and a single-cycle gap-filling replan loop based on the VMAO paper (arXiv:2603.11445). - Add completeness_threshold: f32 (default 0.7) to OrchestrationConfig with sanitizer clamping to [0.0, 1.0] and startup validation - Add verify_plan() for whole-plan verification after DagScheduler completion - Add replan_from_plan() generating root TaskNodes for plan-level gaps - Wire SchedulerAction::Verify handler in agent loop (was a no-op since #2235) - Add whole-plan verification step between Done{Completed} and aggregation - Partial replan DAG runs in a separate DagScheduler with max_replans=0 and verify_completeness=false to prevent recursive loops (INV-2) - Partial DAG outputs merged with original task outputs before aggregation - Output truncated to verify_max_tokens*4 chars before verify_plan() call - GapSeverity implements Display returning lowercase names consistent with serde snake_case serialization and LLM system prompt expectations - All LLM error paths are fail-open: verify returns complete=true, replan returns empty Vec, whole-plan verify returns None - 25 new unit tests across verifier.rs and experiment.rs - verify_completeness = false by default; no behavior change when disabled Closes #2252
bug-ops
added a commit
that referenced
this pull request
Mar 28, 2026
#2252) (#2346) Activate the existing PlanVerifier skeleton with per-task and whole-plan verification gates, a completeness_threshold config field, and a single-cycle gap-filling replan loop based on the VMAO paper (arXiv:2603.11445). - Add completeness_threshold: f32 (default 0.7) to OrchestrationConfig with sanitizer clamping to [0.0, 1.0] and startup validation - Add verify_plan() for whole-plan verification after DagScheduler completion - Add replan_from_plan() generating root TaskNodes for plan-level gaps - Wire SchedulerAction::Verify handler in agent loop (was a no-op since #2235) - Add whole-plan verification step between Done{Completed} and aggregation - Partial replan DAG runs in a separate DagScheduler with max_replans=0 and verify_completeness=false to prevent recursive loops (INV-2) - Partial DAG outputs merged with original task outputs before aggregation - Output truncated to verify_max_tokens*4 chars before verify_plan() call - GapSeverity implements Display returning lowercase names consistent with serde snake_case serialization and LLM system prompt expectations - All LLM error paths are fail-open: verify returns complete=true, replan returns empty Vec, whole-plan verify returns None - 25 new unit tests across verifier.rs and experiment.rs - verify_completeness = false by default; no behavior change when disabled Closes #2252
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
TopologyClassifierwithFanIn/Hierarchicalvariants andDispatchStrategyenum; replacesuggest_max_parallel()withanalyze()returning fullTopologyAnalysis;DagSchedulerusesLevelBarrierdispatch for hierarchical graphs with deferred topology re-analysis viatopology_dirtyflagPlanVerifier<P>withverify()/replan()producing structuredVerificationResult;SchedulerAction::Verifyemitted on task completion whenverify_completeness=true; per-task and globalmax_replanscaps;LevelBarrier::current_levelreset after injection to prevent silent dispatch deadlockverify_provider,verify_max_tokens,max_replans,verify_completenesswith--migrate-configsupportBreaking:
suggest_max_parallel()removed; useanalyze().max_parallel.Tests: 6698/6698 pass with
--features full(+62 vs main).Test plan
cargo +nightly fmt --checkpassescargo clippy --features full --workspace -- -D warningspassescargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins— 6698/6698 passcargo nextest run -p zeph-orchestration --lib— 242/242 pass (12 new verifier tests)verify_completeness = false(default) — no Verify actions emitted, no PlanVerifier instantiatedmax_replans = 0— Verify emitted but inject_tasks() skips injection (verify-only mode)Closes #2219, #2202