fix(scheduler): adversarial policy bypass for list_tasks + #[non_exhaustive] on 17 enums#4536
Merged
Conversation
a9cc4e9 to
5472fcd
Compare
When the embed provider is unavailable and fail_open=false, the ShadowProbeExecutor times out and blocks read-only scheduler commands. Add list_tasks to AdversarialPolicyConfig::default_exempt_tools() so /scheduler list is never subject to the adversarial probe. Closes #4529
…ub enums Prevents downstream exhaustive match breakage when new variants are added to extensible FSM and command enums across zeph-orchestration, zeph-subagent, and zeph-scheduler. Adds wildcard arms at 5 match sites in zeph-core and the binary. Closes #4527
5472fcd to
5083c96
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
list_taskstoAdversarialPolicyConfig::default_exempt_tools()so/scheduler listis never blocked by the adversarial probe gate when the embed provider is unavailable andfail_open=false#[non_exhaustive]to 17 extensible pub enums acrosszeph-orchestration,zeph-subagent, andzeph-schedulerto prevent downstream exhaustivematchbreakage on future variant additionsChanges
Fix #4529 — adversarial policy bypass:
crates/zeph-config/src/tools.rs:list_tasksadded todefault_exempt_tools(); read-only scheduler intrinsics bypass theShadowProbeExecutorunconditionallycrates/zeph-tools/src/config.rs: regression test assertinglist_tasksis in the exempt listFix #4527 —
#[non_exhaustive]on 17 enums:zeph-orchestration:TaskStatus,GraphStatus,ExecutionMode,TaskClass,TopologyHint,Topology,DispatchStrategy,LineageKindzeph-subagent:SubAgentState,AgentsCommand,AgentCommand,FleetSessionStatus,GrantKind,HookErrorzeph-scheduler:SchedulerMessage,TaskKind,TaskModezeph-coreand the binaryTest plan
cargo +nightly fmt --check— OKcargo clippy(affected crates) — 0 errors, 0 warningscargo nextest run --workspace --lib --bins— 10108 passed, 21 skippedCloses #4529
Closes #4527