base red: panic ratchet rows from #34798 (link sync history slices)

Merged
LA
2d ago
+10-5

The feat-cmux-next panic ratchet is red at the tip (tip watcher, fleet job d902ffbfaf0fcbf76b13aeb2 at baa2e733e300 and 85dacc757ba1e7df1b5c27f5 at 6fef0f8fb13c):

  • cmux-tui: clippy::indexing_slicing 835 > baseline 831
  • cmux-tui: clippy::string_slice 83 > baseline 82
  • cmux-vault-egress: indexing_slicing 2, string_slice 5 > new crate (must be 0)

This PR removes the cmux-tui rows. The cmux-vault-egress rows are already fixed on feat by 17f9f493077f (#34921).

Culprits

RowsCommitSitesFix
cmux-tui indexing_slicing +4, string_slice +1c92b4ad7a9b3 (#34798, link sync undo/history/restore)link/sync_cli/history.rs: four &buffer[..read] in the copy loops of keep_blob_inner and keep_file, one &sha256[..2] in blob_paththis PR: buffer.get(..read) (error if a read says more than the buffer holds), sha256.get(..2) behind the same SHA-256 check
cmux-vault-egress indexing_slicing 2, string_slice 5a664e6ac6d84 (#34708, vault egress proxy, new crate)substitute.rsalready on feat: 17f9f493077f (#34921)

How the culprit was found (panic rows of the tip watcher per tip): cf86f55a1c7d had cmux-tui 836 / 82 (job 8430b3923f14690597d98d7c; 5 of these were the rows #34735 fixed). c92b4ad7a9b3 (#34798) had 840 / 83 (job be282ef707053535784f889f): +4 and +1. #34735 (9a1aa2f9cf2c) then removed 5, so da8ca9d7ecb0 had 835 / 83 (job 505d70d3d95173d207fdb61c). #34634, #34782 and 93703fe81dc add no rows. The stale push 164d65f5c34 took back #34798 and #34735 for a time (tips bd14c57f..f291b6c6 showed acpmux 689 > 686 again); 93703fe81dc put both back, and the seven #34735 files on feat are identical to 9a1aa2f9cf2c.

Behavior is unchanged: Read::read never returns more than the buffer length, and blob_path already refuses anything but 64 hex digits, so get(..2) always has a value.

Verification

  • Panic ratchet (Linux, the tip watcher's step cmux-tui-rust-check.sh panic) at b9171a2822f: job 54bcb0bfee7258f1e6396abd: pass (89 crates checked; no row over baseline, cmux-vault-egress at 0)
  • Clippy (Linux, -D warnings, all targets) at b9171a2822f: job 1d5ed720fe12d1fb1de84c84: red on a base finding, not this PR: clippy::redundant_clone in crates/cmux-git/tests/sync_barrier.rs:108 (from c30af19168d #34782; the same on the feat tip). The build stopped there, so this run gives no clippy result for cmux-tui; the panic step's clippy --lib --bins covers the changed file
  • nextest undo (the five tests of tests/link_sync_history.rs, owned Mac) at b9171a2822f: job c443db895433e13e4e7982e8: pass (72 tests run, 72 passed, among them all 5 cmux-tui::link_sync_history tests)
  • python3 scripts/cmux-next/prepush-gate.py: no new violations.

Observed / Not run

Observed: panic ratchet green and nextest undo green at the head (jobs above); the red rows and their per-tip counts in the tip watcher's fleet jobs named above; the diff of #34798 (the five sites); the #34735 files on feat compared with 9a1aa2f9cf2c (no diff); the prepush gate.
Not run: no regression test is added. The change takes a panic path that cannot happen (a read past its buffer, a short SHA-256) and returns an error there instead; no input reaches it. The existing link sync history tests cover the copy loops.

Changelog

none