Skip to content

fix(cmux-tui-core): snapshot_written takes the snapshot's end as one value (base red: clippy too_many_arguments) - #32092

Merged
cmux-bot[bot] merged 1 commit into
feat-cmux-nextfrom
fix/base-red-snapshot-written-args
Nov 2, 2026
Merged

cmux-bot[bot] merged 1 commit into
feat-cmux-nextfrom
fix/base-red-snapshot-written-args

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Base red on feat-cmux-next: cargo clippy -D warnings refuses cmux-tui-core on every push and every PR since #31931 (e3c495d). The error is this function has too many arguments (8/7) at cmux-tui/crates/cmux-tui-core/src/output_store/snapshot.rs:537, because #31931 added the stream-gap count as an eighth argument of snapshot_written.

The three values that say where a written snapshot ends (generation, stream_end, gaps) are now one SnapshotEnd value. These are the same fields that Capture::Snapshot carries. The one caller and the three tests pass it. There is no behaviour change, and no #[allow].

Found by dogfood-ports while it ran clippy for #32055. No STATUS item or open PR owned it.

Testing

Fleet, at head 98581fa:

Observed / Not run

Observed: the fleet steps above. Not run: the full cmux-tui-core suite (only the output_store filter, which covers every caller).

Changelog

none


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the clippy too_many_arguments failure in cmux-tui-core that made every push and PR to feat-cmux-next red.

snapshot_written grew an eighth argument, so the three values describing where a written snapshot ends (generation, stream_end, gaps) now travel as one SnapshotEnd value, the same fields Capture::Snapshot carries. There is no behavior change; the single production caller and the three tests pass it.

Written for commit 98581fa. Summary will update on new commits.

View guided diff Turn on auto-fix

…value (base red: clippy too_many_arguments)

#31931 (e3c495d) gave snapshot_written an eighth argument (the
stream-gap count), so clippy -D warnings refuses cmux-tui-core on every
feat push and PR: 'this function has too many arguments (8/7)' at
output_store/snapshot.rs:537. The three values that say where the written
snapshot ends (generation, stream_end, gaps) are now one SnapshotEnd, the
same fields Capture::Snapshot carries. No behaviour change.
@lawrencecchen lawrencecchen added the risk:low Risk tier (docs/ci/risk-tiers.md) label Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 98581fa: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr32092 -f ref=fix/base-red-snapshot-written-args -f platform=macos -f backend_mode=local

Shipped in:

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

Review (independent review subagent): SHIP at 98581fa

Findings (I read the diff only; I did not build or run anything, and I used the fleet steps in the PR body as the build evidence):

  • Pure refactor. The one production caller (write_pass_at, snapshot.rs:334) passes the same &generation, stream_end and gaps from Capture::Snapshot as before. The body destructures end back into the same three names with the same types (&Arc<str>, u64, u64), so *generation, generation.clone() (an Arc clone, as before), stream_end and gaps act the same. The three tests pass the same values (3/0, 6/0, 10/0) and the same generations.
  • Rust correctness. SnapshotEnd<'a> holds only &'a Arc<str> and two u64, so #[derive(Clone, Copy)] is valid. SnapshotEnd<'_> in the signature is correct. The let SnapshotEnd { generation, stream_end, gaps } = end; binds new names that replace the old parameters 1:1 and shadow nothing. In a_snapshot_in_full_mode_removes_a_tail_left_from_snapshot_mode, the temporary Arc::from("g") lives to the end of the call statement, as it did before.
  • Callers. git grep snapshot_written origin/feat-cmux-next -- cmux-tui finds only the one production call and the three test calls. The PR updates all of them. SnapshotEnd is private to the module and is used nowhere else.
  • Style. It matches the crate: other private #[derive(Clone, Copy)] and borrowed struct X<'a> argument structs exist (for example git_ops/checkpoint/capture.rs Stamp<'a> and apps/terminal_ops.rs GateAt<'a>). The doc comments are updated (end.stream_end), and the field names match Capture::Snapshot.
  • No #[allow] is added. The 8-argument too_many_arguments red from fix(cmux-tui): a host reconnect ends the output store's tail, so a kill right after it restores the gap's output #31931 (e3c495d, which is in this head's history) goes to 6 arguments.
  • Minor, not blocking: the destructure could have been done in the parameter pattern (SnapshotEnd { generation, stream_end, gaps }: SnapshotEnd<'_>). The let form is equally clear.

@cursor

cursor Bot commented Nov 2, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

This branch was previously deployed

3 inactive deployments
artifacts — 98581fa4 Deployed Nov 2, 2026 by lawrencecchen via publish tree-addressed cmux-tui #100498
sentry-dsyms — 98581fa4 Deployed Nov 2, 2026 by lawrencecchen via upload cmux-tui dSYMs to Sentry #100498
ci-routing-agent — 98581fa4 Deployed Nov 2, 2026 by lawrencecchen via cmux-tui tree preflight #100498
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant