cmux-tui: git diff and checkpoint diff take --after-path, --patch-offset and --patch-revision (base red)

LA
6d ago
+120-4

Summary

Base red (priority zero). On feat-cmux-next,
cli::command::tests::transport_path_coverage_tests::every_safe_transport_operation_has_a_noun_first_path
fails: "git.checkpoint.diff has catalog fields with no exercised CLI representation".

Cause: #27065 (8e7e6e2930de, bounded pages for large tracked-file patches) added
after_path, patch_offset and patch_revision to the catalog of git.diff and
git.checkpoint.diff, but gave the CLI no flag for them. The CLI could not read the
next page of a long file listing or of a large patch.

Fix: one shared parser (git::diff_pages) gives git diff and git checkpoint diff the
same three flags:

  • --after-path <path>: the reply's next_path, for the next page of files.
  • --patch-offset <n>: a canonical decimal byte offset (the catalog's decimal type is a string).
  • --patch-revision <revision>: the first page's 64-hex-digit revision.

Help (cmux git --help) and spec/cli.md say how to page. The coverage cases exercise the
three flags on both commands, and a new unit test pins the params both commands send and
the values they refuse. The fields stay in the coverage check.

The second base red, acpmux hermetic_daemon_guard::only_the_hermetic_helper_starts_the_acpmux_binary
(cpu_class.rs:175 from #27600, f5e762b57c5), is already fixed on the current base by #27983
(2dc4676123f, which lists the CPU-class host launcher in the guard). The fleet failures
were at 3ecd8020cb11, before #27983. This PR runs that test green on its head as proof.

Testing

Command: scripts/ci/cmux-tui-rust-check.sh test cli::command:: on the fleet.

  • Base (3ecd8020cb11): red, jobs 517753dc and 7525941b.
  • Red commit 133c39f462b (tests only): job ids follow in a comment.
  • Head: job ids follow in a comment; also the hermetic guard test and clippy.

Observed / Not run

  • Observed: the base red jobs above; prepush-gate.py passes; rustfmt on the changed files.
  • Not run locally: no Rust build or test runs on this VM (fleet only).

Changelog

Added: cmux git diff and cmux git checkpoint diff take --after-path, --patch-offset and --patch-revision to read large diffs page by page.


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


Summary by cubic

git diff and git checkpoint diff now accept --after-path, --patch-offset, and --patch-revision, so the CLI can page through long file listings and large tracked-file patches. Previously these catalog fields had no CLI representation, which failed the noun-first transport coverage test on feat-cmux-next.

  • One shared parser gives both commands the same flags and validation: --after-path takes the reply's next_path, --patch-offset a canonical decimal byte offset, and --patch-revision the first page's 64-hex-digit revision.
  • Help text and spec/cli.md document how to page, and coverage cases plus a unit test pin the parameters both commands send and the values they refuse.
  • The second base red (acpmux hermetic daemon guard) was already fixed on the base by #27983; this PR confirms that test passes on its head.