fix(agent-pipeline): add #[non_exhaustive] to error enums (#4717, #4718, #4719)#4742
Merged
Conversation
Add the #[non_exhaustive] attribute to five public error enums across the agent pipeline crates to comply with the workspace convention established in #4658/#4660: - ToolDispatchError (zeph-agent-tools) - ContextError, CompactionOutcome, SubgoalState (zeph-agent-context) - PersistenceError (zeph-agent-persistence) Update three downstream exhaustive match sites in zeph-core that break under the new attribute: - zeph-core: compact_context_command() wildcard for CompactionOutcome - zeph-core: debug_dump SubgoalState display arm - zeph-agent-context: compaction weight match (within-crate, stays exhaustive) Closes #4717 Closes #4718 Closes #4719
2c19748 to
57c3c14
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
Add
#[non_exhaustive]to five public error enums across the agent pipeline crates, enforcing the workspace convention from #4658/#4660. Without this attribute, adding a new variant to any of these enums is a silent breaking change for downstream crates.Affected enums:
ToolDispatchError—crates/zeph-agent-tools/src/error.rsContextError,CompactionOutcome,SubgoalState—crates/zeph-agent-context/src/PersistenceError—crates/zeph-agent-persistence/src/error.rsDownstream match sites updated:
zeph-core/src/agent/context/summarization/compaction.rs—compact_context_command()wildcard forCompactionOutcomezeph-core/src/debug_dump/mod.rs—SubgoalStatedisplay armTest plan
cargo +nightly fmt --check— cleancargo clippy --workspace -- -D warnings— cleancargo nextest run --workspace --lib --bins— 10414 passed, 0 failedRUSTFLAGS="-D warnings" cargo check --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler --locked— cleancargo test --doc --workspace --features "desktop,ide,server,chat,pdf,scheduler"— cleanRUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler"— cleanCloses #4717
Closes #4718
Closes #4719