fix(orchestration): apply >=3 escalation to PlanVerifier timeout arms#3873
Merged
Conversation
The timeout arms in `PlanVerifier::verify` and `verify_plan` incremented `consecutive_failures` (fail-open policy) but skipped the `>= 3` escalation check that the `Ok(Err(_))` arms run. A misconfigured or overloaded `verify_provider` that always timed out therefore failed open silently forever — operators saw repeated `warn!` entries and no `error!`. Both timeout arms now mirror the LLM-error path: emit `error!` once `consecutive_failures >= 3` advising the operator to inspect `verify_provider` configuration; emit `warn!` otherwise. `replan` and `replan_from_plan` timeout arms are left as-is — their `Ok(Err(_))` arms do not track `consecutive_failures` either, so adding the escalation only there would be inconsistent. Also documents the orchestration timeout fields introduced in #3860 by adding commented `aggregator_timeout_secs`, `planner_timeout_secs`, and `verifier_timeout_secs` entries to `[orchestration]` in `config/default.toml`. Closes #3868 Closes #3867
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
PlanVerifier::verifyandverify_plannow emiterror!onceconsecutive_failures >= 3on timeout-driven failures, mirroring the existingOk(Err(_))path. Previously these arms only incremented the counter and warned, so a permanently slowverify_providersilently failed open forever (fix(orchestration): PlanVerifier timeout arms increment consecutive_failures but skip the >= 3 escalation check #3868).replan/replan_from_plantimeout arms left untouched — theirOk(Err(_))arms also do not trackconsecutive_failures; keeping symmetry.aggregator_timeout_secs = 60,planner_timeout_secs = 120,verifier_timeout_secs = 30entries in[orchestration]ofconfig/default.toml(docs(config): orchestration timeout fields missing from default.toml #3867). Defaults verified against the Serdedefault_*fns incrates/zeph-config/src/experiment.rs.Test plan
verify_timeout_increments_counter_and_crosses_threshold— drivesverify()through 3 consecutive timeouts and assertsconsecutive_failures == 3so the escalation arm fires.verify_plan_timeout_increments_counter_and_crosses_threshold— same forverify_plan().cargo +nightly fmt --checkcargo clippy -p zeph-orchestration --all-targets -- -D warningscargo nextest run -p zeph-orchestration -p zeph-config --lib→ 757 passed, 0 failedRUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps -p zeph-orchestration -p zeph-configCloses #3868
Closes #3867