Skip to content

test: audit redundant owner-boundary coverage (1000 → 886) - #576

Merged
Tryanks merged 3 commits into
Tryanks:mainfrom
jiayuqi7813:test/audit-owner-boundaries
Oct 3, 2026
Merged

Tryanks merged 3 commits into
Tryanks:mainfrom
jiayuqi7813:test/audit-owner-boundaries

Conversation

@jiayuqi7813

@jiayuqi7813 jiayuqi7813 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

This audit removes redundant test layers and transfers their useful assertions to the production boundary that owns each behavior. It also removes dead workspace-path canonicalization and obsolete test-only adapters/accessors. No product bug fix, dependency change, protocol change or visual redesign is included.

The workspace was audited at 464775ea59b9ad7e4149e2bcb55d8804d25e0a73, following .agents/skills/test-audit. Every one of the 1,000 declarations received a read-only owner/caller/history/CI ledger entry before cutover; seven boundary groups received independent preservation review.

Result: 1,000 → 886 declarations, net −114 (11.4%). The requested ≥20% target is not met. The audit retired 115 declarations; the CI follow-up adds one independently owned native-path classification test. Reaching 20% would require 86 further net deletions, which have not been justified by this audit. Three conditional candidates were retained because their exact partial/unpainted-selection and residency guarantees had no proven stronger replacement. Eight keeper renames are excluded from the deletion count. Case-table rows remain independent input/assertion cases, not additional declarations.

Owner lane Before Final after follow-up Net removed
providers 163 154 9
domain 127 112 15
runtime 147 133 14
remote 86 83 3
services_mcp 121 112 9
ui_presentation 167 132 35
ui_shell 189 160 29

Audit-commit physical source lines at 60ef6427, before the CI follow-up (comments and blank lines included; inline test bodies and test-only support classified separately using Rust syntax trees):

Source category Before After Net
production 144640 144488 -152
support 8632 8326 -306
test 47659 47347 -312

The follow-up and final review add a net 49 physical lines across tests and test support, with no production-source change relative to the audit table. Final declarations are 884 Rust test declarations plus two existing Node test cases. The retirement map still lists all 115 retired declarations; the new keeper accounts for the net reduction of 114.

Production simplifications remove the unused services workspace-root canonicalization/cache, the terminal cwd override chain, the unused work-count/rewind accessors and queued-message conversion, and transparent UI test wrappers. Shared runtime test-support remains because retained real-host tests still use it. The Markdown residency candidate wrapper becomes its existing vector; this does not change residency policy.

Useful assertions now run through recorded provider translation/native launch, actual runtime commands and scripted providers, persisted imports/search/forks, transport restart/preferences/HTTP/mux, and real rendered UI/navigation/selection. Literal wire compatibility, permission/path boundaries, platform-specific behavior, defaults and credible independent regressions remain. The existing desktop title-layout probe remains: replacing it would have required a new production-only-for-tests selector. Terminal cache assertions are honestly named for output freshness, without claiming cache-hit proof.

Preservation repairs and controls

Independent review found lost or insufficiently discriminating proof for a line-limited MCP prefix's final newline, direct persisted device-detail reload, exact terminal wrap positions, multiple clipped syntax spans and nonzero ordinary-prepend offset. Existing keepers were strengthened in place. A local quota-order fixture was reordered so its assertion actually observes the ordering it describes. All corresponding deliberate local owner mutations failed the named keeper; mutation files are restored byte-for-byte and no mutant is committed. Additional controls exercise plan replacement/clearing and terminal style/history identity.

Validation

All locally available required gates passed on the original audit commit 60ef6427 (Rust 1.99.0, Ubuntu 24.04); final follow-up evidence is recorded below:

  • cargo fmt --all --check and git diff --check.
  • xvfb-run -a cargo nextest run --workspace --locked --no-fail-fast: 852 passed, 6 skipped, 0 failed, no leaks (98.129s execution).
  • cargo clippy --workspace --all-targets --locked -- -D warnings.
  • cargo machete.
  • RUSTFLAGS='-D warnings' cargo check -p tcode-web --target wasm32-unknown-unknown --locked.
  • Focused owner/sibling batches passed. Changed browser-ack, relay-reconciliation and startup-generation keepers passed three fixed repetitions each.
  • 10/10 deliberate regression controls caught an ordinary test assertion failure (not a compile error), followed by byte-exact restoration and the green full run. No mutation or temporary diagnostic was committed.
Control Keeper that rejected it
mcp_line_boundary bounded_output_continuation_round_trips_without_mutation
device_details_reload mobile_preferences_preserve_device_identity_last_host_and_unknown_fields
stored_output_wrap rendering_stored_output_rewraps_at_the_requested_width
local_body_limit_order manifest_and_pkarr_store_over_http
plan_replacement plan_updated_tracks_latest_steps
plan_explanation_clear plan_updated_tracks_latest_steps
terminal_style_remapping applying_a_delta_replaces_rows_and_trims_history_at_the_cap
terminal_history_end applying_a_delta_replaces_rows_and_trims_history_at_the_cap
diff_multispan_clipping full_text_pipeline_builds_expanded_rows_collapsed_context_and_word_runs
ordinary_prepend_pixel_offset jump_to_latest_survives_unmeasured_history

Final review is complete; all seven CI gates passed on the final reviewed commit 13d51cd6. The original audit commit passed all seven platform/hygiene CI jobs after its first-contributor workflow approval. The requested 20% reduction is not claimed. See the follow-up section below for final-head CI evidence.

Baseline evidence: local Linux cargo test --workspace --locked under Xvfb: 968 passed, 4 ignored, 0 failed; untouched browser auth Node test file passed. Pinned baseline CI run also passed Linux, macOS, Windows and compile/hygiene jobs. Baseline CI does not establish final candidate platform results.

Live/platform gaps remain explicit: real ACP installation, credentialed provider usage, foreground PTY cwd, history benchmark and macOS desktop overlay slot were not exercised here. The mDNS test previously silently returned without TCODE_TEST_MDNS=1; it now has an explicit ignored prerequisite instead of a misleading pass. Four Android input declarations are outside the desktop workspace and remain unchanged/unexecuted locally. Native OS permission/input behavior is not established by policy tests. The desktop, iOS, Android and Web candidate gates are verified in the PR CI environment. No ignored test is counted as deleted.

Candidate failures resolved at the test

Test Cause and evidence-backed correction
orchestrate_moves_untouched_astra_executors_to_sol_6 The new table incorrectly asserted that an old default Astra description stays unchanged when other fields are customized. Baseline migration refreshes that old default independently; the old test asserted model retention only. Explicit source-generation expected descriptions now distinguish default refresh from custom text preservation; strict profile/model/flag assertions remain.
no_wrap_widths_cover_unified_and_split_rows The new literal assigned 24 columns to a 25-ASCII-column string. Corrected to 25 while retaining exact unified/split width assertions.
compact_list_groups_sections_omits_inapplicable_and_folds_advanced Advanced disclosure exists even when initially expanded. Restored that baseline UI expectation, retaining capability-specific content and actual click checks.
compact_families_keep_activity_order_indent_and_collapse Added leaf-click scenario left the next layout selected on the leaf. Restore each matrix row's parent selection before running its original disclosure assertions.
thread_navigation_matches_displayed_rows_and_disclosures Keep the original un-settled default-collapse row and carry ancestor/child partition assertions through the actual sidebar. A snapshot update is not a new selection under the existing last-selected-ID guard, so the added ancestor row collapses via its real header when necessary before the same literal order/navigation checks. Select the fixture before draining Index to avoid the fake host's unimplemented draft-ack flow, and apply/check metadata before drawing.

The two initial UI compile errors (variable spelling and boxed frame fixture) and one blank-line formatting issue were corrected mechanically. No assertion was loosened to accommodate changed product behavior. Async controls are repeated as fixed runs; any failure/leak is a failure, not retried into green.

Declaration-by-declaration retirement map

C means the useful assertion was moved to the keeper before retirement; D means the stronger existing proof or lack of production responsibility justified deletion. Keeper names below use their final names. These are owner-boundary evidence, not new ownership requirements for CONTRIBUTING.

providers: 9 retired declarations
Retired declaration Mark Surviving keeper / removal reason
crates/agent/src/claude.rs::exit_plan_mode_captures_and_denies C crates/agent/src/claude.rs::exit_plan_mode_captures_once_per_turn
crates/agent/src/claude.rs::compact_boundary_maps_to_context_compacted C crates/agent/src/claude.rs::recorded_compaction_retains_metadata_without_claiming_post_context
crates/agent/src/claude.rs::empty_structured_patch_preserves_external_file_diff C crates/agent/src/claude.rs::full_fixture_trace_parses
crates/agent/src/claude.rs::can_use_tool_maps_to_approval_and_response C crates/agent/src/claude.rs::full_fixture_trace_parses
crates/agent/src/claude.rs::permission_mode_flag_maps_all_modes C crates/agent/src/claude.rs::set_permission_mode_request_shape
crates/agent/src/codex.rs::maps_token_usage_from_last_and_total C crates/agent/src/codex.rs::maps_fixture_envelopes_and_approval_response
crates/agent/src/codex.rs::cancel_decision_maps_to_cancel_wire_string C crates/agent/src/codex.rs::maps_fixture_envelopes_and_approval_response
crates/agent/src/lib.rs::claude_mcp_config_json_shape C crates/agent/src/claude.rs::mcp_builder_handles_both_one_and_none
crates/agent/src/lib.rs::codex_config_override_is_valid_toml_streamable_http C crates/agent/src/codex.rs::mcp_builder_handles_both_one_and_none
domain: 15 retired declarations
Retired declaration Mark Surviving keeper / removal reason
crates/client/src/lib.rs::retired_subscription_rejects_queued_reply_and_releases_generation C crates/client/src/lib.rs::reconnect_replays_the_cursor_applied_by_the_store_and_retired_topics
crates/client/src/pairing.rs::secrets_are_sixteen_bytes_as_unpadded_base64url C crates/client/src/pairing.rs::invitations_round_trip_and_reject_malformed_fields
crates/core/src/attachments.rs::generated_file_names_take_only_plain_extensions C crates/runtime/src/pipe_p4b_tests.rs::attachments_mux_uses_host_session_directory_and_returns_identical_bytes
crates/core/src/git.rs::fallback_merge_collapses_fragments_and_keeps_summed_stats C crates/core/src/session.rs::partial_turn_changes_include_only_successful_top_level_file_operations
crates/core/src/provider_colors.rs::custom_colors_fill_the_palette_before_reusing_slots C crates/core/src/settings.rs::provider_color_maps_builtins_to_brand_and_custom_providers_to_distinct_palette_slots
crates/core/src/provider_models.rs::reads_capabilities_from_catalog_descriptors C crates/core/src/provider_models.rs::model_preferences_keep_catalog_order_and_hidden_rows_out_of_the_picker
crates/core/src/relay.rs::relay_prompt_delimits_transcript_from_new_user_message C crates/runtime/src/app/tests.rs::relay_context_rides_only_with_the_first_handoff_message
crates/core/src/session.rs::fold_simple_claude_style_trace C crates/core/src/session.rs::timestamps_and_turn_grouping_fold_across_two_exchanges
crates/core/src/session.rs::review_comment_serialization_matches_prompt_format C crates/runtime/src/app/tests.rs::send_turn_assembles_draft_context_and_attachment_paths
crates/core/src/session.rs::a_backward_timestamp_neither_underflows_nor_inflates_a_bucket C crates/core/src/session.rs::tool_timing_follows_lifecycle_including_updates_failures_and_reused_ids
crates/core/src/session.rs::replaying_a_stored_turn_reproduces_the_live_breakdown D crates/core/src/session.rs::tool_timing_follows_lifecycle_including_updates_failures_and_reused_ids; timing_charges_only_tool_intervals_inside_the_observed_turn: fold_events calls apply_stored -> apply_at for each record; test live path is the same loop over the same in-memory events. No serialization, actual store, or distinct replay driver is involved. Concrete overlapping-tool and authoritative-start arithmetic already has independently expected values in the named keepers.
crates/core/src/session.rs::each_turn_gets_its_own_breakdown C crates/core/src/session.rs::a_turn_finalized_without_a_timestamp_rejects_later_tool_transitions
crates/core/src/session.rs::served_model_without_1m_suffix_is_not_a_model_change C crates/core/src/session.rs::served_model_change_sets_turn_meta_and_adds_one_divider
crates/core/src/settings.rs::orchestrate_preserves_every_customized_sol_shape C crates/core/src/settings.rs::orchestrate_moves_untouched_astra_executors_to_sol_6
crates/core/src/settings.rs::orchestrate_migration_does_not_duplicate_existing_execution_sol_6 C crates/core/src/settings.rs::orchestrate_moves_untouched_astra_executors_to_sol_6
runtime: 14 retired declarations
Retired declaration Mark Surviving keeper / removal reason
crates/runtime/src/app/tests.rs::dispatched_start_draft_emits_session_status_over_ndjson C crates/runtime/src/app/tests.rs::scripted_provider_connects_command_launch_and_agent_event_paths
crates/runtime/src/app/tests.rs::host_start_folds_only_parents_with_visible_children C crates/runtime/src/app/tests.rs::thread_fold_is_host_state_shared_over_the_pipe_and_pruned_with_the_thread
crates/runtime/src/app/tests.rs::generated_titles_are_cleaned_and_bounded C crates/runtime/src/app/tests.rs::title_regeneration_uses_stored_history_and_preserves_intervening_changes
crates/runtime/src/app/tests.rs::provider_diagnostics_with_zero_output_tokens_are_not_titles C crates/runtime/src/app/tests.rs::title_regeneration_uses_stored_history_and_preserves_intervening_changes
crates/runtime/src/app/tests.rs::title_prompt_treats_the_request_as_bounded_json_data C crates/runtime/src/app/tests.rs::orchestrate_title_generation_uses_only_the_users_request
crates/runtime/src/app/tests.rs::draft_send_creates_session_with_project_cwd C crates/runtime/src/app/tests.rs::scripted_provider_connects_command_launch_and_agent_event_paths
crates/runtime/src/app/tests.rs::launch_env_merges_secrets_for_sensitive_rows C crates/runtime/src/app/tests.rs::third_party_profile_launches_in_parallel_with_builtin
crates/runtime/src/app/tests.rs::child_meta_links_parent_project_and_maps_effort C crates/runtime/src/app/tests.rs::orchestrate_dispatch_fast_override_beats_profile_setting
crates/runtime/src/app/tests.rs::dispatched_brief_carries_report_contract_footer C crates/runtime/src/app/tests.rs::orchestrate_dispatch_fast_override_beats_profile_setting
crates/runtime/src/app/tests.rs::final_assistant_message_joins_all_blocks_of_the_final_output C crates/runtime/src/app/tests.rs::resident_background_child_result_uses_completed_live_timeline
crates/runtime/src/app/tests.rs::steering_does_not_disturb_turn_accounting C crates/runtime/src/app/tests.rs::steering_user_and_queue_paths_send_the_same_id_they_record
crates/runtime/src/app/tests.rs::model_switch_restarts_live_provider D crates/runtime/src/app/tests.rs::settings_restart_waits_for_background_follow_up; crates/runtime/src/app/tests.rs::inferred_startup_model_updates_live_model_without_restart
crates/runtime/src/app/tests.rs::unread_requires_a_visit_before_the_latest_update C crates/runtime/src/app/tests.rs::updates_on_the_viewed_thread_do_not_mark_it_unread
crates/runtime/src/terminal/stored_output.rs::captured_output_normalizes_lines_wraps_within_supported_widths_and_keeps_styles C crates/runtime/src/pipe.rs::rendering_stored_output_rewraps_at_the_requested_width
remote: 4 retired declarations
Retired declaration Mark Surviving keeper / removal reason
crates/traverse/src/identity.rs::host_identity_survives_restart C crates/traverse/tests/transport.rs::a_restarted_machine_is_rejoined_and_buffered_writes_are_delivered
crates/traverse/src/identity.rs::device_identity_is_stable_and_records_its_details C crates/traverse/src/native_host.rs::mobile_preferences_preserve_device_identity_last_host_and_unknown_fields
crates/traverse/tests/lan.rs::saved_addresses_are_the_whole_resolve_with_the_browse_off D Delete: crates/traverse/tests/lan.rs::stale_addresses_without_a_browse_do_not_reach_the_machine and ::a_saved_address_further_down_the_list_reaches_the_machine independently exercise unusable/usable saved inputs with Browse::Off through real authenticated QUIC. The exact lan-saved provenance string and Some(empty-resolve) wrapper are diagnostic/implementation wiring with no production consumer; no assertion needs carrying.
crates/traverse-server/src/pkarr.rs::newer_packets_replace_older_ones_and_stale_puts_conflict C crates/traverse-server/tests/instance.rs::manifest_and_pkarr_store_over_http
services_mcp: 9 retired declarations
Retired declaration Mark Surviving keeper / removal reason
crates/computer-use-mcp/src/outline.rs::safe_prefix_ends_on_utf8_and_line_boundaries C state::tests::bounded_output_continuation_round_trips_without_mutation
crates/computer-use-mcp/src/state.rs::recent_actions_keep_only_the_latest_bounded_window_in_order C state::tests::harness_observations_keep_deltas_targets_and_recent_actions
crates/computer-use-mcp/src/state.rs::candidate_targets_include_only_interactive_nodes_with_assigned_refs C state::tests::harness_observations_keep_deltas_targets_and_recent_actions
crates/services/src/git.rs::read_git_branch_reads_head C git::tests::checkout_preserves_dirty_worktree_then_switches_once_clean
crates/services/src/import/tests.rs::existing_ids_include_import_and_native_resume_cursors C import::tests::import_is_idempotent_and_replays_into_timeline
crates/services/src/session_search.rs::query_matching_is_case_insensitive_and_generates_a_bounded_snippet C session_search::tests::search_indexes_final_visible_content_and_refreshes_after_append_or_removal
crates/services/src/store.rs::clone_events_copies_contents_and_missing_source_is_a_noop C runtime::app::tests::fork_thread_clones_timeline_and_provider_cursor
crates/services/src/user_files.rs::relativizes_workspace_files_and_preserves_outside_paths D No production callers since the host/client split; remove dead filesystem canonicalization helper/cache. Live UI host-path shortening is unchanged.
crates/services/src/user_files.rs::relativization_reuses_the_resolved_workspace_root D No production callers since the host/client split; remove dead filesystem canonicalization helper/cache. Live UI host-path shortening is unchanged.
ui_presentation: 35 retired declarations
Retired declaration Mark Surviving keeper / removal reason
crates/ui/src/chat/components/assistant.rs::plain_text_markdown_preserves_lines_and_indentation C crates/ui/src/chat/components/assistant.rs::plain_text_markdown_escapes_inline_and_block_syntax
crates/ui/src/chat/components/changed_files.rs::expanded_file_edit_renders_its_provider_diff D crates/ui/src/chat/mod.rs::a_live_file_edit_lays_out_only_the_diff_lines_on_screen — Existing keeper already checks actual provider diff lines, offscreen virtualization, updates and scroll-axis behavior in ChatView; isolated height >=36 adds no independent output contract.
crates/ui/src/chat/mod.rs::second_old_activity_collapses_before_minimum_visibility_ends C crates/ui/src/chat/mod.rs::activity_visibility_tracks_successors_and_the_remaining_minimum_window
crates/ui/src/chat/mod.rs::returning_session_shows_only_latest_snapshot_activity D crates/ui/src/chat/mod.rs::running_session_snapshot_renders_only_latest_command_expanded — C: extend existing A/B same-item pending-collapse lifecycle to revisit A and assert it remains collapsed. D: running_session_snapshot_renders_only_latest_command_expanded already hydrates/renders five commands and checks only newest expanded; private awaiting flags are not an additional user contract. Keep returning_session_restarts_latest_activity_visibility_window separately because its clock-reset branch is distinct.
crates/ui/src/chat/mod.rs::collapsed_activity_stays_collapsed_after_visiting_another_session C crates/ui/src/chat/mod.rs::pending_collapse_is_scoped_to_its_session
crates/ui/src/chat/mod.rs::prepending_history_preserves_the_visible_turn_and_pixel_offset D crates/ui/src/chat/mod.rs::jump_to_latest_survives_unmeasured_history — C: table the actual page-replacement scenario over pan delta 0 and 40, checking initial reservation >100, paused intent, loaded row/valid offset, old content top preserved minus only input delta. D: jump_to_latest_survives_unmeasured_history already asserts prepended row-count shift and same pixel offset before testing jump; wheel_event_between_a_prepend_and_its_frame... retains the distinct inter-frame race.
crates/ui/src/chat/mod.rs::incoming_page_replaces_scrollable_reservation_without_moving_content C crates/ui/src/chat/mod.rs::pan_packet_after_a_page_lands_keeps_the_walk_back_into_it
crates/ui/src/chat/mod.rs::small_markdown_is_resident_synchronously C crates/ui/src/chat/mod.rs::large_markdown_becomes_resident_asynchronously_and_remeasures_turn
crates/ui/src/chat/model.rs::live_empty_turn_append_is_not_mistaken_for_history_prepend C crates/ui/src/chat/model.rs::turn_list_index_and_sync_cover_stream_append_truncate_and_session_switch
crates/ui/src/chat/model.rs::history_completing_the_only_partial_turn_prepends_instead_of_resetting C crates/ui/src/chat/model.rs::turn_list_index_and_sync_cover_stream_append_truncate_and_session_switch
crates/ui/src/chat/model.rs::incremental_turn_index_matches_full_index_across_tail_and_reset_scenarios C crates/ui/src/chat/model.rs::turn_list_index_and_sync_cover_stream_append_truncate_and_session_switch
crates/ui/src/chat/model.rs::subagent_status_change_remeasures_the_turn C crates/ui/src/chat/model.rs::turn_list_index_and_sync_cover_stream_append_truncate_and_session_switch
crates/ui/src/chat/model.rs::file_change_status_change_remeasures_the_turn C crates/ui/src/chat/model.rs::turn_list_index_and_sync_cover_stream_append_truncate_and_session_switch
crates/ui/src/chat/model.rs::steer_status_and_reordering_invalidate_the_virtualized_turn_row C crates/ui/src/chat/model.rs::turn_list_index_and_sync_cover_stream_append_truncate_and_session_switch
crates/ui/src/chat/model.rs::live_activity_run_keeps_five_entries_outside_the_folded_prefix C crates/ui/src/chat/model.rs::an_expanded_work_log_gives_each_folded_activity_a_row
crates/ui/src/chat/residency.rs::candidate_filter_preserves_decisions_with_distant_tail_and_selection D crates/ui/src/chat/mod.rs::chat_view_applies_markdown_residency_decisions — D: equivalence applies the same ResidencyScope predicate on both sides; actual markdown_entries_for_residency candidate test plus rendered view decisions and retained running_tail_and_selection_pins_are_honored provide stronger proof.
crates/ui/src/diff/algorithm.rs::line_diff_can_ignore_all_whitespace C crates/ui/src/diff/model.rs::full_text_pipeline_builds_expanded_rows_collapsed_context_and_word_runs
crates/ui/src/diff/model.rs::sub_runs_clips_and_rebases C crates/ui/src/diff/model.rs::full_text_pipeline_builds_expanded_rows_collapsed_context_and_word_runs
crates/ui/src/diff/model.rs::invisibles_remap_bytes_and_override_styles C crates/ui/src/diff/model.rs::full_text_pipeline_builds_expanded_rows_collapsed_context_and_word_runs
crates/ui/src/diff/model.rs::expand_up_down_and_all_update_visibility C crates/ui/src/diff/model.rs::full_text_pipeline_builds_expanded_rows_collapsed_context_and_word_runs
crates/ui/src/diff/model.rs::split_pairing_aligns_equal_content_inside_change_block C crates/ui/src/diff/model.rs::split_pairing_aligns_multi_hunk_change_blocks
crates/ui/src/diff/model.rs::display_columns_accounts_for_tabs_and_wide_characters C crates/ui/src/diff/model.rs::no_wrap_widths_cover_unified_and_split_rows
crates/ui/src/diff/model.rs::reconstructs_matching_unified_patch_into_expandable_full_text C crates/ui/src/diff/model.rs::reconstruction_requires_matching_unambiguous_current_text
crates/ui/src/diff/parse.rs::bare_diffs_preserve_create_and_edit_line_numbers C crates/ui/src/diff/model.rs::patch_pipeline_preserves_fixed_gap_and_applies_word_runs
crates/ui/src/diff/parse.rs::unified_diffs_preserve_line_numbers_gaps_and_no_newline_markers C crates/ui/src/diff/model.rs::patch_pipeline_preserves_fixed_gap_and_applies_word_runs
crates/ui/src/highlight.rs::jsx_arrow_function_highlights_without_panicking C crates/ui/src/highlight.rs::shipped_syntax_set_compiles_under_active_regex_backend
crates/ui/src/markdown/state.rs::source_and_parsed_text_stay_coherent C crates/ui/src/chat/components/assistant.rs::markdown_mirror_keeps_rendered_text_coherent_across_append_rewrite_shrink_and_clear
crates/ui/src/markdown/state.rs::link_reference_definitions_force_a_full_reparse C crates/ui/src/markdown/state.rs::streamed_appends_match_full_parse
crates/ui/src/markdown/state.rs::select_all_reads_blocks_that_were_never_painted D crates/ui/src/touch_selection/window_overlay.rs::long_press_on_a_message_offers_copy_and_select_all_past_the_viewport — Keeper already dispatches actual long-press menu select-all/copy past viewport, stronger than directly setting a selection handle for 2000 paragraphs. First replace self-derived rendered_text oracle with independent fixture text; add offscreen code/table and exact separators/full clipboard result. Keep menu bounds, readonly command set, persistent selection and clear-on-tap checks.
crates/ui/src/markdown/state.rs::select_all_includes_code_and_table_text C crates/ui/src/touch_selection/window_overlay.rs::long_press_on_a_message_offers_copy_and_select_all_past_the_viewport
crates/ui/src/markdown/view.rs::markdown_reports_intrinsic_height_inside_outer_list D crates/ui/src/chat/mod.rs::long_markdown_paints_middle_blocks_when_scrolled_in_chat_outer_list — Existing ChatView keeper checks intrinsic height >800, middle block painted on scroll and far-tail block unpainted. Isolated outer-list >100 assertion adds no stronger reachable contract.
crates/ui/src/markdown/view.rs::small_table_stretches_to_viewport_width C crates/ui/src/markdown/view.rs::wide_table_shrinks_to_viewport_and_wraps
crates/ui/src/markdown/view.rs::wide_table_track_contains_the_last_cell C crates/ui/src/markdown/view.rs::wide_table_shrinks_to_viewport_and_wraps
crates/ui/src/markdown/view.rs::drag_across_paragraphs_copies_both_blocks C crates/ui/src/markdown/view.rs::drag_across_mixed_blocks_copies_every_block_kind
crates/ui/src/markdown/view.rs::long_press_selects_word_then_drag_extends_selection C crates/ui/src/markdown/view.rs::long_press_release_keeps_handles_which_drag_the_selection
ui_shell: 29 retired declarations
Retired declaration Mark Surviving keeper / removal reason
crates/ui/src/attachment.rs::detaching_one_mux_client_leaves_an_independent_client_attached C crates/traverse/src/mux.rs::only_subscribers_receive_events_and_last_unsubscribe_releases_topic
crates/ui/src/i18n.rs::platform_system_locale_precedes_the_desktop_fallback C crates/ui/src/i18n.rs::explicit_overrides_win
crates/ui/src/pairing.rs::results_from_a_superseded_attempt_are_dropped C crates/ui/src/remote/mod.rs::superseded_pairing_does_not_overwrite_the_saved_machine
crates/ui/src/preview_panel/android_geometry.rs::fractional_scale_rounds_edges_and_collapsed_view_has_no_area C crates/ui/src/preview_panel/android_geometry.rs::physical_child_tracks_safe_content_without_double_inset
crates/ui/src/provider_status.rs::probe_diagnostic_messages_cover_every_variant C crates/ui/src/provider_status.rs::status_summary_derivation_table
crates/ui/src/runtime_event.rs::representative_event_severities_are_presented C crates/ui/src/runtime_event.rs::toast_lifecycle_and_raw_diagnostics_survive_localization
crates/ui/src/settings_page.rs::sections_apply_from_client_capabilities_and_attachment C crates/ui/src/settings_page.rs::compact_list_groups_sections_omits_inapplicable_and_folds_advanced
crates/ui/src/shell.rs::same_page_thread_selection_is_checkpointed_without_waiting_for_host C crates/ui/src/shell.rs::navigation_checkpoint_debounces_selection_and_history_without_losing_preferences
crates/ui/src/shell.rs::desktop_visual_viewport_changes_never_blur C crates/ui/src/shell.rs::ime_dismissal_blurs_the_input_the_keyboard_covered
crates/ui/src/shell.rs::software_keyboard_wide_cold_restore_stays_unfocused C crates/ui/src/shell.rs::cold_start_restores_thread_and_selects_it_once
crates/ui/src/shell.rs::the_hosts_page_never_shows_hosting_settings C crates/ui/src/remote/mod.rs::the_hosts_page_offers_this_machines_invitation
crates/ui/src/sidebar.rs::settled_partition_keeps_active_descendants_visible_and_orders_families C crates/ui/src/sidebar.rs::thread_navigation_matches_displayed_rows_and_disclosures
crates/ui/src/sidebar.rs::repeat_click_on_selected_parent_toggles_direct_child_rows C crates/ui/src/sidebar.rs::compact_families_keep_activity_order_indent_and_collapse
crates/ui/src/sidebar.rs::active_direct_child_count_excludes_grandchildren C crates/ui/src/sidebar.rs::thread_render_state_suppresses_child_unread_and_counts_direct_children
crates/ui/src/sidebar.rs::collapsed_children_do_not_consume_thread_list_slots C crates/ui/src/sidebar.rs::thread_navigation_matches_displayed_rows_and_disclosures
crates/ui/src/sidebar.rs::flat_blocks_sort_by_attention_then_recency_and_keep_children_adjacent C crates/ui/src/sidebar.rs::thread_navigation_matches_displayed_rows_and_disclosures
crates/ui/src/sidebar.rs::flat_block_attention_is_lifted_from_a_waiting_child C crates/ui/src/sidebar.rs::thread_navigation_matches_displayed_rows_and_disclosures
crates/ui/src/store/history.rs::failed_prefetch_is_silent_and_retries_only_after_cooldown C crates/ui/src/store/mod.rs::history_prefetch_keeps_one_bounded_page_in_flight
crates/ui/src/store/terminal.rs::word_selection_stops_at_delimiters_and_line_selection_takes_the_row C crates/ui/src/store/terminal.rs::selection_modes_preserve_text_boundaries_and_wide_cells
crates/ui/src/store/terminal.rs::wrapped_rows_join_without_a_newline C crates/ui/src/store/terminal.rs::selection_modes_preserve_text_boundaries_and_wide_cells
crates/ui/src/store/terminal.rs::wide_spacers_follow_their_partner_into_the_selection C crates/ui/src/store/terminal.rs::selection_modes_preserve_text_boundaries_and_wide_cells
crates/ui/src/terminal_drawer.rs::unselected_default_grid_has_no_selection_or_ansi_background_paint C crates/ui/src/terminal_drawer.rs::grid_paint_preserves_column_boundaries_and_style
crates/ui/src/terminal_drawer.rs::undercurl_maps_to_wavy_underline C crates/ui/src/terminal_drawer.rs::grid_paint_preserves_column_boundaries_and_style
crates/ui/src/widgets/menu.rs::long_press_dismissal_consumes_outside_tap D crates/ui/src/sidebar.rs::compact_menu_dismissal_preserves_selection_and_clears_row_surface
crates/ui/src/window_seam.rs::desktop_is_always_wide_and_mobile_follows_the_breakpoint D crates/ui/src/shell.rs::a_narrow_desktop_window_keeps_the_wide_workspace; crates/ui/src/shell.rs::the_breakpoint_flips_at_nine_hundred_and_disturbs_nothing_else
crates/ui/src/window_state.rs::back_pops_the_history_one_step_and_stops_at_the_root D crates/ui/src/shell.rs::back_unwinds_overlays_then_the_history_and_stops_at_the_root; crates/ui/src/shell.rs::back_leaves_a_settings_section_then_settings_then_the_page_below; crates/ui/src/shell.rs::a_hosts_visit_keeps_the_link_and_returns_to_the_thread
crates/ui/src/window_state.rs::entering_a_workspace_clears_the_previous_host_s_pages C crates/ui/src/shell.rs::connecting_from_the_hosts_panel_releases_its_entity_before_attachment
crates/ui/src/window_state.rs::wide_back_leaves_a_route_rather_than_a_page C crates/ui/src/shell.rs::the_wide_settings_route_replaces_the_sidebar_with_its_own_rail
crates/ui/src/window_state.rs::wide_sidebar_navigation_replaces_a_hosts_visit_without_growing_history C crates/ui/src/shell.rs::wide_hosts_route_keeps_its_sidebar_until_a_thread_selection

Cross-platform CI follow-up

The original head 60ef6427 had no CI jobs because GitHub held the first-time contributor's workflow for approval, not because any platform had failed. After verifying that the PR did not modify the workflow, it was approved. All seven original-head jobs passed: Linux x64, macOS arm64, Windows x64, iOS, Android, Web and dependency hygiene.

A separate local macOS full-workspace run exposed an invalid transport-fixture assumption: revocation_closes_the_live_connection_and_rejects_reconnects expected the selected direct path to have lan: true, but a valid authenticated connection selected a globally routable IPv6 interface. A single run passed; a fixed 20-run diagnostic reproduced seven assertion failures. Source inspection confirmed that iroh's native QNT exchanges interface candidates and probes additional paths after pairing. Filtering invitation hints to loopback and disabling mDNS did not constrain that behavior (three failures in another fixed 20 runs); that attempted fixture change was discarded.

CONTRIBUTING's failure steps 1–2 settled the issue at the test contract. The protocol, heartbeat, routing, revocation and restart keepers continue to assert their actual contracts: exact Syncing/Connected stages, a present direct path, no relay, no probing-direct flag, command/event delivery, durable revoke failure, authentication rejection and literal reconnect attempt/reason. They no longer assume the native transport must select a private/loopback address on every host. an_unreachable_self_hosted_instance_still_lets_the_lan_pair_and_connect and a_restarted_machine_is_rejoined_and_buffered_writes_are_delivered also hit that same unsupported expectation during the unsuccessful fixture experiment; their independent protocol/restart assertions remain.

The useful IPv4-loopback LAN assertion was moved to host::tests::native_loopback_connections_report_lan_on_both_sides: both real QUIC endpoints bind specifically to 127.0.0.1, and the existing production path_info must return the complete literal LAN path on both sides. This tests Tcode's classification at its owner without a new production test seam. It does not claim coverage of every private subnet or IPv6 address family. An independent preservation review found no code blocker; its stale loopback comment finding was corrected.

Follow-up validation on macOS (Rust 1.98.1):

  • The new classification keeper and the revocation keeper both passed all 20 fixed repetitions; the eight transport keepers passed all three fixed suite repetitions. Any failed stress iteration was treated as a failure, regardless of the runner exit code.
  • Full workspace: 868 passed, 6 skipped, 0 failed, no leaks. Formatting, git diff --check, full-workspace Clippy, cargo-machete, iOS simulator and Web checks all passed. The untouched browser-auth Node file passed both tests.
  • Deliberately inverting the production LAN classification failed the new keeper at its ordinary literal assertion. The owner source was restored byte-for-byte; the final restored-source workspace result and final-head CI are recorded below.
  • Original local live-service/native permission/input gaps still apply; a successful compile or policy test does not exercise native OS interaction.

Final restored-source result: 868 passed, 6 skipped, 0 failed, no leaks (48.314s execution).
Final-head CI for 13d51cd6: all seven jobs passed — Linux x64, macOS arm64, Windows x64, iOS, Android, Web and dependency hygiene. The desktop summaries below are taken from this final-head run; no test-process leak warnings were present.

Final-head desktop job Passed Skipped Failed
Windows x64 847 5 0
Linux x64 853 6 0
macOS arm64 868 6 0

Final merge review

Independent Standards and Spec reviews cover the complete 70-file diff against 464775ea. Standards found two comment blocks detached by retired tests; 13d51cd6 removes those five stale comment lines, without changing executable code or assertions. The Standards reviewer confirmed the finding is resolved. Local formatting and git diff --check passed. Spec review found no blocking gap or scope change. One retirement-map row still contained an unimplemented C plan; that text was removed, preserving its actual D rationale and keeper references. Both review axes now have no unresolved findings. All seven CI gates for 13d51cd6 passed. The final run has 853 Linux, 868 macOS and 847 Windows tests passed, with 6/6/5 explicit skips respectively and no failures or test-process leak warnings. The PR head is 13d51cd64c6911bcaf15e8451e9c59e082ac9459; the base remains 464775ea59b9ad7e4149e2bcb55d8804d25e0a73. No prior-head result is used as the final merge gate.

jiayuqi7813 and others added 2 commits October 3, 2026 00:44
Consolidate 101 redundant test declarations and retire 14 duplicate or dead-path tests, preserving their useful assertions at the owning boundaries. Repair vacuous test drivers and remove obsolete support and unused workspace path caching. Net declaration reduction is 115 of 1000 (11.5%); the requested 20% target remains unmet.
Native multipath can select global interfaces between in-process peers. Keep exact protocol and connection checks without assuming LAN selection, and preserve the LAN assertion on real QUIC endpoints bound to IPv4 loopback. The original fixture failed 7 of 20 fixed runs; both repaired keepers passed 20 of 20, three transport-suite runs passed, and the restored macOS workspace passed 868 tests with 6 skipped. No production behavior or test seam changes.
@Tryanks Tryanks changed the title test: audit redundant owner-boundary coverage (1000 → 885) test: audit redundant owner-boundary coverage (1000 → 886) Oct 3, 2026
@Tryanks
Tryanks marked this pull request as ready for review October 3, 2026 01:07
@Tryanks
Tryanks merged commit 206d884 into Tryanks:main Oct 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants