Repository navigation
perf(host-core): run sync tool bodies off the tokio workers - #1430
Conversation
execute_tool_with_path_access called the synchronous Read, Glob, Grep, Write, and Edit bodies inline on the async Tokio worker that handled the request. The host runs the default multi-thread runtime (one worker per core), the ignore walker never yields, and the rg fast path blocks until its child exits. A few large Globs therefore occupied every worker, and cheap RPCs such as session.list waited seconds behind them; the tools.execute budget from vastsa#1208 cannot help because a timer only fires at an await point. Run those five bodies through tokio::task::spawn_blocking with owned inputs. HashlineStore is an Arc<Mutex<_>> handle, so moving a clone onto the blocking thread is cheap. Bash keeps its existing async path. Tool results, error codes, and the wire contract are unchanged; the existing read and mutation class limits also bound the blocking threads. A panicking body now returns INTERNAL instead of dropping the response. The test-only rg override is thread-local, so it is carried onto the blocking thread for the duration of the body. Refs vastsa#1071
vastsa
left a comment
There was a problem hiding this comment.
Verified against the current host-core dispatch path and linked issue #1071. Read, Glob, Grep, Write, and Edit ran synchronous filesystem work on Tokio workers; moving these bodies to the blocking pool removes worker starvation while preserving admission and the tool result/error contract. The single-worker regression test covers the failure. I reran the locked host-core suite (780 passed), Rust formatting, and the headless E2E suite (23/23 passed; 2 API-key cases skipped). CI and the current-base gate are green. Thanks for the focused fix and measured before/after data.
vastsa
left a comment
There was a problem hiding this comment.
Verified against the current host-core dispatch path and the linked #1071 evidence. Read/Glob/Grep/Write/Edit were running synchronous filesystem work on Tokio workers; the blocking-pool hop removes that worker starvation path while retaining admission permits and preserving tool results/errors. The single-worker regression test fails without the hop and passes with it. I reran
running 780 tests
test activation::tests::global_matches_every_session_including_one_without_a_project ... ok
test activation::tests::missing_scope_deserializes_as_global ... ok
test activation::tests::windows_drive_root_survives_normalization ... ok
test activation::tests::empty_project_list_matches_nothing ... ok
test activation::tests::project_scope_matches_the_directory_and_its_children ... ok
test activation::tests::project_scope_ignores_case_and_trailing_separators ... ok
test activation::tests::normalized_drops_blanks_and_duplicates ... ok
test agent_capabilities::tests::global_targets_share_one_directory_whatever_project_context_they_carry ... ok
test agent_capabilities::tests::capability_id_falls_back_to_skill_directory_then_hash ... ok
test agent_capabilities::tests::copy_directory_tree_ignores_symlinks ... ok
test agent_capabilities::tests::global_root_follows_the_environment_override ... ok
test agent_capabilities::tests::moving_a_directory_capability_carries_its_tree ... ok
test agent_capabilities::tests::moving_a_file_never_replaces_an_existing_destination ... ok
test agent_capabilities::tests::project_target_requires_a_project_path ... ok
test agent_capabilities::tests::copy_directory_tree_overwrites_stale_files_and_can_skip_the_document ... ok
test agent_capabilities::tests::suffix_ignores_id_case_so_a_case_insensitive_volume_keeps_both_files ... ok
test agent_capabilities::tests::display_name_suffix_stays_distinct_at_the_character_budget ... ok
test agent_capabilities::tests::display_name_suffix_is_case_insensitive_like_shadowing ... ok
test agent_capabilities::tests::suffix_keeps_the_preferred_id_when_it_is_free ... ok
test agent_capabilities::tests::suffix_reports_exhaustion_instead_of_reusing_a_taken_id ... ok
test agent_capabilities::tests::suffix_walks_past_every_taken_id_and_stays_inside_the_budget ... ok
test agent_capabilities::tests::front_matter_reads_folded_yaml_descriptions ... ok
test agent_capabilities::tests::front_matter_and_body_round_trip ... ok
test agent_capabilities::tests::forget_drops_every_project_override_for_one_document ... ok
test agent_capabilities::tests::state_defaults_on_and_is_project_specific ... ok
test agent_capabilities::tests::moving_a_project_document_leaves_other_projects_state_alone ... ok
test agent_capabilities::tests::project_level_forget_keeps_other_projects_entries ... ok
test config_sync::crypto::tests::untrusted_kdf_parameters_are_bounded ... ok
test config_sync::domains::tests::adapter_registry_covers_every_portable_domain ... ok
test audit::tests::truncates_long_audit_strings ... ok
test audit::tests::redacts_secret_formats_inside_audit_strings ... ok
test audit::tests::redacts_absolute_paths_in_audit_payloads ... ok
test config_sync::domains::tests::writes_imported_instruction_files_beyond_the_former_size_cap ... ok
test audit::tests::bounds_large_audit_payloads_without_writing_invalid_json ... ok
test config_sync::engine::progress::tests::a_phase_change_always_reports_and_the_rest_is_throttled ... ok
test artifacts::tests::record_upserts_per_session_and_path ... ok
test config_sync::engine::progress::tests::counted_progress_carries_the_numbers_an_interface_shows ... ok
test config_sync::engine::progress::tests::phase_names_are_the_wire_contract ... ok
test config_sync::engine::progress::tests::the_unwatched_observer_swallows_everything ... ok
test config_sync::engine::remote::tests::append_only_tips_merge_disjoint_application_fields ... ok
test config_sync::engine::progress::tests::a_report_is_never_withheld_longer_than_the_interval ... ok
test config_sync::crypto::tests::vault_ids_cannot_escape_the_remote_object_namespace ... ok
test config_sync::engine::tests::conflict_candidates_use_the_original_logical_entity_key ... ok
test config_sync::engine::tests::opted_out_remote_changes_do_not_look_like_local_changes ... ok
test config_sync::crypto::tests::vault_round_trip_rejects_wrong_password_and_tampering ... ok
test config_sync::merge::tests::acknowledged_tombstones_stay_in_the_next_local_merge_input ... ok
test config_sync::merge::tests::application_preferences_merge_disjoint_fields_but_conflict_on_one_field ... ok
test config_sync::merge::tests::category_opt_out_keeps_the_base_value_in_the_merge_input ... ok
test config_sync::merge::tests::disjoint_edits_merge_and_repeat_is_idempotent ... ok
test config_sync::merge::tests::empty_initial_application_state_adopts_remote_fields_without_conflict ... ok
test config_sync::merge::tests::explicit_tombstone_deletion_converges_without_becoming_an_implicit_delete ... ok
test config_sync::merge::tests::same_unit_edit_retains_both_candidates ... ok
test config_sync::transport::tests::directory_listing_excludes_the_collection_itself ... ok
test config_sync::transport::tests::empty_vault_initialization_has_one_winner ... ok
test config_sync::transport::tests::endpoint_requires_https_unless_explicitly_acknowledged_for_lan_hosts ... ok
test config_sync::transport::tests::local_fixture_proves_conditional_writes ... ok
test config_sync::transport::tests::nested_directory_creates_missing_ancestors ... ok
test config_sync::transport::tests::probe_records_bad_gateway_as_the_missing_object_status ... ok
test config_sync::transport::tests::probe_rejects_servers_that_ignore_conditional_headers ... ok
test config_sync::transport::tests::remote_directory_rejects_traversal_and_unsafe_names ... ok
test config_sync::transport::tests::stale_cas_writer_is_rejected ... ok
test config_sync::transport::tests::weak_etag_fixture_is_not_accepted_by_probe ... ok
test config_sync::transport::tests::weak_etags_are_not_accepted_for_head_cas ... ok
test data_relocation::tests::exact_path_boundaries_preserve_prose_prefix_neighbors_and_traversal ... ok
test data_relocation::tests::handles_legacy_schema_without_upgrading_or_creating_missing_tables ... ok
test data_relocation::tests::project_capability_overrides_follow_the_moved_project_without_changing_globals ... ok
test data_relocation::tests::refuses_colliding_project_capability_keys_without_losing_an_override ... ok
test data_relocation::tests::refuses_overlapping_roots_and_malformed_complete_records ... ok
test data_relocation::tests::refuses_symlinked_host_metadata_without_touching_external_files ... ok
test data_relocation::tests::relocates_a_real_copied_profile_without_recovery_or_changing_user_content ... ok
test db::tests::a_v16_file_gains_the_provider_owner_column ... ok
test db::tests::archives_pre_v7_database_and_starts_fresh ... ok
test db::tests::boot_interrupts_pending_and_queued_plan_work_without_replaying_it ... ok
test db::tests::editing_a_legacy_project_with_an_extra_folder_upgrades_it_to_a_group ... ok
test db::tests::ensure_project_dedupes_symlinked_spellings ... ok
test db::tests::ensure_project_upserts_by_path ... ok
test db::tests::fresh_open_creates_latest_schema ... ok
test db::tests::goal_is_a_valid_persisted_session_mode ... ok
test db::tests::kv_roundtrip_and_delete ... ok
test db::tests::list_projects_propagates_row_decode_errors ... ok
test db::tests::migrates_v10_approvals_by_labelling_them_plan_contracts ... ok
test db::tests::migrates_v12_by_dropping_a2a_tables ... ok
test db::tests::migrates_v13_plugin_session_schema ... ok
test config_sync::engine::tests::application_references_missing_provider_as_a_deferred_dependency ... ok
test config_sync::domains::tests::captures_project_instruction_files_beyond_the_former_size_cap ... ok
test db::tests::migrates_v7_chat_modes_settings_and_scheduled_values_to_plan ... ok
test db::tests::migration_accepts_current_platform_shell_when_catalog_marks_it_unavailable ... ok
test db::tests::normalize_project_path_strips_extended_length_prefix ... ok
test db::tests::migrates_v8_approvals_without_expiring_new_work ... ok
test db::tests::old_path_projects_are_legacy_single_root_groups ... ok
test config_sync::domains::tests::captures_non_legacy_project_group_memory_as_a_separate_entity ... ok
test db::tests::project_group_roundtrips_roots_and_shared_context ... ok
test db::tests::project_group_update_detaches_roots_with_chats_without_orphaning_them ... ok
test db::tests::migrates_v9_running_turns_before_creating_single_turn_index ... ok
test db::tests::project_memory_is_path_scoped_and_bounded ... ok
test db::tests::remove_project_from_group_detaches_even_with_chats_and_may_move_primary ... ok
test db::tests::v8_migration_rejects_invalid_session_mode_and_preserves_source ... ok
test db::tests::v18_database_migrates_session_thinking_omit ... ok
test db::tests::v14_database_migrates_to_v15_with_the_turn_queue ... ok
test db::tests::v8_migration_rejects_invalid_shell_and_preserves_source ... ok
test db::tests::v8_migration_rejects_malformed_app_settings_and_preserves_source ... ok
test keyboard::tests::start_does_not_keep_the_stdout_channel_open ... ok
test mcp_servers::tests::a_case_differing_id_at_the_destination_is_not_overwritten ... ok
test mcp_servers::tests::a_destination_collision_renames_the_arriving_server ... ok
test mcp_servers::tests::a_global_server_moves_into_a_project_with_its_state ... ok
test mcp_servers::tests::a_project_server_moves_to_global_without_leaving_a_project_override ... ok
test mcp_servers::tests::a_rename_never_writes_over_a_file_the_scan_does_not_list ... ok
test mcp_servers::tests::clearing_a_custom_timeout_restores_the_default ... ok
test mcp_servers::tests::config_round_trips_without_activation_fields ... ok
test mcp_servers::tests::disabled_project_server_shadows_global_server ... ok
test mcp_servers::tests::moving_one_projects_server_to_global_keeps_another_projects_state ... ok
test mcp_servers::tests::project_server_is_copied_and_state_is_pruned_after_removal ... ok
test mcp_servers::tests::transferring_an_unknown_server_is_an_error ... ok
test mcp_servers::tests::transferring_within_one_directory_changes_nothing ... ok
test mcp_servers::tests::validation_accepts_http_endpoints_and_rejects_bad_ids ... ok
test network_policy::tests::network_policy_reading_follows_the_stored_mode ... ok
test network_policy::tests::network_policy_reading_migrates_the_older_plaintext_flag ... ok
test network_proxy::tests::curl_args_follow_applied_settings ... ok
test network_proxy::tests::custom_mode_requires_url ... ok
test network_proxy::tests::parse_accepts_http_and_socks5 ... ok
test db::tests::v20_database_migrates_the_session_checklist_with_a_backup ... ok
test notifications::tests::list_read_and_clear_lifecycle ... ok
test permissions::image_generation_tests::image_generation_requires_approval_and_is_not_plan_safe ... ok
test permissions::tests::accept_edits_allows_file_tools_only ... ok
test permissions::tests::args_preview_truncates_long_strings ... ok
test permissions::tests::ask_mode_prompts_for_high_risk ... ok
test permissions::tests::auto_allows_all_high_risk_in_agent_mode ... ok
test permissions::tests::contract_mode_admits_plugin_tools_only_with_plan_safe_actions ... ok
test permissions::tests::external_path_session_grant_still_applies ... ok
test permissions::tests::external_paths_prompt_for_low_risk_tools_outside_auto ... ok
test permissions::tests::goal_mode_shares_plans_hard_deny_and_bash_semantics ... ok
test permissions::tests::low_risk_auto_allows_in_every_mode ... ok
test permissions::tests::mcp_session_grant_skips_prompt ... ok
test permissions::tests::mcp_tools_auto_allow_under_auto ... ok
test permissions::tests::mcp_tools_default_to_medium_and_ignore_declared_risk ... ok
test permissions::tests::mcp_tools_denied_in_contract_modes ... ok
test permissions::tests::mcp_tools_prompt_under_ask_and_accept_edits ... ok
test permissions::tests::pending_permissions_remain_resolvable_without_deadline ... ok
test permissions::tests::pending_requests_lists_open_requests_until_resolved ... ok
test permissions::tests::plan_bash_follows_permission_mode ... ok
test permissions::tests::plan_denial_wins_over_grants_and_scratch_exceptions ... ok
test permissions::tests::plan_mode_denies_unavailable_tools_regardless_of_permission_mode ... ok
test permissions::tests::plugin_risk_preserves_valid_declarations_and_defaults_to_medium ... ok
test permissions::tests::session_grants_still_apply_under_ask ... ok
test permissions::tests::todo_write_is_low_risk_in_agent_and_denied_in_contract_modes ... ok
test db::tests::v8_migration_rejects_malformed_scheduled_config_and_preserves_source ... ok
test db::tests::v8_migration_rejects_unknown_shell_and_preserves_source ... ok
test plans::tests::approval_deadline_expires_lazily_and_rejects_late_resolution ... ok
test plans::tests::approval_switches_session_and_creates_outbox_atomically ... ok
test plans::tests::claim_and_finish_are_durable_cas_transitions ... ok
test plans::tests::configure_gate_blocks_changes_while_a_turn_is_running ... ok
test plans::tests::configure_gate_blocks_pending_and_active_execution_changes ... ok
test plans::tests::duplicate_resolution_returns_committed_result_and_conflict_is_stale ... ok
test plans::tests::enter_plan_mode_rejects_a_stale_turn_without_a_mode_write ... ok
test plans::tests::every_kind_publishes_into_its_own_artifact_directory ... ok
test plans::tests::enter_plan_mode_uses_the_active_turn_and_tool_identity ... ok
test plans::tests::entering_goal_mode_writes_the_goal_mode_and_kind ... ok
test config_sync::domains::tests::project_identities_are_local_stable_and_mapping_overrides_are_used ... ok
test plans::tests::existing_plan_symlink_is_rejected ... ok
test notifications::tests::terminal_turns_keep_only_the_latest_two_hundred_notifications ... ok
test plans::tests::goal_contract_round_trips_through_its_own_kind ... ok
test plans::tests::oversized_markdown_is_rejected_before_artifact_creation ... ok
test plans::tests::history::plan_history_returns_authoritative_approved_snapshot_without_rewriting_transcript ... ok
test plans::tests::pending_rows_are_interrupted_during_database_restart ... ok
test plans::tests::title_slug_and_filename_are_descriptive_and_local_minute_shaped ... ok
test plans::tests::publication_collides_without_overwriting ... ok
test plans::tests::history::plan_history_is_page_scoped_survives_reopen_and_retains_superseded_versions ... ok
test plans::tests::submitting_the_other_contract_kind_is_rejected ... ok
test plans::tests::reject_has_no_side_effects_and_allows_new_turn_submission ... ok
test plugin_sessions::tests::batch_skip_is_partial_and_fail_rolls_back ... ok
test plugin_sessions::tests::import_is_host_owned_idempotent_and_keeps_history_unbound ... ok
test plugin_sessions::tests::import_can_use_an_explicit_host_project_id ... ok
test plugin_sessions::tests::invalid_input_is_rejected_without_a_row ... ok
test plugin_sessions::tests::import_rejects_unknown_project_ids_without_writing ... ok
test plugin_usage::tests::cursor_round_trips_ids_with_colons ... ok
test plugin_usage::tests::null_bounds_match_omitted_bounds ... ok
test plugin_usage::tests::window_rejects_inverted_and_oversized_ranges ... ok
test plugins::device::tests::a_machine_identifier_is_reported_as_a_digest ... ok
test plugins::device::tests::a_machine_without_an_identifier_keeps_what_it_generated ... ok
test plugin_sessions::tests::list_messages_marks_external_and_paginates ... ok
test plugins::device::tests::an_unusable_stored_value_is_replaced ... ok
test plugins::manifest::tests::a_missing_main_entry_fails_the_load ... ok
test plugins::progress::tests::a_cancel_after_the_first_report_is_visible_to_the_install ... ok
test plugins::progress::tests::a_report_carries_the_mirror_it_is_about ... ok
test plugins::progress::tests::cancel_active_install_flips_the_armed_token ... ok
test plugins::manifest::tests::a_declared_panel_must_exist ... ok
test plugins::progress::tests::only_a_cancellation_reads_as_one ... ok
test plugins::providers::tests::a_default_outside_the_declared_list_is_dropped ... ok
test plugin_sessions::tests::tool_import_scrubs_reserved_fields_and_rejects_invalid_timestamps ... ok
test plugin_sessions::tests::list_rename_trash_and_purge_follow_plugin_ownership ... ok
test plugins::providers::tests::a_new_database_carries_the_owner_column_at_the_current_schema_version ... ok
test plugin_sessions::tests::ownership_filters_other_plugins_and_purge_allows_reimport ... ok
test plugins::providers::tests::declared_providers_reads_the_manifest ... ok
test plugins::providers::tests::declared_thinking_levels_are_normalized ... ok
test plugins::providers::tests::a_disabled_plugin_writes_its_rows_off ... ok
test plugins::providers::tests::a_row_another_owner_holds_makes_the_sync_fail_rather_than_no_op ... ok
test plugins::providers::tests::a_shrinking_declaration_keeps_the_survivors ... ok
test plugins::providers::tests::a_user_row_is_never_adopted_or_removed ... ok
test plugins::providers::tests::malformed_thinking_level_fields_are_rejected_by_manifest_validation ... ok
test plugins::providers::tests::declared_thinking_levels_survive_into_the_row ... ok
test plugins::providers::tests::disabling_and_removing_a_plugin_take_its_rows_with_it ... ok
test plugins::providers::tests::dropping_the_api_key_auth_kind_clears_the_stored_key ... ok
test plugins::providers::tests::dropping_a_declared_model_forgets_its_cached_row ... ok
test plugins::providers::tests::moving_a_declared_endpoint_forgets_the_discovered_answer ... ok
test plugins::providers::tests::the_declaration_requires_the_permission ... ok
test plugins::providers::tests::the_declaration_shape_is_validated ... ok
test plugins::providers::tests::sync_is_declarative_and_drops_a_removed_declaration ... ok
test plugins::providers::tests::sync_keeps_provider_config_it_does_not_own ... ok
test plugins::renderer::tests::a_granted_module_entry_inside_the_package_is_accepted ... ok
test plugins::renderer::tests::a_symlinked_entry_cannot_escape_the_package ... ok
test plugins::renderer::tests::the_entry_must_be_an_existing_module_file ... ok
test plugins::renderer::tests::the_renderer_surface_requires_its_permission_and_an_entry ... ok
test plugins::providers::tests::sync_writes_rows_owned_by_the_plugin ... ok
test plugins::resolve::tests::a_rate_limit_waits_what_the_platform_asked_for ... ok
test plugins::resolve::tests::a_refusal_is_not_recoverable_and_a_dead_deployment_is ... ok
test plugins::resolve::tests::the_endpoint_keeps_the_catalogs_origin ... ok
test plugins::renderer::tests::whitelists_are_bounded_and_non_empty ... ok
test plugins::providers::tests::the_user_can_supply_the_key_a_plugin_row_asks_for ... ok
test plugins::providers::tests::the_user_path_refuses_a_plugin_owned_row ... ok
test plugins::tests::a_package_url_off_the_allowlist_is_not_offered_for_install ... ok
test plugins::tests::a_partial_translation_falls_back_per_field ... ok
test plugins::tests::a_plugin_without_an_i18n_block_keeps_the_authors_strings ... ok
test plugins::tests::a_private_catalog_is_trusted_only_for_its_own_host ... ok
test config_sync::crypto::tests::rewrap_preserves_the_vault_key_and_changes_the_password ... ok
test config_sync::engine::handlers::credential_tests::stored_password_stays_on_its_server_and_pause_survives_a_resave ... ok
test config_sync::domains::tests::captures_only_the_app_managed_project_instruction_file ... ok
test plugins::tests::a_newer_shipped_version_replaces_an_older_user_install ... ok
test plugins::providers::tests::startup_reconciliation_removes_a_row_whose_plugin_is_gone ... ok
test plugins::tests::a_project_scope_survives_a_reload_and_a_reinstall ... ok
test plugins::tests::backup_channels_each_resolve_their_own_packages ... ok
test plugins::tests::a_version_requiring_a_newer_host_is_not_installable ... ok
test plugins::tests::a_yanked_version_is_never_offered_or_installed ... ok
test plugins::tests::bundled_plugin_can_default_to_disabled_without_overwriting_user_state ... ok
test plugins::tests::contributed_paths_must_stay_inside_the_plugin ... ok
test plugins::tests::curl_diagnostic_decoding_preserves_utf8 ... ok
test plugins::tests::bundled_plugins_refresh_from_disk_but_keep_user_state ... ok
test plugins::tests::global_shortcut_entries_are_validated ... ok
test plugins::tests::global_shortcuts_require_permission_and_a_declared_command ... ok
test plugins::tests::a_bundled_plugin_keeps_the_update_the_user_installed ... ok
test plugins::tests::a_plugin_a_build_stops_shipping_is_no_longer_bundled ... ok
test config_sync::engine::tests::append_only_mode_syncs_with_a_server_that_ignores_preconditions ... ok
test plugins::tests::accepts_and_summarizes_new_contributions ... ok
test plugins::tests::market_channel_from_settings_selects_the_configured_channel ... ok
test plugins::tests::an_install_reports_progress_and_honours_a_cancel ... ok
test plugins::tests::announced_version_without_a_package_is_visible_but_not_installable ... ok
test plugins::tests::cached_catalog_is_scoped_to_the_source_that_fetched_it ... ok
test plugins::tests::default_catalog_materializes_packages_under_manager_data_dir ... ok
test plugins::tests::missing_contributed_files_are_rejected ... ok
test plugins::tests::package_downloads_are_restricted_to_distribution_hosts ... ok
test plugins::tests::high_risk_permissions_roundtrip_on_notes_plugin ... ok
test plugins::tests::package_relative_theme_asset_budget_is_enforced_across_files ... ok
test plugins::tests::package_relative_theme_assets_cannot_escape_through_symlinks ... ok
test plugins::tests::package_urls_reject_credentials_and_plain_http ... ok
test plugins::tests::install_from_package_accepts_a_package_relative_theme_asset ... ok
test plugins::tests::plugin_ui_meta_parses_the_floating_widget_placement ... ok
test plugins::tests::install_market_package_and_check_update_metadata ... ok
test plugins::tests::relative_package_urls_resolve_against_the_declared_artifact_base ... ok
test plugins::tests::remote_mcp_urls_accept_non_loopback_http ... ok
test plugins::tests::resolve_relative_package_urls_against_catalog ... ok
test plugins::tests::market_cards_and_details_read_the_catalog_i18n_block ... ok
test plugins::tests::services_and_bus_declarations_are_checked ... ok
test plugins::tests::stdio_mcp_commands_may_not_escape_the_plugin ... ok
test plugins::tests::market_entry_offers_an_update_only_when_the_catalog_is_newer ... ok
test plugins::tests::market_search_preserves_catalog_order ... ok
test plugins::tests::marketplace_install_refreshes_catalog_before_checksum_verification ... ok
test plugins::tests::marketplace_uses_highest_semver_when_catalog_versions_are_unsorted ... ok
test plugins::tests::theme_contributions_require_permission_and_css ... ok
test plugins::tests::theme_assets_accept_package_relative_and_absolute_whitelisted_paths ... ok
test plugins::tests::view_contributions_require_permission_and_an_existing_entry ... ok
test plugins::tests::window_appearance_requires_permission_and_a_hex_colour ... ok
test providers::catalog::tests::a_binding_without_a_source_stays_unmarked ... ok
test providers::catalog::tests::a_binding_without_limits_keeps_its_siblings ... ok
test providers::catalog::tests::a_catalog_sourced_binding_survives_the_config_round_trip ... ok
test providers::catalog::tests::a_non_array_models_value_reads_the_legacy_binding ... ok
test providers::catalog::tests::an_all_unreadable_array_still_reads_the_legacy_binding ... ok
test providers::catalog::tests::an_empty_models_array_reads_the_legacy_binding ... ok
test providers::catalog::tests::an_unknown_source_is_dropped_instead_of_persisted ... ok
test providers::catalog::tests::an_unreadable_binding_costs_only_itself ... ok
test providers::catalog::tests::malformed_model_storage_is_explicitly_degraded ... ok
test providers::catalog::tests::omit_default_survives_on_reasoning_bindings_only ... ok
test providers::catalog::tests::zero_limits_still_fall_back_to_the_generic_defaults ... ok
test providers::order_tests::provider_moves_preserve_configuration_and_new_or_disabled_rows ... ok
test providers::order_tests::provider_order_is_applied_on_read_and_survives_reopening ... ok
test providers::order_tests::provider_order_rejects_stale_moves_and_ignores_deleted_ids_on_read ... ok
test providers::tests::a_probe_answer_forgets_models_it_no_longer_publishes ... ok
test providers::tests::a_provider_can_hold_both_an_api_key_and_a_vendor_account ... ok
test providers::tests::a_stored_array_survives_an_entry_that_lost_a_field ... ok
test providers::tests::alias_length_is_limited_to_sixty_characters ... ok
test providers::tests::alias_survives_provider_create_and_update ... ok
test providers::tests::alias_survives_the_provider_config_round_trip ... ok
test providers::tests::an_oauth_credential_alone_makes_the_provider_ready ... ok
test providers::tests::changing_the_endpoint_forgets_the_discovered_answer ... ok
test providers::tests::degraded_model_array_cannot_be_overwritten_by_update ... ok
test providers::tests::deleting_a_binding_and_saving_forgets_its_cached_parameters ... ok
test providers::tests::discovered_models_are_cached_without_overwriting_user_rows ... ok
test providers::tests::header_values_fold_fullwidth_and_reject_non_latin1 ... ok
test providers::tests::headers_roundtrip_migrate_user_agent_clear_and_reject ... ok
test providers::tests::limit_overrides_roundtrip_and_clear_with_zero ... ok
test providers::tests::model_bindings_roundtrip_and_legacy_model_migrates_on_read ... ok
test providers::tests::normalize_model_bindings_preserves_known_thinking_protocols_only ... ok
test providers::tests::normalize_model_bindings_trims_aliases_and_drops_blank_ones ... ok
test providers::tests::over_long_alias_is_rejected_by_the_write_paths ... ok
test providers::tests::over_long_alias_leaves_stored_secrets_untouched ... ok
test providers::tests::provider_api_keys_fold_fullwidth_on_write_and_read ... ok
test providers::tests::provider_without_override_omits_reasoning_capability ... ok
test providers::tests::reasoning_override_roundtrips_and_preserves_provider_config ... ok
test providers::tests::sync_payloads_keep_only_storable_headers ... ok
test providers::tests::thinking_levels_override_normalizes_and_can_clear ... ok
test review::tests::added_file_rollback_removes_the_file ... ok
test review::tests::deleted_file_rollback_restores_previous_bytes ... ok
test review::tests::records_line_changes_and_rolls_back_without_git ... ok
test review::tests::refuses_to_overwrite_a_later_edit ... ok
test rpc::image_generation_settings_tests::validates_optional_image_binding ... ok
test rpc::scheduled_rpc::project_tests::admitted_scheduled_run_blocks_removal_before_a_turn_is_opened ... ok
test plugins::tests::package_path_traversal_rejected ... ok
test plugins::tests::plugin_rows_read_the_i18n_block_for_the_active_locale ... ok
test rpc::scheduled_rpc::project_tests::removal_pauses_only_bound_tasks_and_preserves_definitions_and_history ... ok
test rpc::scheduled_rpc::tests::automation_sessions_are_marked_and_released_with_their_task ... ok
test config_sync::engine::tests::two_devices_sync_credentials_capabilities_and_disjoint_edit ... ok
test rpc::scheduled_rpc::tests::automatic_admission_is_durable_single_flight_and_uses_ask ... ok
test rpc::scheduled_rpc::tests::invalid_schedule_does_not_mutate_task ... ok
test rpc::scheduled_rpc::tests::legacy_task_uses_current_workspace_until_explicitly_configured ... ok
test rpc::scheduled_rpc::tests::legacy_tasks_keep_their_previous_execution_defaults ... ok
test rpc::scheduled_rpc::tests::review_deleted_project_is_not_recreated_by_automatic_task ... ok
test rpc::scheduled_rpc::tests::reuse_tasks_continue_one_conversation_and_per_run_tasks_do_not ... ok
test plugins::tests::refresh_catalog_from_the_github_backup_when_network_available ... ok
test plugins::tests::silent_update_check_uses_cached_catalog_without_refreshing_remote ... ok
test plugins::tests::switching_source_ignores_the_previous_providers_snapshot ... ok
test rpc::scheduled_rpc::tests::selected_weekdays_round_trip_and_invalid_edits_preserve_saved_schedule ... ok
test rpc::scheduled_rpc::tests::manual_task_keeps_saved_workspace_across_run_edit_and_restart ... ok
test rpc::scheduled_rpc::tests::the_task_column_asks_for_one_newest_run_per_task ... ok
test rpc::scheduled_tools::tests::scheduled_mutations_require_approval_outside_auto_mode ... ok
test rpc::scheduled_rpc::tests::task_execution_settings_are_persisted_per_task_and_used_for_runs ... ok
test rpc::scheduled_tools::tests::tool_schema_offers_the_interval_cadence_and_its_value ... ok
test rpc::tests::a_request_that_could_not_flush_its_transcript_does_not_answer_success ... ok
test rpc::scheduled_tools::tests::manual_to_hourly_update_needs_no_calendar_schedule ... ok
test rpc::scheduled_tools::tests::review_legacy_task_can_be_paused_without_arming_it ... ok
test rpc::scheduled_tools::tests::scheduled_tools_crud_preserves_exact_time_and_session_project ... ok
test rpc::tests::bash_mismatch_does_not_register_a_cancellation ... ok
test plugins::tests::the_plugin_center_resolves_a_published_package ... ok
test plugins::tests::the_registry_never_persists_the_i18n_block ... ok
test plugins::tests::verified_trust_is_honoured_only_from_the_official_source ... ok
test rpc::tests::budget_cuts_loose_a_request_waiting_on_the_global_lock ... ok
test rpc::tests::budget_passes_fast_results_through ... ok
test rpc::tests::budget_ends_slow_request_with_host_rpc_timeout ... ok
test rpc::tests::budget_recovery_lets_a_fresh_request_through_after_the_holder_releases ... ok
test rpc::tests::budget_times_out_concurrent_lock_waiters_independently ... ok
test rpc::tests::capability_errors_keep_their_protocol_code ... ok
test rpc::tests::capability_target_requires_an_explicit_string_level ... ok
test rpc::tests::bash_rejects_a_changed_shell_before_running_the_command ... ok
test rpc::tests::control_stdio_treats_os_resource_pressure_as_transient ... ok
test rpc::tests::bash_output_is_streamed_with_shell_identity_and_unicode ... ok
test rpc::tests::bash_rejects_a_stale_shell_dialect_before_permission_or_spawn ... ok
test rpc::tests::begin_turn_reports_agent_busy_without_creating_a_duplicate ... ok
test rpc::tests::command_shell_settings_and_catalog_roundtrip ... ok
test rpc::tests::builtin_delegate_without_permission_scope_inherits_auto_for_external_glob ... ok
test rpc::tests::bash_timeout_and_early_session_error_clean_the_registry ... ok
test rpc::tests::default_shell_setting_is_idle_only_across_turn_and_plan_work ... ok
test rpc::tests::delegate_permission_scope_overrides_session_mode_without_opening_external_paths ... ok
test rpc::tests::peek_jsonrpc_id_is_null_when_the_prefix_has_no_id ... ok
test rpc::tests::peek_jsonrpc_id_reads_a_numeric_id ... ok
test rpc::tests::peek_jsonrpc_id_reads_a_string_id_from_a_truncated_prefix ... ok
test rpc::tests::group_member_absolute_paths_use_only_registered_group_roots ... ok
test rpc::tests::goal_authorization_reuses_the_durable_contract_mode_hard_deny ... ok
test rpc::tests::grouped_folder_with_chats_can_be_detached_and_deleted_separately ... ok
test rpc::tests::inflight_checkpoint_rpc_lifecycle ... ok
test rpc::scheduled_tools::calendar_tests::saved_calendar_survives_hourly_and_restart_including_midnight ... ok
test rpc::tests::outside_paths_prompt_in_plan_and_auto_allows_after_mode_switch ... ok
test rpc::tests::permissions_pending_lists_the_open_request_until_resolved ... ok
test rpc::tests::plan_rpc_submits_immediately_and_roundtrips_execution_outbox ... ok
test rpc::tests::notification_rpc_lifecycle ... ok
test rpc::tests::plan_enter_rpc_accepts_the_active_agent_turn ... ok
test rpc::tests::plugin_labels_follow_the_pushed_app_language ... ok
test rpc::tests::plugin_session_rpc_routes_the_full_p0_p1_surface ... ok
test rpc::tests::plugin_usage_rpc_serves_read_only_fact_rows ... ok
test rpc::tests::project_create_returns_an_id_without_switching_workspace ... ok
test rpc::tests::project_group_rpc_roundtrips_context_and_roots ... ok
test rpc::tests::project_group_update_rpc_adjusts_folders ... ok
test rpc::tests::project_memory_rpc_roundtrips_without_switching_workspace ... ok
test rpc::tests::projects_remove_deletes_project_sessions_and_transcripts ... ok
test rpc::tests::provider_alias_validation_keeps_a_stable_error_code ... ok
test rpc::tests::plan_authorization_uses_durable_mode_and_keeps_bash_permission_semantics ... ok
test rpc::tests::request_budget_for_tools_execute_follows_tool_timeout ... ok
test rpc::tests::request_budget_is_fixed_for_non_tool_methods ... ok
test rpc::tests::request_budget_reads_the_camel_case_wire_shape_regression_1208 ... ok
test rpc::scheduled_tools::calendar_tests::hourly_calendar_conversion_requires_calendar_intent_after_restart ... ok
test rpc::tests::projects_remove_deletes_single_folder_stored_group ... ok
test rpc::tests::projects_remove_keeps_sessions_of_other_projects ... ok
test rpc::scheduled_tools::tests::legacy_maintenance_preserves_data_but_does_not_silently_enable ... ok
test rpc::tests::projects_remove_detaches_stored_group_root_and_promotes_next_root ... ok
test rpc::tests::projects_remove_refuses_while_a_session_is_running_without_detaching_group ... ok
test rpc::tests::settings_set_allows_a_genuine_shell_change_when_idle ... ok
test rpc::tests::projects_remove_unknown_path_is_idempotent ... ok
test rpc::tests::settings_set_preserves_stored_shell_when_shell_is_omitted ... ok
test rpc::tests::settings_set_rejects_a_genuine_shell_change_during_an_active_turn ... ok
test rpc::tests::prompt_enhancement_templates_round_trip_and_validate ... ok
test rpc::tests::provider_model_cache_roundtrips_through_rpc ... ok
test rpc::tests::session_create_rpc_inherits_optional_permission_mode ... ok
test rpc::tests::stdout_message_retries_partial_writes_without_duplication ... ok
test rpc::tests::settings_get_repairs_a_binding_left_by_a_deleted_provider ... ok
test rpc::tests::scheduled_agent_task_ignores_global_plan_default ... ok
test rpc::tests::settings_rejects_unavailable_or_cross_platform_shell ... ok
test rpc::tests::settings_set_round_trips_an_explicitly_disabled_shortcut ... ok
test rpc::tests::settings_set_round_trips_live_voice_without_changing_dictation_settings ... ok
test rpc::tests::settings_keep_image_bindings_for_a_disabled_provider ... ok
test rpc::tests::settings_set_drops_image_bindings_whose_provider_is_gone ... ok
test rpc::tests::tools_execute_budget_covers_bash_max_and_unbounded_tools ... ok
test rpc::tests::settings_set_same_shell_is_idempotent_during_an_active_turn ... ok
test rpc::tests::temporary_session_reads_and_writes_inside_its_scratch_workspace ... ok
test rpc::tests::tool_execute_audit_records_segmented_timing ... ok
test rpc::tests::scheduled_run_rejects_contract_modes_before_creating_session_or_run ... ok
test rpc::tests::tool_workspace_follows_the_persisted_session_project ... ok
test rpc::tests::temporary_session_uses_its_own_scratch_workspace ... ok
test rpc::tests::tools_abort_before_approval_cleans_the_cancellation_registry ... ok
test rpc::update_settings_tests::validates_update_preference_and_reminder_version ... ok
test scheduled::automation::tests::due_paused_overlap_missed_and_restart_paths ... ok
test scheduled::automation::tests::interval_tasks_wait_their_own_minutes_and_need_their_value ... ok
test scheduled::automation::tests::legacy_tasks_are_not_armed_and_explicit_schedule_survives_edits ... ok
test scheduled::tests::crud_and_run_lifecycle ... ok
test scheduled::tests::import_is_idempotent_and_preserves_fields ... ok
test scheduled::tests::mode_roundtrips_crud_and_import_in_config_json ... ok
test scheduled::tests::the_task_column_reads_each_tasks_own_newest_run ... ok
test scheduled::timing::tests::daylight_saving_skips_missing_and_duplicate_daily_times ... ok
test scheduled::timing::tests::hourly_waits_a_full_hour_independent_of_calendar_fields ... ok
test scheduled::timing::tests::interval_cadence_waits_its_own_minutes_and_requires_them ... ok
test scheduled::timing::tests::legacy_weekday_survives_and_invalid_day_selections_are_rejected ... ok
test scheduled::timing::tests::next_occurrence_is_strictly_future_and_obeys_cadence ... ok
test scheduled::timing::tests::rejects_invalid_times_instead_of_silently_running ... ok
test scheduled::timing::tests::weekly_selection_skips_unselected_days_and_wraps_the_week ... ok
test scratch::tests::rejects_unsafe_session_ids ... ok
test scratch::tests::remove_is_idempotent ... ok
test scratch::tests::sweep_removes_orphans_keeps_live ... ok
test secrets::tests::decrypts_a_secret_written_by_an_earlier_build ... ok
test secrets::tests::each_write_uses_a_fresh_nonce ... ok
test secrets::tests::oauth_and_api_key_refs_do_not_collide ... ok
test secrets::tests::rejects_a_blob_whose_tag_does_not_authenticate ... ok
test session_collaboration::tests::a_claim_that_loses_the_race_returns_conflict_and_rolls_back ... ok
test session_collaboration::tests::begin_turn_twice_reports_conflict_without_a_second_turn ... ok
test session_collaboration::tests::deleted_creator_keeps_its_reference_and_reports_it_unavailable ... ok
test session_collaboration::tests::deleted_message_source_survives_the_ledger_and_reports_an_unavailable_peer ... ok
test session_collaboration::tests::failed_turn_does_not_promote_intermediate_output ... ok
test session_collaboration::tests::projections_expose_readable_model_names_and_session_discovery_links ... ok
test session_collaboration::tests::provenance_cannot_be_forged_or_stripped_and_permissions_are_rechecked ... ok
test session_collaboration::tests::queued_cancellation_keeps_the_session_and_notifies_once ... ok
test session_collaboration::tests::schema_v15_upgrade_preserves_sessions_and_adds_the_ledger ... ok
test session_collaboration::tests::sessions_are_reused_and_send_is_idempotent ... ok
test session_collaboration::tests::steering_input_persists_without_inheriting_delivery_origin ... ok
test session_collaboration::tests::turn_bound_result_and_callback_are_durable_and_exactly_once ... ok
test session_search::tests::context_uses_physical_positions_and_finds_matches_beyond_display_cap ... ok
test session_search::tests::excerpts_include_the_whole_query_when_it_exceeds_the_preview_budget ... ok
test rpc::tests::tools_abort_during_permission_removes_the_pending_request ... ok
test rpc::todos::tests::the_checklist_is_session_scoped_and_has_no_public_setter ... ok
test rpc::todos::tests::refusals_never_mutate_and_never_emit ... ok
test session_search::tests::search_literals_snippets_roles_and_deleted_sessions ... ok
test session_search::tests::sentence_previews_preserve_long_and_multiline_matches ... ok
test session_search::tests::search_previews_show_the_matching_sentence ... ok
test session_search::tests::nested_search_navigation_includes_the_parent_without_expanding_the_page ... ok
test sessions::fork_files::tests::copies_structured_and_compacted_inputs_and_rolls_back_until_committed ... ok
test sessions::fork_files::tests::expired_inputs_do_not_prevent_forking ... ok
test sessions::fork_files::tests::rewrites_nested_paths_without_matching_file_name_prefixes ... ok
test sessions::model_system::tests::rejects_invalid_state_or_hiding_a_user_message ... ok
test sessions::model_system::tests::state_roundtrips_in_canonical_metadata_and_remaps_fork_anchors ... ok
test sessions::fork_files::tests::refuses_referenced_symlinks_and_symlinked_input_directories ... ok
test rpc::todos::tests::the_checklist_requires_agent_mode_and_an_owned_running_turn ... ok
test sessions::tests::a_failed_transcript_flush_can_be_retried_without_a_phantom_index ... ok
test sessions::tests::a_message_written_before_the_streaming_column_answers_from_the_transcript ... ok
test rpc::todos::tests::todo_write_commits_and_emits_the_committed_snapshot_once ... ok
test sessions::tests::a_reply_whose_transcript_row_was_lost_is_appended_back_on_recovery ... ok
test sessions::tests::a_replaced_message_keeps_its_position_for_an_around_window ... ok
test sessions::tests::a_settled_index_row_over_a_provisional_transcript_row_still_recovers ... ok
test session_search::tests::search_counts_all_matches_and_pages_all_sessions ... ok
test sessions::tests::aborted_turn_does_not_create_notification ... ok
test sessions::tests::a_window_over_a_duplicated_id_stays_complete_and_reaches_the_head ... ok
test rpc::tests::tools_abort_during_execution_kills_bash_and_cleans_registry ... ok
test sessions::tests::activate_message_revision_keeps_a_stamped_unarchived_branch_as_its_own_variant ... ok
test sessions::tests::activate_message_revision_archives_the_grown_live_branch_first ... ok
test sessions::tests::append_and_roundtrip_tool_message ... ok
test sessions::tests::activate_message_revision_stores_a_later_familys_reference_first ... ok
test sessions::tests::a_live_branch_is_referenced_and_never_copied ... ok
test sessions::tests::append_creates_a_stub_session_when_the_transcript_is_also_gone ... ok
test sessions::tests::append_message_does_not_duplicate_a_unique_failed_jsonl_leftover ... ok
test sessions::tests::append_message_remaps_ids_owned_by_another_session ... ok
test sessions::tests::assistant_error_roundtrips_in_message_metadata ... ok
test sessions::tests::append_message_without_a_live_same_session_turn_keeps_the_message ... ok
test sessions::tests::append_recreates_a_missing_session_row_so_the_outbox_can_drain ... ok
test sessions::tests::assistant_thinking_roundtrips_as_canonical_blocks ... ok
test sessions::tests::assistant_hosted_search_roundtrips_as_canonical_blocks ... ok
test sessions::tests::begin_turn_rejects_a_second_running_turn_with_agent_busy ... ok
test sessions::tests::checkpoint_for_a_newer_fragment_survives_an_older_final_row ... ok
test sessions::tests::bounded_reads_use_physical_line_positions_not_the_dedup_counter ... ok
test sessions::tests::bounded_session_reads_page_history_and_cap_display_content ... ok
test sessions::tests::completed_turn_end_drops_checkpoint_once_the_final_row_landed ... ok
test sessions::tests::compaction_survives_restart_and_late_truncation_but_not_early_truncation ... ok
test sessions::tests::create_session_permission_mode_is_optional_and_validated ... ok
test sessions::tests::configure_session_persists_pi_runtime_selection ... ok
test sessions::tests::completed_turn_end_keeps_an_unindexed_checkpoint ... ok
test sessions::tests::completed_reply_fork_during_later_turn_preserves_the_running_source ... ok
test sessions::tests::create_session_returns_canonical_project_path ... ok
test sessions::tests::delete_session_removes_the_checkpoint_file ... ok
test sessions::tests::delete_session_removes_transcript_files ... ok
test sessions::tests::empty_streaming_message_is_not_checkpointed ... ok
test sessions::tests::dropping_a_branch_root_stores_its_live_reference_first ... ok
test sessions::tests::final_row_supersedes_checkpoint_and_late_checkpoint_cannot_resurrect_it ... ok
test sessions::tests::fork_index_failure_removes_copied_inputs_and_transcript ... ok
test sessions::tests::fork_copies_only_a_checkpoint_whose_boundary_is_included ... ok
test session_search::tests::transcript_navigation_reads_original_messages_by_stable_id ... ok
test sessions::tests::get_session_dedupes_retried_file_lines_keep_last ... ok
test sessions::tests::fork_remaps_each_checkpoint_in_the_chain_on_its_own ... ok
test sessions::tests::fork_preserves_referenced_pasted_files_independently ... ok
test sessions::tests::import_materializes_unique_projects_but_keeps_pathless_sessions_temporary ... ok
test sessions::tests::import_and_replace_preserve_thinking ... ok
test sessions::tests::fork_session_clones_active_transcript_and_configuration ... ok
test sessions::tests::import_session_is_idempotent_and_preserves_timestamps ... ok
test sessions::tests::move_session_project_reassigns_only_the_project_and_rejects_running_turns ... ok
test sessions::tests::nested_lineage_roundtrips_independently_of_legacy_task_parent ... ok
test sessions::tests::missing_session_row_is_restored_from_transcript ... ok
test sessions::tests::message_scoped_fork_stops_at_selected_assistant_response ... ok
test sessions::tests::opening_a_database_creates_the_message_ordering_indexes ... ok
test sessions::tests::inflight_checkpoint_is_promoted_as_aborted_after_reopen ... ok
test sessions::tests::refresh_message_revision_rejects_an_unknown_index ... ok
test sessions::tests::rename_session_normalizes_title_without_touching_activity ... ok
test sessions::tests::recover_orphaned_sessions_restores_transcript_files_without_rows ... ok
test sessions::tests::opening_a_database_adds_the_streaming_column ... ok
test sessions::tests::replace_messages_preserves_owning_turn_ids ... ok
test sessions::tests::replace_messages_resets_stream ... ok
test sessions::tests::save_active_branch_revision_is_none_without_regenerate_history ... ok
test sessions::tests::restore_orphaned_session_remaps_ids_owned_by_another_session ... ok
test sessions::tests::save_active_branch_revision_keeps_a_message_appended_after_its_read ... ok
test sessions::tests::replay_after_a_failed_index_insert_updates_transcript_without_duplicate_or_reordering ... ok
test sessions::tests::save_active_branch_revision_refreshes_an_already_archived_branch ... ok
test sessions::tests::save_active_branch_revision_restamps_an_already_archived_branch ... ok
test sessions::tests::save_and_activate_message_revision ... ok
test sessions::tests::search_finds_cjk_and_short_queries ... ok
test sessions::tests::search_snippets_center_on_the_match_not_the_document_head ... ok
test sessions::tests::sidecar_loss_recovers_the_checkpoint_at_turn_end ... ok
test sessions::tests::subagent_attribution_roundtrips ... ok
test sessions::tests::the_streaming_column_tracks_the_last_copy_of_a_message ... ok
test sessions::tests::token_usage_history_aggregation ... ok
test sessions::tests::the_streaming_guard_answers_from_the_index_not_from_the_transcript ... ok
test sessions::tests::the_whole_checkpoint_chain_survives_restart_and_partial_truncation ... ok
test sessions::tests::token_usage_history_defaults_to_a_bounded_window ... ok
test sessions::tests::the_streaming_bit_matches_the_transcript_under_random_appends ... ok
test sessions::tests::token_usage_history_uses_iso_week_year ... ok
test sessions::tests::transcript_survives_reopen_from_file ... ok
test sessions::tests::truncate_from_drops_the_tail_and_archives_the_discarded_branch ... ok
test sessions::tests::truncate_from_rejects_an_unknown_message ... ok
test sessions::tests::truncate_from_refreshes_the_stamped_revision ... ok
test sessions::tests::turns_lifecycle ... ok
test sessions::usage::tests::equal_token_replay_preserves_known_cost ... ok
test sessions::usage::tests::oversized_counts_cannot_overflow_the_ledger ... ok
test sessions::usage::tests::usage_ledger_deduplicates_child_parent_and_replayed_snapshots ... ok
test sessions::tests::usage_accounting_roundtrips_without_rewriting_legacy_tokens ... ok
test sessions::tests::search_results_do_not_depend_on_the_ordering_indexes ... ok
test sessions::tests::user_attachments_roundtrip_as_canonical_blocks ... ok
test sessions::tests::visible_turn_does_not_create_notification ... ok
test sessions::tests::user_stop_keeps_the_checkpoint_until_the_final_row_lands ... ok
test sessions::tests::truncate_from_stores_a_later_familys_reference_first ... ok
test sessions::usage::tests::usage_ledger_survives_restart_and_rejects_wrong_turn_owner ... ok
test todos::tests::normalization_rejects_invalid_payloads_without_a_partial_list ... ok
test todos::tests::normalization_trims_defaults_priority_and_keeps_only_one_active_item ... ok
test todos::tests::normalization_truncates_over_long_unicode_content_with_a_warning ... ok
test todos::tests::a_failure_inside_the_transaction_rolls_back_items_and_revision ... ok
test todos::tests::a_forked_session_starts_empty_at_revision_zero ... ok
test todos::tests::replace_preserves_order_and_clearing_advances_the_revision ... ok
test tool_budget::tests::all_tool_classes_enforce_shared_alias_limits ... ok
test tool_budget::tests::bounded_queue_rejects_overflow_and_recovers_after_cancellation ... ok
test tool_budget::tests::cancelling_notified_waiter_returns_reserved_capacity ... ok
test tool_budget::tests::cancelling_waiter_removes_queue_entry_and_releases_capacity ... ok
test tool_budget::tests::class_backlog_does_not_reserve_session_capacity ... ok
test tool_budget::tests::dispatch_skips_a_blocked_class_for_the_oldest_runnable_request ... ok
test tool_budget::tests::global_capacity_is_released_without_reserving_waiting_class ... ok
test tool_budget::tests::limits_shell_concurrency_and_reports_active_work ... ok
test tool_budget::tests::mutation_backlog_does_not_reserve_other_sessions_mutation_capacity ... ok
test tool_budget::tests::older_eligible_waiter_is_admitted_before_new_requests ... ok
test tool_budget::tests::separates_session_capacity ... ok
test tool_budget::tests::serializes_mutations_within_a_session ... ok
test tool_budget::tests::session_backlog_does_not_reserve_read_capacity ... ok
test tool_budget::tests::session_capacity_applies_across_classes ... ok
test tool_budget::tests::shell_backlog_does_not_reserve_global_capacity ... ok
test todos::tests::deleting_a_session_cascades_its_checklist_and_spares_its_neighbour ... ok
test tool_budget::tests::timeout_removes_only_its_queue_entry_and_preserves_running_capacity ... ok
test todos::tests::checklist_survives_a_restart ... ok
test tools::hashline::apply::tests::cut_deletes_the_range ... ok
test tools::hashline::apply::tests::inserts_before_and_after ... ok
test tools::hashline::apply::tests::no_op_is_an_error ... ok
test tools::hashline::apply::tests::overlapping_ranges_fail ... ok
test tools::hashline::apply::tests::rejects_stale_tag_unless_head_or_tail ... ok
test tools::hashline::apply::tests::provenance_rejects_unseen_then_merges ... ok
test tools::hashline::parse::tests::explains_missing_put_body_delimiter ... ok
test tools::hashline::apply::tests::replaces_a_range_and_appends ... ok
test tools::grep_rg::tests::json_match_line_is_clipped_and_crlf_stripped ... ok
test tools::hashline::parse::tests::parses_cut_rem_mv_and_optional_header ... ok
test tools::hashline::parse::tests::rejects_minus_rows_and_empty_put ... ok
test tools::hashline::parse::tests::parses_range_put_and_gap_insert ... ok
test tools::hashline::store::tests::drop_session_forgets_snapshots ... ok
test tools::hashline::store::tests::record_unions_seen_lines_on_same_text ... ok
test tools::hashline::tag::tests::bom_is_stripped_for_the_tag_and_restored_on_encode ... ok
test tools::hashline::tag::tests::hash_ignores_trailing_line_whitespace_and_crlf ... ok
test tools::hashline::tag::tests::split_and_join_round_trip_trailing_newline ... ok
test tools::hashline::tag::tests::strip_write_markup_drops_header_and_line_numbers ... ok
test tools::hashline::tag::tests::tag_is_four_uppercase_hex_and_stable ... ok
test tools::ignore_rules::tests::denylist_matches_keys_env_and_credentials ... ok
test tools::ignore_rules::tests::git_objects_tree_is_denied_by_path ... ok
test tools::ignore_rules::tests::rg_args_keep_only_denylist_when_scoped ... ok
test tools::shell::tests::catalog_defaults_and_fallback_are_platform_specific ... ok
test tools::shell::tests::invocation_builder_uses_each_dialect_contract ... ok
test tools::shell::tests::powershell_7_is_a_distinct_selection_with_the_powershell_contract ... ok
test tools::shell::tests::unavailable_powershell_7_falls_back_and_reports_it ... ok
test tools::shell::tests::unknown_configured_id_normalizes_to_platform_default ... ok
test tools::shell::tests::non_executable_file_is_rejected ... ok
test tools::shell::tests::user_login_path_probes_a_real_path ... ok
test tools::shell::tests::windows_exe_attrs_accept_normal_file ... ok
test tools::shell::tests::windows_exe_attrs_reject_directory ... ok
test tools::shell::tests::windows_exe_attrs_accept_store_appexeclink_alias ... ok
test tools::shell::tests::windows_exe_attrs_reject_missing_path ... ok
test tools::shell::tests::invocation_builder_rejects_nul_and_long_windows_commands ... ok
test tools::tests::approved_external_paths_work_for_write_and_edit ... ok
test tools::tests::approved_external_paths_work_for_read_and_search_tools ... ok
test todos::tests::the_database_rejects_out_of_contract_rows ... ok
test tools::tests::bash_exposes_scratch_dir_env ... ok
test tools::tests::bash_inherits_user_login_path ... ok
test todos::tests::writes_are_refused_for_ineligible_sessions_and_turns ... ok
test tools::tests::bash_nonzero_exit_preserves_output_and_marks_failure ... ok
test tools::tests::bash_timeout_accepts_one_through_six_hour_bound ... ok
test tools::tests::bash_timeout_defaults_at_the_tool_boundary ... ok
test tools::tests::bash_large_output_does_not_deadlock ... ok
test tools::tests::bash_stderr_keeps_the_tail ... ok
test tools::tests::desktop_dispatch_outlasts_every_electron_budget_it_wraps ... ok
test tools::tests::edit_accepts_legacy_old_string_new_string_shape ... ok
test tools::tests::bash_over_budget_output_spills_to_scratch ... ok
test tools::tests::default_ignores_and_workspace_ignore_file_hide_unscoped_walks_only ... ok
test tools::tests::edit_legacy_identical_replacement_leaves_file_unchanged ... ok
test tools::tests::edit_legacy_terminal_newline_only_change_reports_no_change ... ok
test tools::tests::edit_missing_file_reports_file_not_found ... ok
test tools::tests::edit_preserves_crlf_line_endings ... ok
test tools::tests::edit_rejects_a_stale_tag_and_applies_a_live_one ... ok
test tools::tests::captured_output_reports_what_it_omitted ... ok
test tools::tests::edit_legacy_replacement_preserves_unmatched_bytes ... ok
test tools::tests::grep_head_limit_bounds_hits ... ok
test tools::tests::grep_preserves_posix_literal_backslashes_in_workspace_paths ... ok
test tools::tests::grep_scopes_clips_and_bounds_results ... ok
test tools::tests::bash_output_accumulator_is_bounded_and_reports_omissions ... ok
test tools::tests::grep_system_rg_honors_scoped_ignore_and_head_limit ... ok
test tools::tests::glob_orders_by_mtime_and_bounds_entries ... ok
test tools::tests::read_clips_overlong_lines ... ok
test tools::tests::read_does_not_mark_a_filled_window_truncated ... ok
test tools::tests::read_missing_file_reports_file_not_found ... ok
test tools::tests::read_paginates_instead_of_refusing_large_files ... ok
test tools::tests::read_refuses_image_extension_with_non_image_bytes ... ok
test tools::tests::read_refuses_oversized_images ... ok
test tools::tests::read_rejects_binary_content ... ok
test tools::tests::read_rejects_directories_as_invalid_arguments_with_glob_guidance ... ok
test tools::tests::read_returns_image_blocks_for_image_files ... ok
test tools::tests::runner_config_frame_validation_rejects_malformed_payloads ... ok
test tools::tests::search_reaches_explicitly_named_ignored_directories ... ok
test tools::tests::security_denylist_blocks_read_write_edit_and_hides_search_results ... ok
test tools::tests::single_oversized_line_keeps_a_prefix ... ok
test tools::tests::tool_defs_advertise_the_scoping_parameters ... ok
test tools::tests::workspace_write_reports_workspace_root ... ok
test tools::tests::write_and_read_in_scratch_root ... ok
test tools::tests::write_creates_missing_parent_directories ... ok
test transcripts::tests::a_checkpoint_decided_later_always_wins ... ok
test transcripts::tests::a_payload_that_spells_another_family_is_not_an_answer ... ok
test transcripts::tests::a_request_whose_checkpoint_cannot_be_flushed_fails ... ok
test transcripts::tests::a_torn_newest_match_falls_back_to_the_stored_copy ... ok
test transcripts::tests::an_append_in_a_request_reports_a_failed_device_flush ... ok
test transcripts::tests::an_append_in_a_request_succeeds_after_flushing_its_line ... ok
test transcripts::tests::an_append_outside_a_request_reports_a_failed_device_flush ... ok
test transcripts::tests::append_after_torn_tail_terminates_the_torn_line_first ... ok
test transcripts::tests::append_creates_header_then_lines ... ok
test transcripts::tests::compaction_roundtrips_without_hiding_messages ... ok
test tools::tests::output_notifications_have_a_per_call_cap ... ok
test transcripts::tests::every_appended_compaction_survives_a_reload ... ok
test transcripts::tests::layout_is_rebuilt_after_a_shorter_rewrite ... ok
test transcripts::tests::layout_records_message_offsets_and_grows_incrementally ... ok
test transcripts::tests::concurrent_appends_keep_every_line_intact_and_in_its_own_session ... ok
test transcripts::tests::layout_window_always_returns_the_whole_compaction_chain ... ok
test transcripts::tests::missing_file_is_empty_transcript ... ok
test transcripts::tests::nested_type_keys_never_decide_a_line_kind ... ok
test transcripts::tests::read_skips_torn_tail_and_unknown_lines ... ok
test transcripts::tests::layout_window_reads_only_the_requested_tail ... ok
test transcripts::tests::read_tool_call_finds_ids_that_json_escapes ... ok
test transcripts::tests::reads_legacy_lines_whose_type_follows_their_blocks ... ok
test transcripts::tests::rejects_unsafe_session_ids ... ok
test transcripts::tests::remove_is_idempotent_and_clears_both_files ... ok
test transcripts::tests::revisions_resolve_the_newest_line_across_kinds ... ok
test transcripts::tests::revisions_roundtrip_by_root_and_index ... ok
test transcripts::tests::sniffing_classifies_lines_without_full_parsing ... ok
test transcripts::tests::rewrite_preserves_the_whole_compaction_chain ... ok
test transcripts::tests::swap_creates_the_target_when_it_does_not_exist ... ok
test transcripts::tests::swap_failure_keeps_the_target_and_the_temp_file ... ok
test transcripts::tests::swap_replaces_an_existing_target_with_the_temp_content ... ok
test transcripts::tests::transcript_contains_id_answers_from_the_id_field_alone ... ok
test transcripts::tests::window_read_keeps_only_requested_messages_but_returns_checkpoints ... ok
test transcripts::tests::write_transcript_replaces_content ... ok
test turn_queue::tests::deleting_the_session_drops_its_queue ... ok
test turn_queue::tests::malformed_voice_origin_is_reported_instead_of_dropped ... ok
test turn_queue::tests::prioritize_appends_to_the_priority_block_in_click_order ... ok
test turn_queue::tests::push_is_idempotent_per_principal_and_key ... ok
test turn_queue::tests::a_v16_queue_upgrades_with_its_rows_and_keeps_working ... ok
test turn_queue::tests::push_keeps_order_positions_and_the_bound ... ok
test turn_queue::tests::push_rejects_an_unknown_session_and_keeps_a_client_id ... ok
test turn_queue::tests::reorder_never_moves_a_prioritized_entry ... ok
test turn_queue::tests::reorder_swaps_adjacent_non_prioritized_entries ... ok
test turn_queue::tests::voice_origin_and_user_message_identity_roundtrip_through_queue ... ok
test turn_queue::tests::voice_origin_survives_database_reopen_without_replaying_or_reordering_entries ... ok
test turn_queue::tests::v19_queue_upgrade_preserves_existing_entries ... ok
test user_skills::package_tests::directory_skill_package_accepts_resources_above_the_document_limit ... ok
test user_skills::package_tests::directory_skill_package_rejects_a_package_above_the_total_limit ... ok
test user_skills::package_tests::directory_skill_package_rejects_a_resource_above_the_resource_limit ... ok
test user_skills::package_tests::directory_skill_package_accepts_a_data_shaped_package ... ok
test user_skills::package_tests::skill_document_limit_still_matches_the_prompt_sized_cap ... ok
test user_skills::tests::a_chinese_named_skill_moves_without_hiding_the_other_levels_copy ... ok
test user_skills::tests::a_directory_skill_moves_with_its_resources ... ok
test user_skills::tests::a_disabled_project_skill_becomes_the_global_default ... ok
test user_skills::tests::a_global_skill_moves_into_a_project ... ok
test user_skills::tests::a_name_collision_rewrites_only_the_documents_name_line ... ok
test user_skills::tests::a_names_slug_is_not_used_when_that_id_belongs_to_another_document ... ok
test user_skills::tests::a_renamed_directory_skill_keeps_its_resources ... ok
test user_skills::tests::a_skill_without_frontmatter_gains_a_name_when_it_has_to_rename ... ok
test user_skills::tests::capability_state_is_not_written_into_skill_documents ... ok
test user_skills::tests::directory_import_without_skill_md_is_rejected ... ok
test user_skills::tests::directory_skill_package_rejects_traversal ... ok
test user_skills::tests::directory_skill_package_resources_round_trip_without_execution ... ok
test user_skills::tests::directory_skills_do_not_collide_on_the_skill_file_stem ... ok
test user_skills::tests::disabled_project_skill_shadows_global_skill ... ok
test user_skills::tests::import_uses_parent_directory_when_name_is_not_ascii ... ok
test user_skills::tests::imports_a_directory_with_skill_md_in_copy_mode ... ok
test user_skills::tests::imports_a_directory_with_skill_md_in_link_mode ... ok
test user_skills::tests::imports_a_file_in_link_mode ... ok
test user_skills::package_tests::directory_skill_package_rejects_more_files_than_the_limit ... ok
test user_skills::tests::imports_one_file_into_the_selected_agents_directory ... ok
test user_skills::tests::placement_uses_the_id_the_scan_will_derive_from_the_name ... ok
test user_skills::tests::project_skills_shadow_global_skills_by_name ... ok
test user_skills::tests::rewriting_a_name_keeps_the_frontmatter_shaped_document_intact ... ok
test user_skills::tests::shape_dir_requires_a_directory_source ... ok
test user_skills::tests::unknown_import_mode_is_rejected ... ok
test user_subagents::model_fallbacks::tests::invalid_pins_and_frontmatter_injection_are_rejected ... ok
test user_subagents::model_fallbacks::tests::ordered_lists_accept_both_spellings_and_preserve_model_slashes ... ok
test user_skills::tests::placement_reports_exhaustion_instead_of_reusing_a_taken_name ... ok
test user_subagents::tests::a_blank_builtin_handle_is_rejected ... ok
test user_subagents::tests::a_cleared_model_is_none_and_a_malformed_one_is_rejected ... ok
test user_subagents::tests::a_model_pin_requires_a_slash_and_keeps_the_users_spelling ... ok
test user_subagents::tests::an_output_cap_is_written_and_an_absent_one_is_omitted ... ok
test user_subagents::tests::builtin_state_survives_a_registry_rebuild ... ok
test user_subagents::tests::document_contains_no_activation_state ... ok
test user_subagents::tests::builtins_are_enabled_until_one_is_turned_off ... ok
test user_subagents::tests::inherit_only_documents_round_trip ... ok
test user_subagents::tests::inherit_token_is_kept_and_unknown_tools_still_drop ... ok
test user_subagents::tests::fallback_pins_survive_record_document_round_trips ... ok
test user_subagents::tests::legacy_max_turns_frontmatter_is_ignored ... ok
test user_subagents::tests::omit_is_a_valid_thinking_override ... ok
test user_subagents::tests::parser_rejects_missing_description ... ok
test user_subagents::tests::tools_are_normalized_and_unknown_tools_are_dropped ... ok
test user_subagents::tests::listing_documents_does_not_prune_builtin_state ... ok
test workspace::tests::allows_inside ... ok
test workspace::tests::allows_new_nested_path ... ok
test workspace::tests::blocks_absolute_outside ... ok
test workspace::tests::approved_external_path_resolves_and_keeps_absolute_identity ... ok
test workspace::tests::blocks_escape ... ok
test workspace::tests::blocks_escape_via_nonexistent_parent ... ok
test workspace::tests::blocks_dangling_symlink_escape ... ok
test workspace::tests::dangling_symlink_inside_workspace_resolves_to_its_target ... ok
test workspace::tests::blocks_symlink_escape ... ok
test workspace::tests::lexically_inside_checks ... ok
test workspace::tests::relative_escape_can_be_resolved_only_after_external_approval ... ok
test workspace::tests::dangling_symlink_loop_is_rejected ... ok
test workspace::tests::tool_path_absolute_outside_both_roots_blocked ... ok
test workspace::tests::tool_path_absolute_scratch_resolves_to_scratch ... ok
test workspace::tests::tool_path_escape_from_scratch_blocked ... ok
test workspace::tests::tool_path_relative_resolves_to_workspace ... ok
test workspace::tests::tool_path_symlink_escape_from_scratch_blocked ... ok
test tools::tests::glob_traversal_does_not_occupy_the_async_worker ... ok
test tools::tests::grep_falls_back_when_rg_exits_with_error ... ok
test tools::tests::grep_uses_injected_rg_when_present ... ok
test state::tests::plugin_session_rate_limits_are_per_plugin_and_per_operation ... ok
test rpc::todos::tests::todo_write_reports_truncation_and_demotion_warnings ... ok
test rpc::tests::truncate_from_rpc_cuts_without_shipping_the_kept_prefix ... ok
test state::tests::shutdown_cancels_pending_permissions_and_active_bash ... ok
test rpc::todos::tests::todos_get_rejects_unknown_deleted_and_native_sessions ... ok
test result: ok. 780 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 87.06s (780 passed), , and the headless PASS E2E-003-handshake — v=11
PASS E2E-003-health — uptime=3
PASS E2E-005-provider — 6a0daaca-6e7a-4b5b-ad79-de634760a2b4
PASS E2E-027-no-secret-leak-list
PASS E2E-020-session-persist — messages=1
PASS E2E-035-notification-created — 82cdd0a5-c5b1-49f0-9313-df2ab8611816
PASS E2E-064-visible-notification-suppressed
PASS E2E-035-notification-read
PASS E2E-035-notification-clear
PASS E2E-013-read-tool
PASS E2E-013-glob-tool
PASS E2E-019-path-sandbox — TOOL_DENIED
PASS E2E-018-plan-write-denied — WRITE_DISABLED_IN_PLAN
PASS E2E-022-plugin-load
PASS E2E-0PLUGIN-I18N — en=Todo List zh=小清新待办 zh-TW=Todo List
PASS E2E-024-plugin-tool-dispatch — echo=roundtrip
PASS E2E-025-plugin-disable
PASS E2E-004-onboarding
PASS E2E-PROJECT-delete-removes-project-and-owned-sessions — removed=true sessionsRemoved=2 artifacts=10->0
PASS E2E-PROJECT-delete-removes-project-and-owned-sessions-refuses-while-running — refused=1008/CONFLICT then removed=true sessionsRemoved=1
PASS E2E-PROJECT-delete-removes-project-and-owned-sessions-unknown-path — blank=1002/INVALID_PARAMS missing=false/0
SKIP E2E-008-live-model — PI_DESKTOP_TEST_API_KEY not set
SKIP E2E-009-stream — PI_DESKTOP_TEST_API_KEY not set
PASS E2E-SESSION-revision-round-trip — refs=2 stored=1 v1=3 v2=2
PASS E2E-runtime-module
Summary: 23 / 23 passed; 2 skipped equivalent (23/23, 2 API-key cases skipped); CI and the current-base gate are green. Thanks for the focused fix and the measured before/after data.
Summary
Concurrent
Read/Glob/Grep/Write/Editcalls ran their synchronous filesystem work on the async Tokio workers. A few large Globs could occupy every worker, and cheap RPCs such assession.listthen waited seconds behind them. This PR moves those five tool bodies onto Tokio's blocking pool. With 8–32 concurrent Globs over a 130k-file tree,session.listp95 drops from 0.75–2.4 s to under 5 ms. Single-call latency does not change.This is layer B of the layered plan in #1071 (layer A landed in #1208). Layers C/D/E (lock discipline, slow-RPC logging, Glob hidden-directory policy) and the 32-slot RPC admission limit are out of scope.
Refs #1071
Root cause
execute_tool_with_path_access(crates/host-core/src/tools/mod.rs:1039on924a03a7b) calledtool_read,tool_glob,tool_grep,tool_write, andtool_editinline (mod.rs:1073-1104). These are plain synchronous functions.#[tokio::main]multi-thread runtime (main.rs:46), which has one worker per core.ignorewalker never yields.child.wait()until rg exits (tools/grep_rg.rs:110-145).with_request_budget(rpc/mod.rs:547) is a timer, and a timer fires only at an await point. The desktop also sendstimeoutMsonly for Bash, so these five tools get no budget anyway (request_budget_ms,rpc/mod.rs:512). The comment onwith_request_budgetalready names this as the follow-up.Change
run_file_toolhelper intools/mod.rs.argsvalue, and the hashline context.HashlineStoreis a#[derive(Clone)]handle overArc<Mutex<_>>, so the copy costs oneArcclone.tool_*calls insidetokio::task::spawn_blocking, with the same arguments and the same error conversions as before.JoinError(a panicking body) maps to the documentedINTERNALtool error. Before this change, such a panic killed the request task and the response was never sent.execute_tool_with_path_accesscollapse into one arm that calls the helper. Bash, GenerateImages, and the plugin/unknown arms are untouched.grep_rg.rsis athread_local. It is now captured and reinstalled on the blocking thread, so the existinggrep_uses_injected_rg_when_presentkeeps exercising the real dispatch path. All of this code is#[cfg(test)].Production diff: +56 / −32 in
tools/mod.rsand +5 test-only lines ingrep_rg.rs. The rest is one regression test (+39) and one spec paragraph (+6).Evidence
Tested commit:
a88caeb8b(perf/host-core-sync-tools-off-workers). Base: main924a03a7b(#991), an ancestor of HEAD.pnpm check:pr-basepasses. Environment: Linux x64, 8 cores, Rust 1.99.0, Node 22.23.Tests
tools::tests::glob_traversal_does_not_occupy_the_async_worker(#[tokio::test(flavor = "multi_thread", worker_threads = 1)]).924a03a7b(test added, no fix) it fails 3/3: the probe can only run after the traversal ends.cargo test -p host-core --locked: 780 passed, 0 failed. Main924a03a7b: 779 passed; the new test is the only addition.cargo fmt --check: clean.cargo clippy -p host-core --all-targets: no warnings from this change. The two warnings it reports are intranscripts.rs(unnecessary_cast,filter_next), a file this PR does not touch, so they exist on main as well.pnpm test:e2eona88caeb8b(debug host): 23/23 passed, 2 skipped.E2E-008-live-modelandE2E-009-streamneedPI_DESKTOP_TEST_API_KEY.a88caeb8band of main924a03a7b(PI_DESKTOP_HOST_BIN).pnpm test:e2eis the required cross-cutting suite.pnpm docs:check: pass (only existing ADR-format warnings).git diff --check: clean.Before / after, real host-core binary
Setup:
cargo build --release -p host-corebinaries of main924a03a7band ofa88caeb8b.**/*.zzz: zero matches, so each call traverses the whole tree.session.listprobes with a 10 ms gap.sessionsis the number of sessions the Globs are spread over. The per-session limit is 4, sosessions = N/4lets the global read limit of 8 run at the same time.session.list/ probes-32029How to read the table:
-32029 HOST_OVERLOADEDat N = 32 is the dispatcher's 32-slot RPC limit (host RPC capacity is exhausted): 32 in-flight Globs hold every request slot. It is not worker starvation, and it remains with the fix, but those slots now drain about twice as fast. Admission policy is out of scope for this PR.Single-call latency on an idle host (sequential calls; median over 21 runs per build):
**/*.zzzover 130k files p50924a03a7ba88caeb8bThe blocking-pool hop adds about 20 µs to a Read round trip measured end to end over stdio. There is no measurable change for Glob.
Specs / E2E docs
docs/spec/03-runtime/06-host-rpc-protocol.md, next to "Tool execution starts only after admission": one paragraph. Admitted Read/Glob/Grep/Write/Edit bodies (including the rg child wait) run on Tokio's blocking pool, the class limits also bound those threads, results and error codes are unchanged, and a panicking body returnsINTERNAL.Compatibility / risk
spawn_blockingcan still panic. On main, every request already ends in aspawn_blockingfor the transcript commit (rpc/mod.rs:426→transcripts.rs:910), so this adds no new failure class. A panic there stays inside one request task; it does not reach the stdio threads.timeoutMson one of these tools and the layer-A budget expires, the running body finishes on its blocking thread, but the response isHOST_RPC_TIMEOUTand the slot is released. Before this change, the budget could not fire during the body at all. The desktop does not sendtimeoutMsfor these tools today.argsis cloned once per call. ForWrite, the content string is copied briefly; the 64 MiB request-line cap bounds it.