fix(core,agent-context): track JoinHandle, remove lint allow, add #[non_exhaustive]#4620
Merged
Conversation
This was
linked to
issues
May 29, 2026
Closed
…on_exhaustive] - apply_response_cache returns Option<JoinHandle<()>>; runner.rs aborts the cleanup task on shutdown to prevent it outliving the agent lifecycle (closes #4612) - remove #![allow(clippy::unused_async)] from zeph-agent-context crate root; ContextService::reset_conversation is now a plain fn (closes #4567) - add #[non_exhaustive] to SkipReason, StageOutcome, VerdictStatus, TriggerPolicy, QualityConfigError, ToolRiskCategory, ProbeVerdict in zeph-core; consistent with project-wide convention (closes #4569)
430ec63 to
9768a47
Compare
This was referenced May 29, 2026
bug-ops
added a commit
that referenced
this pull request
May 29, 2026
…ration,sanitizer,tools,tui): add #[non_exhaustive] to extensible pub enums Completes workspace-wide #[non_exhaustive] coverage started in PRs #4616 and #4620. Adds the attribute to all eligible extensible pub enums across the remaining crates. Enums with exhaustive match expressions in the same crate (error enums, protocol/wire types, dispatcher enums) are excluded. Closes #4623.
bug-ops
added a commit
that referenced
this pull request
May 29, 2026
…ration,sanitizer,tools,tui): add #[non_exhaustive] to extensible pub enums Completes workspace-wide #[non_exhaustive] coverage started in PRs #4616 and #4620. Adds the attribute to all eligible extensible pub enums across the remaining crates. Enums with exhaustive match expressions in the same crate (error enums, protocol/wire types, dispatcher enums) are excluded. Closes #4623.
bug-ops
added a commit
that referenced
this pull request
May 29, 2026
…kspace-wide (#4658) * refactor(acp,agent-context,bench,config,context,index,llm,mcp,orchestration,sanitizer,tools,tui): add #[non_exhaustive] to extensible pub enums Completes workspace-wide #[non_exhaustive] coverage started in PRs #4616 and #4620. Adds the attribute to all eligible extensible pub enums across the remaining crates. Enums with exhaustive match expressions in the same crate (error enums, protocol/wire types, dispatcher enums) are excluded. Closes #4623. * fix(mcp,tui): remove duplicate #[non_exhaustive] attributes and add wildcard match arm Remove duplicate #[non_exhaustive] attributes in zeph-mcp and zeph-tui where the previous commit on this branch had already added them. Add a wildcard arm to the ToolEvent match in tui_bridge.rs to satisfy the exhaustiveness requirement introduced by marking ToolEvent as #[non_exhaustive].
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
Three code quality fixes grouped in one PR:
apply_response_cacheinsrc/agent_setup.rsnow returnsOption<tokio::task::JoinHandle<()>>; the runner stores the handle and callsabort()during shutdown, preventing the background cleanup loop from outliving the agent lifecycle.#![allow(clippy::unused_async)]blanket allow fromzeph-agent-contextcrate root (scaffold-phase allow, no longer needed);ContextService::reset_conversationis now a plainfn.#[non_exhaustive]to seven extensiblepub enumtypes inzeph-corequality and shadow_sentinel modules:SkipReason,StageOutcome,VerdictStatus,TriggerPolicy,QualityConfigError,ToolRiskCategory,ProbeVerdict.Test plan
cargo +nightly fmt --check— cleancargo clippy --workspace -- -D warnings— cleanRUSTFLAGS="-D warnings" cargo check --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler --locked— cleancargo nextest run --workspace --lib --bins— 10232 passed, 21 skippedcargo test --doc -p zeph-agent-context— 2 passedcargo test --doc -p zeph-core— 32 passedCloses #4612, #4567, #4569