Skip to content

refactor: sanitize Rust codebase, batches 1-2 snapshot (refs #3176) - #3179

Merged
mblua merged 208 commits into
mainfrom
refactor/3176-sanitize-rust-codebase-ci-snapshot
Oct 23, 2026
Merged

mblua merged 208 commits into
mainfrom
refactor/3176-sanitize-rust-codebase-ci-snapshot

Conversation

@mblua

@mblua mblua commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Refs #3176
Refs #3172

Merges batch 1 (#3172, closed PR #3175) and batch 2 so far, from a fixed snapshot of refactor/3176-sanitize-rust-codebase at 0af7621. The shared branch keeps moving while fixers work, which cancelled every full CI run on #3178; this snapshot is the exact SHA that ran the full CI (run 39907201326). #3178 stays open for the batch 2 work after this SHA.

Measures (src-tauri/src, main @ 6058741 -> 0af7621)

Signal Measure Before After
01 lines > 100 chars 2723 618
02 files > 1000 lines 92 78
02 largest file 44554 24408
05 mod.rs 21 20
05 inline mod x { } 301 180
05 files with #[test] outside tests.rs / tests/ 185 144

Known open gate failures (deferred)

  • Cognitive complexity of functions moved to new files, same hashes (rust-regression*, clippy-linux, test-debt "Baseline grew"/"STALE baseline entry"). Not new debt; follow-up to let the check accept re-anchoring with an identical hash, or to reduce each function.
  • Sanitizing gates tauri_edge (06), global_state (08) and process_env (09) count files, so splitting a file raises the count with the same code.
  • c4_state_key_census and spawn_search_path_inventory file lists are updated at the end of the campaign.

Files modified

See the "Files modified" list in #3176 and #3172.

Rooms

room-30, room-31, room-32, room-33, room-34, room-35, room-36.

mblua added 30 commits October 22, 2026 10:46
Move the production code of phone/mailbox.rs into 22 private submodules
under phone/mailbox/, in dependency order so sibling modules form a DAG.
mailbox.rs now only declares the children and re-exports the items that
were already pub/pub(crate). The MailboxPoller impl is split into
several impl blocks. Items, fields and methods used across the new
siblings become pub(crate). Source-scan tests read the new files.

Cycle baseline change: SCC 554acc49e7a211d1 (89 members) shrinks.
phone::mailbox and phone::terminal_snapshot leave it; the rest becomes
eb99a5c4b6de1586 (85) and fa5266e34a30725c (cli::create_agent,
cli::create_agent_matrix). No module joined any cycle.
mblua added 23 commits October 23, 2026 01:37
…dules (#3176)

Cycle baseline change: SCC shrink, retired 03080aaa698f33b1 (54) -> 0f7d406c9c4eb3bc (53);
left session::context_alerts, joined none.
a71c883 moved the sibling modules derived_agent_id_home_tests (3 tests)
and p02_schema_launch_tests (1 test) under config::agent_command::tests.
The IS #2431 focused step filters on that path, so it now runs those 4
tests as well: 92 -> 96 on Linux (100 on Windows). The old 92 tests still
run; only the count follows the module move.
@mblua mblua added the refactor label Oct 23, 2026
@sonarqubecloud

Copy link
Copy Markdown

@mblua
mblua merged commit e939e9c into main Oct 23, 2026
42 of 64 checks passed
@mblua
mblua deleted the refactor/3176-sanitize-rust-codebase-ci-snapshot branch October 23, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant