Repository navigation
base red: acpmux process pages and retry delays without an index (panic ratchet 697 > 686, #30726, #31709) - #31773
Merged
lawrencecchen merged 4 commits intoNov 2, 2026
Conversation
…het indexing_slicing 696 > 686, #30726) #30726 (fbaa7a5, "byte-bound background-process history with opt-in pages") added ten clippy::indexing_slicing hits in acpmux hub/processes.rs: the page window self.processes[start..end] in ProcessTable::page_snapshot and nine serde_json indexes row["..."] in the too-large row of process_page_values. With #31695 merged, acpmux is 696 > baseline 686, so the Rust panic ratchet is red on feat-cmux-next. The window is now processes.get(start..end): start is an ID's slot + 1 (at most len) and end = min(start + limit, len), so the range is always in bounds and the fallback never applies. The row fields use row.get(..), which serializes a missing field as null, the same as an index on a missing key. The output does not change. No baseline change and no allow. Fleet panic step: RED at tip 7da73fe (indexing_slicing 697 > 686, hq run 41384159581) and at 4a94625 with the get_mut fix (696 > 686, hq run 41384159646, hits at processes.rs:327 and 384-388).
Contributor
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
web and size checks: green Shipped in:
|
|
Found 4 test failures on Blacksmith runners: Failures
|
lawrencecchen
temporarily deployed
to
sentry-dsyms
November 2, 2026 04:19 — with
GitHub Actions
Inactive
lawrencecchen
temporarily deployed
to
artifacts
November 2, 2026 04:19 — with
GitHub Actions
Inactive
…pmux-process-pages-index
… (panic ratchet, #31709) #31709 (030cb46, "Settings > Retry After Errors sets acpmux's retry loop") added DEFAULT_DELAYS_MS[n.min(DEFAULT_DELAYS_MS.len() - 1)] in hub/auto_resume/settings.rs, one more clippy::indexing_slicing hit in acpmux. With the #30726 hits fixed, acpmux is still 687 > 686 (hq run 41386195677). get(n), else last(), is the same wait: past the defaults the last one repeats. The array is a non-empty const, so the MIN_DELAY_MS fallback never applies.
lawrencecchen
temporarily deployed
to
ci-routing-agent
November 2, 2026 04:33 — with
GitHub Actions
Inactive
lawrencecchen
added a commit
that referenced
this pull request
Nov 2, 2026
clippy -D warnings (2e0f23045b77e7d0788701b3) refused an unneeded `crate::json::` path in ffi_tests.rs; the panic ratchet (ef9f5b7e0893ccd47e3cfc62) counted one cast_possible_truncation in the new crate (available_parallelism as u32), now a checked conversion. The two other reds of those runs are base reds with open fixes: cmux-tui plugin_manager.rs suspicious_open_options (#31697) and acpmux indexing_slicing 697 > 686 (#31773); this branch adds no acpmux hit.
lawrencecchen
temporarily deployed
to
artifacts
November 2, 2026 04:49 — with
GitHub Actions
Inactive
lawrencecchen
temporarily deployed
to
sentry-dsyms
November 2, 2026 04:49 — with
GitHub Actions
Inactive
lawrencecchen
temporarily deployed
to
artifacts
November 2, 2026 04:52 — with
GitHub Actions
Inactive
Contributor
Author
|
Review (subagent, correctness first): SHIP at d561fd2 Checked (net diff against origin/feat-cmux-next, 2 files, +15/-7):
|
lawrencecchen
added a commit
that referenced
this pull request
Nov 2, 2026
… app's level rules and their C ABI (no FFI input yet) (#31799) * test(host-budget): the app's host pressure rules as Rust tests, before the port Moves acpmux's host_pressure module (the formula, the verdict, the probe, the meter and their tests) into a new crate, cmux-host-budget, unchanged; acpmux re-exports it from src/host_pressure.rs, so its daemon status and send warnings read the same Meter. The macOS app keeps a hand copy of this formula, its sampler and its level tracker in CmuxNextHostPressure; the next commit ports the copy's rules into this crate so the app can link them through cmux-app-ffi instead. This commit adds the app's tests of those rules as the Rust corpus (level_tests.rs from HostPressureTrackerTests and HostBudgetFormulaTests, json_tests.rs for the app's JSON calls) with stub rules: level_for always says normal, the tracker never moves, and with_pressure keeps the old pressure. Red step: the level and rejudge tests fail here. * feat(host-budget): the app's level, rejudge and C ABI in Rust Ports the rules the macOS app keeps in Swift (CmuxNextHostPressure) into cmux-host-budget, and links the crate into cmux-app-ffi: - level.rs: HostPressureTracker. The level a verdict calls for (critical at critical memory pressure or two reasons, warning at one reason or a load at 75% of its limit, a 10% deadband while raised) and the tracker that falls only after calm_samples calm verdicts. - rejudge.rs: HostBudgetVerdict.with(pressure:). A verdict (the daemon's, with its session facts, or the app's) judged again with the pressure the dispatch source reports; the memory reason goes last, as in Swift. - json.rs and ffi.rs (header include/cmux_host_budget_ffi.h, module CCmuxHostBudgetFFI, re-exported by cmux-app-ffi as palette_ranker is): the app's own verdict from the process's Meter when no daemon answers (the same formula, override file, probe and swap rate as acpmux's daemon), the rejudge, a judge of given numbers (Debug Settings samples), the level and a tracker handle. JSON in acpmux's host_pressure shape, about once per 15 s; no call panics across the boundary. The C ABI is in the workspace crate, so workspace clippy and tests build and check it (ffi_tests.rs). app-ffi-release.yml gets the new crate in its push paths, as check-app-ffi-pin.sh --list-inputs now lists it (app-ffi-release-paths.test.sh: ok). No Swift change: the app keeps the pinned FFI until the re-pin; the Swift half deletes its copy after it. * fix(host-budget): clippy findings of the first fleet run clippy -D warnings (2e0f23045b77e7d0788701b3) refused an unneeded `crate::json::` path in ffi_tests.rs; the panic ratchet (ef9f5b7e0893ccd47e3cfc62) counted one cast_possible_truncation in the new crate (available_parallelism as u32), now a checked conversion. The two other reds of those runs are base reds with open fixes: cmux-tui plugin_manager.rs suspicious_open_options (#31697) and acpmux indexing_slicing 697 > 686 (#31773); this branch adds no acpmux hit. * refactor(host-budget): the crate move lands without the app FFI link The rule for app FFI moves changed (cmux-ad 04:35Z): a change to an FFI input lands in one PR with its re-pin and its Swift call. This branch now keeps only what is no FFI input: the cmux-host-budget crate (the move from acpmux, the ported level and rejudge rules and their C ABI, built and tested in the workspace), used by acpmux alone. cmux-app-ffi, build-app-ffi.sh and app-ffi-release.yml are back at the base; the FFI move PR adds the link, the re-pin and the Swift half together. --------- Co-authored-by: cmux-bot[bot] <348531757+cmux-bot[bot]@users.noreply.github.com>
This branch was previously deployed
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.
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Summary
Culprit: #30726 (fbaa7a5, Leo), "feat(acpmux): byte-bound background-process history with opt-in pages (SW-11)". It added ten
clippy::indexing_slicinghits incmux-tui/crates/acpmux/src/hub/processes.rs:self.processes[start..end]inProcessTable::page_snapshot(line 327).row["..."]in the too-large row ofprocess_page_values(lines 384-388).The Rust panic ratchet is red on feat-cmux-next: acpmux 697 > baseline 686 at 7da73fe (hq run 41384159581), and 696 after #31695 removed the #30712 hit. The broken Cargo.lock from #31462 hid this red until #31717.
This PR:
self.processes.get(start..end).unwrap_or_default().startis an ID's slot + 1 (at mostlen) or 0, andend = min(start + limit, len), so the range is always in bounds and the fallback never applies.row.get(..). AnOption<&Value>serializesNoneasnull, the same as an index on a missing key, so the reply does not change.It also fixes one more hit that came on the tip after #31695: #31709 (030cb46, Leo, "Settings > Retry After Errors sets acpmux's retry loop") added
DEFAULT_DELAYS_MS[n.min(DEFAULT_DELAYS_MS.len() - 1)]inhub/auto_resume/settings.rs. It now readsDEFAULT_DELAYS_MS.get(n).or(DEFAULT_DELAYS_MS.last()): past the defaults the last wait repeats, as before. The array is a non-empty const ([u64; 4]), so theMIN_DELAY_MSfallback never applies.No baseline change and no
allow.Testing
Focused command (fleet, Linux route):
cmux-ci run --class light --script scripts/ci/cmux-tui-rust-check.sh --arg panic --os linux --ref <sha>.8fad072aafc(with base red: acpmux lose_running reads its slot without an index (panic ratchet indexing_slicing 687 > 686, #30712) #31695): RED,acpmux: clippy::indexing_slicing 697 > baseline 686(job 4fbbc710c433f636164a8524, hq run 41388454113).2f95be6b0cf(only the feat(acpmux): byte-bound background-process history with opt-in pages (SW-11) #30726 fix): still RED, 687 > 686; the extra hit is cmux NEXT: Settings > Retry After Errors sets the automatic retry loop (on/off, seconds between tries, tries per error) #31709's (job e04b07004910adff2b197d6e, hq run 41386195677).d561fd27997: green,rust-panic-ratchet: 80 crates checked, 30 at deny(job 2b80c682d0c03462ac781c8a, hq run 41388454076).--arg test --arg process_) at the head: 145 passed (job fe6209efcdec5c0b9e069f4b, hq run 41388453748).--arg test --arg auto_resume) at the head: 101 passed (job 5cfaee5e3c404f45cda447d0, hq run 41388454078).Observed / Not run
prepush-gate.py: no new violations.rustfmt --checkon the file: clean._acpmux/process/listpages or the retry settings by hand.Changelog
none
Related: #31697 (Linux clippy fix for #31462's plugin_manager.rs). The two fixes are independent: each step fails on its own, and neither step needs the other fix to run.