Repository navigation
refactor: sanitize Rust codebase, batch 11 (refs #3227) - #3230
Merged
Merged
Conversation
|
This was referenced Oct 24, 2026
This was referenced Oct 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Closes #3227
Closes #3228
Continues batch 10 (#3225, PR #3226, merged as
820750c).Batch 11 of the Rust sanitizing campaign. It implements the first approved step of four batch 10 design proposals (symptoms 04, 07, 08 and 09) and fixes one flaky test. The user approved two new owner modules:
filesystemandprocess. No security, authority, ordering,cfgor public API change. It does not touch files reserved by #3198, #3199 or the cut issues.Changes
cli::role_experiment::storageownsattempts.jsonl. It has a private file name, a private reader codec and a typed API byrun_dir(load_attempts,create_attempts,replace_attempts). New gatesanitizing:containers(scripts/containers.json,scripts/sanitizing_containers.mjs), scoped to this container. Unknown containers only warn.pub(crate)ownersrc-tauri/src/filesystem.rs.Catalog::loadreads throughcrate::filesystem::read_capture_catalogwith the same errors. New gatesanitizing:disk_access, also wired intopr-regression-gates.yml.staticitems are now private behind their owners:NAMING_MIGRATION_SUMMARY,INSTALLS_IN_FLIGHT, SettingsSAVE_OP_ID(nownext_settings_save_op_id) and fourSETTINGS_LOCK_DEBUG_*. Tests usecfg(test)accessors. This encapsulates the state; it does not remove it. A new concurrency test checks save op id uniqueness (8×128).config/environment.rsreadsAC_TEST_WINDOW_PLACEMENTat the same moment as before. Newpub(crate)ownersrc-tauri/src/process.rswithis_running(pid), moved byte for byte (3cfgvariants) fromconfig/agency_cache.rs.native_rename_failure_keeps_epoch_checkpoint_and_own_pending_payloadgotRetrywhen another test heldSAVE_SESSIONS_LOCKor the settings registry lock. The test now forces that contention once, asserts Retry → Recapture, and then retries onlyRetrywith a 10 s bound. All original assertions are kept. Positive control: losing the pending payload still fails the test.c4_state_key_census1276 → 1281 (5 new files);spawn_search_path_inventory85 → 86 rows, with theagency_cache.rsrow moved toprocess.rs.Measurements (
66c2cf1→0176550)attempts.jsonlmentions outsidestorage(files/literals)staticitems in scopeCommandoutsideprocess/PTY (uses/files)config/main/lib(uses/files)No file over 1000 lines and no line over 100 chars added.
Verification (room-33, Windows,
0176550)cargo fmt --check,cargo clippy --all-targets -- -D warnings: pass.cargo test --lib: 6603 passed, 0 failed, 30 ignored.cargo test --test '*' --no-fail-fast: 339 passed, 0 failed, 6 ignored (48 suites, census included).sanitizing:*gates (--base-ref 66c2cf1),sanitizing:self(68/0/0),test:debt,check:arcs,check:cycles,check:served-paths,cog:scan,cog:baseline: pass.cargo test --libruns (room-31): 6593 passed, 0 failed each.Known red gates
None known.
Known warnings (not blocking, deferred)
config/agency_cache.rs,config/agency_cache/git.rs).Rooms
filesystem)process,config/environment)Files modified
.github/workflows/pr-regression-gates.ymlpackage.jsonscripts/containers.jsonscripts/sanitizing_baseline.mjsscripts/sanitizing_containers.mjsscripts/sanitizing_disk_access.mjsscripts/sanitizing_tests.mjssrc-tauri/module-arcs.txtsrc-tauri/src/agent_update.rssrc-tauri/src/agent_update/install.rssrc-tauri/src/agent_update/tests/agent_install.rssrc-tauri/src/capture/catalog.rssrc-tauri/src/capture/catalog/tests.rssrc-tauri/src/cli/role_experiment/commands.rssrc-tauri/src/cli/role_experiment/fake_run.rssrc-tauri/src/cli/role_experiment/report.rssrc-tauri/src/cli/role_experiment/resume.rssrc-tauri/src/cli/role_experiment/storage.rssrc-tauri/src/cli/role_experiment/tests.rssrc-tauri/src/config.rssrc-tauri/src/config/agency_cache.rssrc-tauri/src/config/environment.rssrc-tauri/src/config/sessions_persistence/tests/replacement.rssrc-tauri/src/config/settings.rssrc-tauri/src/config/settings/agent/instance.rssrc-tauri/src/config/settings/project_path/migration.rssrc-tauri/src/config/settings/save.rssrc-tauri/src/config/settings/save/lock.rssrc-tauri/src/config/settings/tests/lock_debug_and_id_hash_schema.rssrc-tauri/src/config/settings/tests/save_backups_and_diagnostics.rssrc-tauri/src/filesystem.rssrc-tauri/src/filesystem/tests.rssrc-tauri/src/lib.rssrc-tauri/src/process.rssrc-tauri/src/process/tests.rssrc-tauri/src/startup.rssrc-tauri/src/testability/window_placement.rssrc-tauri/tests/c4_state_key_census.rssrc-tauri/tests/spawn_search_path_inventory.rs