base red: plugin update lock opens without truncation (Linux clippy suspicious_open_options, #31462)
Summary
Culprit: #31462 (765d3c4f85bd, Leo), "feat(cmux-tui): update installed plugins automatically". PluginUpdateLock::acquire in cmux-tui/crates/cmux-tui/src/plugin_manager.rs opens .plugin-update.lock with create(true) and no truncate setting. Under -D warnings, clippy::suspicious_open_options stops the cmux-tui compile, so the Linux clippy step of cmux-tui-rust-check.sh (the cmux-tui.yml lint) is red on feat-cmux-next (exit 101). The broken Cargo.lock of the same PR hid this red until #31717 fixed the lock.
The file carries only the advisory fs4 lock; no code reads or writes its contents. truncate(false) is the OpenOptions default, so the behavior does not change; the code now says it.
History of this PR: it first also carried the Cargo.lock fix of #31654 and the get_mut fix of #31695. #31717 fixed the lock (#31654 is closed) and #31695 merged, so both left this PR through base merges. The fix for the new panic red from #30726 is in its own PR, #31773.
Testing
Focused command (fleet, Linux route): cmux-ci run --class isolated --script scripts/ci/cmux-tui-rust-check.sh --arg clippy --os linux --ref <sha>.
- Tip
7da73fec7f6(lock fixed by #31717, without this fix): RED,crates/cmux-tui/src/plugin_manager.rs:233:43 file opened with create, but truncate behavior not defined,could not compile cmux-tui (lib)(job b9bcc67a2a91d447cd9192f2, hq run 41384159768). - Head
14664e16e76: green (job 0721927050030febe85c4312, hq run 41386195814). - Earlier head
0c9b641a37e(same fix): clippy, fmt and acpmux process tests green (hq runs 41380938803, 41380915394, 41380939190).
Observed / Not run
- Observed: the fleet logs above.
prepush-gate.py: no new violations. - Not run: no local cargo build, clippy or test (fleet only). The plugin auto-update was not run by hand.
Changelog
none