Expand Rust E2E coverage#1250
Open
stephentoub wants to merge 4 commits intomainfrom
Open
Conversation
Add a replay-backed Rust E2E suite matching the .NET coverage, update Rust SDK session lifecycle support for session filesystem and multi-client scenarios, and add reliability fixes for model caching and cancellation-safe pending session registration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Expands the Rust SDK’s replay-backed E2E suite to better match coverage in other SDKs, and updates Rust internals around session lifecycle, JSON-RPC shutdown semantics, and model listing to support the new tests and reduce regression risk.
Changes:
- Added a large set of Rust replay-backed E2E tests (plus new replay snapshots) spanning session lifecycle, RPC surfaces, tools/hooks, telemetry, and multi-client behavior.
- Updated Rust session create/resume internals to pre-register sessions, enforce session-id consistency, and ensure cancellation-safe cleanup.
- Improved client runtime behavior via JSON-RPC force-close support and a single-flight cached
list_modelsimplementation; addedreasoning_efforttoResumeSessionConfig.
Show a summary per file
| File | Description |
|---|---|
| test/snapshots/session_config/should_use_custom_session_id.yaml | Adds replay snapshot for session-config E2E coverage. |
| test/snapshots/session_config/should_create_session_with_custom_provider_config.yaml | Adds replay snapshot for session-config E2E coverage. |
| test/snapshots/session_config/should_apply_reasoning_effort_on_session_create.yaml | Adds replay snapshot for session-config E2E coverage. |
| test/snapshots/session_config/should_apply_all_reasoning_effort_values_on_session_create.yaml | Adds replay snapshot for session-config E2E coverage. |
| test/snapshots/rust_multi_client/two_clients_register_different_tools_and_agent_uses_both.yaml | Adds replay snapshot for Rust multi-client tool registration behavior. |
| test/snapshots/rust_multi_client/disconnecting_client_removes_its_tools.yaml | Adds replay snapshot for multi-client tool removal behavior. |
| test/snapshots/rust_multi_client/both_clients_see_tool_request_and_completion_events.yaml | Adds replay snapshot for multi-client tool event fan-out. |
| test/snapshots/rpc_tasks_and_handlers/should_return_expected_results_for_missing_pending_handler_requestids.yaml | Adds replay snapshot for tasks/handlers RPC E2E coverage. |
| test/snapshots/rpc_tasks_and_handlers/should_report_implemented_error_for_missing_task_agent_type.yaml | Adds replay snapshot for tasks/handlers RPC E2E coverage. |
| test/snapshots/rpc_tasks_and_handlers/should_report_implemented_error_for_invalid_task_agent_model.yaml | Adds replay snapshot for tasks/handlers RPC E2E coverage. |
| test/snapshots/rpc_tasks_and_handlers/should_list_task_state_and_return_false_for_missing_task_operations.yaml | Adds replay snapshot for tasks/handlers RPC E2E coverage. |
| test/snapshots/rpc_shell_edge_cases/shell_kill_unknown_processid_returns_false.yaml | Adds replay snapshot for shell edge-case RPC coverage. |
| test/snapshots/rpc_shell_edge_cases/shell_kill_cleans_up_after_terminating_signal.yaml | Adds replay snapshot for shell edge-case RPC coverage. |
| test/snapshots/rpc_shell_edge_cases/shell_exec_with_timeout_kills_long_running_command.yaml | Adds replay snapshot for shell edge-case RPC coverage. |
| test/snapshots/rpc_shell_edge_cases/shell_exec_with_stderr_output_cleans_up.yaml | Adds replay snapshot for shell edge-case RPC coverage. |
| test/snapshots/rpc_shell_edge_cases/shell_exec_with_nonexistent_command_returns_processid_and_cleans_up.yaml | Adds replay snapshot for shell edge-case RPC coverage. |
| test/snapshots/rpc_shell_edge_cases/shell_exec_with_large_stdout_cleans_up.yaml | Adds replay snapshot for shell edge-case RPC coverage. |
| test/snapshots/rpc_shell_edge_cases/shell_exec_with_custom_cwd_honors_override.yaml | Adds replay snapshot for shell edge-case RPC coverage. |
| test/snapshots/rpc_shell_and_fleet/should_kill_shell_process.yaml | Adds replay snapshot for shell/fleet RPC coverage. |
| test/snapshots/rpc_shell_and_fleet/should_execute_shell_command.yaml | Adds replay snapshot for shell/fleet RPC coverage. |
| test/snapshots/rpc_session_state/should_update_existing_workspace_file_with_update_operation.yaml | Adds replay snapshot for session-state RPC coverage. |
| test/snapshots/rpc_session_state/should_set_and_get_each_session_mode_value.yaml | Adds replay snapshot for session-state RPC coverage. |
| test/snapshots/rpc_session_state/should_report_implemented_errors_for_unsupported_session_rpc_paths.yaml | Adds replay snapshot for session-state RPC coverage. |
| test/snapshots/rpc_session_state/should_report_error_reading_nonexistent_workspace_file.yaml | Adds replay snapshot for session-state RPC coverage. |
| test/snapshots/rpc_session_state/should_reject_workspace_file_path_traversal.yaml | Adds replay snapshot for session-state RPC coverage. |
| test/snapshots/rpc_session_state/should_reject_empty_or_whitespace_session_name.yaml | Adds replay snapshot for session-state RPC coverage. |
| test/snapshots/rpc_session_state/should_read_update_and_delete_plan.yaml | Adds replay snapshot for session-state RPC coverage. |
| test/snapshots/rpc_session_state/should_handle_forking_session_without_persisted_events.yaml | Adds replay snapshot for session-state fork behavior coverage. |
| test/snapshots/rpc_session_state/should_get_and_set_session_mode.yaml | Adds replay snapshot for session-state RPC coverage. |
| test/snapshots/rpc_session_state/should_get_and_set_session_metadata.yaml | Adds replay snapshot for session-state RPC coverage. |
| test/snapshots/rpc_session_state/should_emit_title_changed_event_each_time_name_set_is_called.yaml | Adds replay snapshot for session-state event coverage. |
| test/snapshots/rpc_session_state/should_create_workspace_file_with_nested_path_auto_creating_dirs.yaml | Adds replay snapshot for workspace file RPC coverage. |
| test/snapshots/rpc_session_state/should_call_workspace_file_rpc_methods.yaml | Adds replay snapshot for workspace file RPC coverage. |
| test/snapshots/rpc_session_state/should_call_session_usage_and_permission_rpcs.yaml | Adds replay snapshot for session usage/permission RPC coverage. |
| test/snapshots/rpc_session_state/should_call_session_rpc_model_switchto.yaml | Adds replay snapshot for model RPC coverage. |
| test/snapshots/rpc_session_state/should_call_session_rpc_model_getcurrent.yaml | Adds replay snapshot for model RPC coverage. |
| test/snapshots/rpc_server/should_discover_server_mcp_and_skills.yaml | Adds replay snapshot for server-scoped RPC coverage. |
| test/snapshots/rpc_server/should_call_rpc_tools_list_with_typed_result.yaml | Adds replay snapshot for server-scoped RPC coverage. |
| test/snapshots/rpc_server/should_call_rpc_ping_with_typed_params_and_result.yaml | Adds replay snapshot for server-scoped RPC coverage. |
| test/snapshots/rpc_server/should_call_rpc_models_list_with_typed_result.yaml | Adds replay snapshot for server-scoped RPC coverage. |
| test/snapshots/rpc_server/should_call_rpc_account_get_quota_when_authenticated.yaml | Adds replay snapshot for server-scoped RPC coverage. |
| test/snapshots/rpc_mcp_config/should_round_trip_http_mcp_oauth_config_rpc.yaml | Adds replay snapshot for MCP config RPC coverage. |
| test/snapshots/rpc_mcp_config/should_call_server_mcp_config_rpcs.yaml | Adds replay snapshot for MCP config RPC coverage. |
| test/snapshots/rpc_mcp_and_skills/should_report_error_when_mcp_oauth_server_is_not_remote.yaml | Adds replay snapshot for MCP/skills RPC coverage. |
| test/snapshots/rpc_mcp_and_skills/should_report_error_when_mcp_oauth_server_is_not_configured.yaml | Adds replay snapshot for MCP/skills RPC coverage. |
| test/snapshots/rpc_mcp_and_skills/should_report_error_when_mcp_host_is_not_initialized.yaml | Adds replay snapshot for MCP/skills RPC coverage. |
| test/snapshots/rpc_mcp_and_skills/should_report_error_when_extensions_are_not_available.yaml | Adds replay snapshot for MCP/skills RPC coverage. |
| test/snapshots/rpc_mcp_and_skills/should_reload_session_skills.yaml | Adds replay snapshot for MCP/skills RPC coverage. |
| test/snapshots/rpc_mcp_and_skills/should_list_plugins.yaml | Adds replay snapshot for MCP/skills RPC coverage. |
| test/snapshots/rpc_mcp_and_skills/should_list_mcp_servers_with_configured_server.yaml | Adds replay snapshot for MCP/skills RPC coverage. |
| test/snapshots/rpc_mcp_and_skills/should_list_extensions.yaml | Adds replay snapshot for MCP/skills RPC coverage. |
| test/snapshots/rpc_mcp_and_skills/should_list_and_toggle_session_skills.yaml | Adds replay snapshot for MCP/skills RPC coverage. |
| test/snapshots/rpc_event_side_effects/should_emit_workspace_file_changed_event_when_file_created.yaml | Adds replay snapshot for event side-effects coverage. |
| test/snapshots/rpc_event_side_effects/should_emit_title_changed_event_when_name_set.yaml | Adds replay snapshot for event side-effects coverage. |
| test/snapshots/rpc_event_side_effects/should_emit_plan_changed_update_operation_on_second_update.yaml | Adds replay snapshot for event side-effects coverage. |
| test/snapshots/rpc_event_side_effects/should_emit_plan_changed_event_for_update_and_delete.yaml | Adds replay snapshot for event side-effects coverage. |
| test/snapshots/rpc_event_side_effects/should_emit_mode_changed_event_when_mode_set.yaml | Adds replay snapshot for event side-effects coverage. |
| test/snapshots/rpc_agents/should_select_and_get_current_agent.yaml | Adds replay snapshot for agent RPC coverage. |
| test/snapshots/rpc_agents/should_return_null_when_no_agent_is_selected.yaml | Adds replay snapshot for agent RPC coverage. |
| test/snapshots/rpc_agents/should_return_empty_list_when_no_custom_agents_configured.yaml | Adds replay snapshot for agent RPC coverage. |
| test/snapshots/rpc_agents/should_list_available_custom_agents.yaml | Adds replay snapshot for agent RPC coverage. |
| test/snapshots/rpc_agents/should_emit_subagent_selected_and_deselected_events.yaml | Adds replay snapshot for agent event coverage. |
| test/snapshots/rpc_agents/should_deselect_current_agent.yaml | Adds replay snapshot for agent RPC coverage. |
| test/snapshots/rpc_agents/should_call_agent_reload.yaml | Adds replay snapshot for agent RPC coverage. |
| test/snapshots/rpc_additional_edge_cases/workspaces_getworkspace_returns_stable_result_across_calls.yaml | Adds replay snapshot for additional edge-case RPC coverage. |
| test/snapshots/rpc_additional_edge_cases/workspaces_createfile_then_listfiles_returns_sorted_or_stable_order.yaml | Adds replay snapshot for additional edge-case RPC coverage. |
| test/snapshots/rpc_additional_edge_cases/workspaces_create_file_with_unicode_content_round_trips.yaml | Adds replay snapshot for additional edge-case RPC coverage. |
| test/snapshots/rpc_additional_edge_cases/workspaces_create_file_with_large_content_round_trips.yaml | Adds replay snapshot for additional edge-case RPC coverage. |
| test/snapshots/rpc_additional_edge_cases/workspaces_create_file_with_empty_content_round_trips.yaml | Adds replay snapshot for additional edge-case RPC coverage. |
| test/snapshots/rpc_additional_edge_cases/usage_get_metrics_on_fresh_session_returns_zero_tokens.yaml | Adds replay snapshot for additional edge-case RPC coverage. |
| test/snapshots/rpc_additional_edge_cases/shell_exec_with_zero_timeout_does_not_kill_long_running_command.yaml | Adds replay snapshot for additional edge-case RPC coverage. |
| test/snapshots/rpc_additional_edge_cases/plan_update_with_empty_content_then_read_returns_empty.yaml | Adds replay snapshot for additional edge-case RPC coverage. |
| test/snapshots/rpc_additional_edge_cases/plan_delete_when_none_exists_is_idempotent.yaml | Adds replay snapshot for additional edge-case RPC coverage. |
| test/snapshots/rpc_additional_edge_cases/permissions_set_approve_all_toggle_round_trips.yaml | Adds replay snapshot for additional edge-case RPC coverage. |
| test/snapshots/rpc_additional_edge_cases/permissions_reset_session_approvals_on_fresh_session_is_noop.yaml | Adds replay snapshot for additional edge-case RPC coverage. |
| test/snapshots/rpc_additional_edge_cases/name_set_with_unicode_round_trips.yaml | Adds replay snapshot for additional edge-case RPC coverage. |
| test/snapshots/rpc_additional_edge_cases/mode_set_to_same_value_multiple_times_stays_stable.yaml | Adds replay snapshot for additional edge-case RPC coverage. |
| test/snapshots/per-session-auth/session_uses_client_token_when_no_session_token_is_supplied.yaml | Adds replay snapshot for per-session auth E2E coverage. |
| test/snapshots/per-session-auth/session_token_overrides_client_token.yaml | Adds replay snapshot for per-session auth E2E coverage. |
| test/snapshots/per-session-auth/session_fails_with_invalid_token.yaml | Adds replay snapshot for per-session auth E2E coverage. |
| test/snapshots/per-session-auth/session_auth_status_is_unauthenticated_without_token.yaml | Adds replay snapshot for per-session auth E2E coverage. |
| test/snapshots/multi_client_commands_elicitation/client_receives_commands_changed_when_another_client_joins_with_commands.yaml | Adds replay snapshot for multi-client commands/elicitation coverage. |
| test/snapshots/multi_client_commands_elicitation/capabilities_changed_fires_when_second_client_joins_with_elicitation_handler.yaml | Adds replay snapshot for multi-client commands/elicitation coverage. |
| test/snapshots/multi_client_commands_elicitation/capabilities_changed_fires_when_elicitation_provider_disconnects.yaml | Adds replay snapshot for multi-client commands/elicitation coverage. |
| test/snapshots/mcp_and_agents/should_handle_multiple_mcp_servers.yaml | Adds replay snapshot for MCP/agents E2E coverage. |
| test/snapshots/mcp_and_agents/should_handle_multiple_custom_agents.yaml | Adds replay snapshot for MCP/agents E2E coverage. |
| test/snapshots/mcp_and_agents/should_handle_custom_agent_with_tools_configuration.yaml | Adds replay snapshot for MCP/agents E2E coverage. |
| test/snapshots/mcp_and_agents/should_handle_custom_agent_with_mcp_servers.yaml | Adds replay snapshot for MCP/agents E2E coverage. |
| test/snapshots/elicitation/should_report_elicitation_capability_based_on_handler_presence.yaml | Adds replay snapshot for elicitation E2E coverage. |
| test/snapshots/elicitation/session_without_elicitationhandler_creates_successfully.yaml | Adds replay snapshot for elicitation E2E coverage. |
| test/snapshots/elicitation/sends_requestelicitation_when_handler_provided.yaml | Adds replay snapshot for elicitation E2E coverage. |
| test/snapshots/elicitation/select_returns_selected_option.yaml | Adds replay snapshot for elicitation E2E coverage. |
| test/snapshots/elicitation/input_returns_freeform_value.yaml | Adds replay snapshot for elicitation E2E coverage. |
| test/snapshots/elicitation/elicitation_throws_when_capability_is_missing.yaml | Adds replay snapshot for elicitation E2E coverage. |
| test/snapshots/elicitation/elicitation_returns_all_action_shapes.yaml | Adds replay snapshot for elicitation E2E coverage. |
| test/snapshots/elicitation/defaults_capabilities_when_not_provided.yaml | Adds replay snapshot for elicitation E2E coverage. |
| test/snapshots/elicitation/confirm_returns_true_when_handler_accepts.yaml | Adds replay snapshot for elicitation E2E coverage. |
| test/snapshots/elicitation/confirm_returns_false_when_handler_declines.yaml | Adds replay snapshot for elicitation E2E coverage. |
| test/snapshots/commands/session_with_no_commands_creates_successfully.yaml | Adds replay snapshot for commands E2E coverage. |
| test/snapshots/commands/session_with_commands_resumes_successfully.yaml | Adds replay snapshot for commands E2E coverage. |
| test/snapshots/commands/session_with_commands_creates_successfully.yaml | Adds replay snapshot for commands E2E coverage. |
| test/snapshots/client/should_stop_client_with_active_session.yaml | Adds replay snapshot for client lifecycle E2E coverage. |
| test/snapshots/client/should_start_ping_and_stop_tcp_client.yaml | Adds replay snapshot for client connectivity E2E coverage. |
| test/snapshots/client/should_start_ping_and_stop_stdio_client.yaml | Adds replay snapshot for client connectivity E2E coverage. |
| test/snapshots/client/should_list_models_when_authenticated.yaml | Adds replay snapshot for list-models E2E coverage. |
| test/snapshots/client/should_get_status.yaml | Adds replay snapshot for status E2E coverage. |
| test/snapshots/client/should_get_authenticated_status.yaml | Adds replay snapshot for auth-status E2E coverage. |
| test/snapshots/client/should_force_stop_client.yaml | Adds replay snapshot for force-stop E2E coverage. |
| test/snapshots/client/listmodels_withcustomhandler_callshandler.yaml | Adds replay snapshot for list-models handler E2E coverage. |
| test/snapshots/client_options/should_listen_on_configured_tcp_port.yaml | Adds replay snapshot for client-options E2E coverage. |
| rust/tests/e2e/telemetry.rs | Adds replay-backed E2E validating file telemetry export contents/spans. |
| rust/tests/e2e/system_message_transform.rs | Adds replay-backed E2Es for system-message transform callbacks and overrides interplay. |
| rust/tests/e2e/suspend.rs | Adds suspend/resume E2Es and config-level assertions for continue-pending-work. |
| rust/tests/e2e/skills.rs | Adds skill discovery/disable/agent-skill E2Es plus a skipped resume-skill placeholder. |
| rust/tests/e2e/session_lifecycle.rs | Adds E2Es for listing sessions, deleting sessions, and event isolation across sessions. |
| rust/tests/e2e/rpc_tasks_and_handlers.rs | Adds tasks/handlers RPC E2Es plus placeholder coverage for background tasks. |
| rust/tests/e2e/rpc_shell_and_fleet.rs | Adds shell RPC E2Es plus a placeholder Fleet test. |
| rust/tests/e2e/rpc_server.rs | Adds typed server-scoped RPC E2Es (ping/models/tools/quota/mcp/skills). |
| rust/tests/e2e/rpc_mcp_config.rs | Adds MCP config RPC E2Es including HTTP OAuth config round-tripping. |
| rust/tests/e2e/rpc_extensions_loaded.rs | Adds extension-loaded tests (currently structured as local type assertions). |
| rust/tests/e2e/rpc_event_side_effects.rs | Adds E2Es validating events emitted as side effects of RPC calls (mode/plan/title/workspace/history). |
| rust/tests/e2e/rpc_agent.rs | Adds agent RPC E2Es for list/select/deselect/reload and event emissions. |
| rust/tests/e2e/per_session_auth.rs | Adds E2Es covering client-vs-session token behavior and invalid-token failures. |
| rust/tests/e2e/multi_turn.rs | Adds multi-turn E2Es validating tool sequencing and cross-turn file effects. |
| rust/tests/e2e/multi_client_commands_elicitation.rs | Adds multi-client E2Es validating commands-changed and elicitation-capability changes across clients. |
| rust/tests/e2e/mode_handlers.rs | Adds E2Es covering exit-plan-mode and auto-mode-switch handler flows (including rate-limit path). |
| rust/tests/e2e/hooks.rs | Adds hook E2Es for pre/post tool-use hooks and deny behavior. |
| rust/tests/e2e/error_resilience.rs | Adds E2Es for disconnected-session error behavior and abort idempotency. |
| rust/tests/e2e/compaction.rs | Adds E2Es for infinite-session compaction events and disabled behavior. |
| rust/tests/e2e/commands.rs | Adds E2Es for commands on create/resume plus unit-ish cloning/property checks. |
| rust/tests/e2e/client.rs | Adds client start/stop/ping/status/auth/list-models E2Es and list-models handler caching tests. |
| rust/tests/e2e/client_options.rs | Adds client-options E2Es plus several option-composition/serialization checks. |
| rust/tests/e2e/client_lifecycle.rs | Adds E2Es for lifecycle subscriptions and session created/updated/deleted lifecycle events. |
| rust/tests/e2e/client_api.rs | Adds E2Es for delete session, last session id, and foreground session behavior. |
| rust/tests/e2e/builtin_tools.rs | Adds E2Es validating built-in tool behaviors (shell/file/search/edit/create/find). |
| rust/tests/e2e/ask_user.rs | Adds E2Es for ask_user tool bridging via SessionHandler user-input callback. |
| rust/tests/e2e/abort.rs | Adds E2Es for abort during streaming and abort during tool execution, validating recovery. |
| rust/tests/e2e.rs | Registers the expanded Rust E2E module set under the test-support feature. |
| rust/src/types.rs | Extends ResumeSessionConfig with reasoning_effort and builder/debug support. |
| rust/src/session.rs | Refactors create/resume to pre-register sessions, enforce session-id consistency, and ensure cancellation-safe unregister cleanup. |
| rust/src/lib.rs | Adds cached list_models single-flight behavior, session-id generation helper, and resets model cache on shutdown paths. |
| rust/src/jsonrpc.rs | Tracks JSON-RPC read/write tasks and adds force_close() for force-stop semantics. |
Copilot's findings
Comments suppressed due to low confidence (2)
rust/tests/e2e/suspend.rs:104
should_reject_pending_external_tool_when_suspendingis currently a config-field assertion and doesn't exercise suspend behavior or validate the CLI's handling of pending external tools. Consider adding a replay-backed E2E flow (create pending external tool → suspend → assert rejection) or rename/move this to a unit/config test so it doesn't read as E2E coverage.
rust/tests/e2e/client_options.rs:260- This test name says it should throw, but it only constructs
ClientOptionsand asserts fields—no error is ever triggered. Consider either asserting the actual error behavior viaClient::startor renaming/moving this as a pure options-serialization/unit test.
async fn should_throw_when_useloggedinuser_used_with_cliurl() {
let options = ClientOptions::new()
.with_transport(Transport::External {
host: "localhost".to_string(),
port: 12345,
})
.with_use_logged_in_user(true);
assert!(matches!(options.transport, Transport::External { .. }));
assert_eq!(options.use_logged_in_user, Some(true));
}
- Files reviewed: 161/161 changed files
- Comments generated: 5
Move struct-only E2E placeholders into unit tests, exercise invalid external-auth client options, avoid logging session IDs from test assertions, and harden failing Rust E2Es on CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Allow inert use_logged_in_user(false) on external transports so shared E2E client options continue to work, while still rejecting true external auth requests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use a workspace-relative selection file path so the replayed prompt is stable across platforms instead of containing platform-specific temp directory relatives. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
The Rust SDK had much less replay-backed E2E coverage than the other SDKs, which made protocol and lifecycle regressions harder to catch. This brings Rust up to parity with the current .NET E2E suite and ports the latest upstream empty-session fork behavior.
Summary
Notes
Validation
cargo +nightly-2026-04-14 fmt --all -- --config-path .rustfmt.nightly.toml --checkcargo clippy --all-targets --features test-support -- --no-deps -D warnings -D clippy::unwrap_used -D clippy::disallowed_macros -D clippy::await_holding_invalid_typecargo test -q --features test-support --libcargo test -q --features test-support --test e2e --no-runcargo test --features test-support --test e2e -- --test-threads=1(342 passed; 0 failed; 2 ignored)list_models, pending session cancellation cleanup, and the auto-mode-switch E2E