fix(core): satisfy non-exhaustive AcpTransport match without acp-http#5628
Merged
Conversation
94d9b7c to
08497d9
Compare
bug-ops
added a commit
that referenced
this pull request
Jul 3, 2026
…pervisor The test relied on a single tokio::task::yield_now() to observe a spawned subagent task in the TaskSupervisor snapshot before it completed and was reaped. RunOnce entries are removed from supervisor state in the same lock update that marks them Completed, so under CI scheduling pressure the near-instant mock provider response could finish and get reaped before the single yield resumed the test, leaving the snapshot empty (observed on PR #5628, shard 5/8). Use a MockProvider with an explicit response delay so the task is deterministically still Running when the snapshot is taken.
bug-ops
added a commit
that referenced
this pull request
Jul 3, 2026
…pervisor The test relied on a single tokio::task::yield_now() to observe a spawned subagent task in the TaskSupervisor snapshot before it completed and was reaped. RunOnce entries are removed from supervisor state in the same lock update that marks them Completed, so under CI scheduling pressure the near-instant mock provider response could finish and get reaped before the single yield resumed the test, leaving the snapshot empty (observed on PR #5628, shard 5/8). Use a MockProvider with an explicit response delay so the task is deterministically still Running when the snapshot is taken.
9a5f44d to
33939f2
Compare
run_configured_acp_autostart matches AcpTransport, which is marked non-exhaustive and defined outside this crate, so rustc requires an unconditional wildcard arm regardless of local variant coverage. The only wildcard arm present was itself feature-gated to acp-http, leaving no catch-all when that feature was disabled, so acp without acp-http failed to compile with E0004. Replaces it with a single unconditional wildcard arm that warns and falls back to stdio. Stdio, Http, and Both remain fully handled by existing explicit arms under every feature combination, so the new arm only ever reaches a variant unknown to this build. Closes #5623
…pervisor The test relied on a single tokio::task::yield_now() to observe a spawned subagent task in the TaskSupervisor snapshot before it completed and was reaped. RunOnce entries are removed from supervisor state in the same lock update that marks them Completed, so under CI scheduling pressure the near-instant mock provider response could finish and get reaped before the single yield resumed the test, leaving the snapshot empty (observed on PR #5628, shard 5/8). Use a MockProvider with an explicit response delay so the task is deterministically still Running when the snapshot is taken.
33939f2 to
06fb971
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
Closes #5623.
run_configured_acp_autostart(src/runner.rs) matches onAcpTransport, which is marked non-exhaustive and defined outside this crate (zeph-config) — so rustc requires an unconditional wildcard arm regardless of local variant coverage. The only wildcard arm present was itself feature-gated toacp-http, leaving no catch-all when that feature was disabled. Building withacpenabled andacp-httpdisabled therefore failed to compile withE0004, a combination invisible to CI since theidebundle always pairs the two features together.Replaces the feature-gated wildcard with a single unconditional arm that warns and falls back to
stdio.Stdio,Http, andBothremain fully handled by existing explicit arms under every feature combination — the new arm only ever reaches a variant unknown to this build. Adversarial review confirmed this fallback is effectively unreachable today: an unrecognized transport value in config fails at serde deserialization before ever reaching this match, so warn+fallback is a safe, zero-cost safety net rather than a behavior that could mask a real misconfiguration in practice.Review process
developer (read the full match block and
AcpTransport's definition before restructuring) → parallel (tester independently reproduced the originalE0004via a real revert-and-recheck rather than trusting the report, confirmed no unreachable-pattern overlap between the two wildcard-adjacent arms; adversarial critic verified the new arm is genuinely unreachable under every currently-compilable feature combination, confirmed no other latent instance of this pattern elsewhere in the codebase) → code reviewer (independently re-verified both feature combinations compile, full CI suite, approved).Test plan
cargo +nightly fmt --checkcargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warningscargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins— 11973 passed, 0 failedRUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler")cargo check --features "acp,session,scheduler"(the broken combination from the issue) — now compiles clean, independently reproduced as broken beforehand via a real revertcargo check --features "ide,session,scheduler"(acp+acp-http) — still compiles clean, no regression#[non_exhaustive]missing-wildcard-arm bug is a compile-time-only defect not constructible/triggerable at runtime from outside the defining crate — the twocargo checkinvocations above are the real and sufficient regression guard, matching agreement from both the tester and reviewer.local/testing/(main repo) per project convention