Skip to content

fix: preserve --exec-batch command order on arg flush#2061

Open
ychampion wants to merge 1 commit into
sharkdp:masterfrom
ychampion:fix-exec-batch-command-order
Open

fix: preserve --exec-batch command order on arg flush#2061
ychampion wants to merge 1 commit into
sharkdp:masterfrom
ychampion:fix-exec-batch-command-order

Conversation

@ychampion

@ychampion ychampion commented Jul 7, 2026

Copy link
Copy Markdown

Summary

  • Flush all --exec-batch commands together when any command reaches a batch or argument-size boundary
  • Add a regression test for the OS argument-limit flush path
  • Add an unreleased changelog entry

Why

Fixes #2033. Previously, if one batch command reached the OS argument limit before another, that later command could run before an earlier command from the CLI.

Validation

  • cargo test batch_command_order_is_preserved_when_argument_limit_flushes_one_command -- --nocapture — passed; failed before the fix with second before first
  • cargo test test_exec_batch -- --nocapture — passed
  • cargo fmt --all -- --check — passed
  • cargo test --all-features — passed
  • cargo clippy --all-targets --all-features -- -Dwarnings — passed
  • cargo +1.90.0 clippy --locked --all-targets --all-features — passed
  • cargo +1.90.0 test --locked --all-features — passed

Notes

  • Did not run cross-platform CI locally.
  • AI assistance was used for implementation and test drafting; I reviewed the change and ran the validation above.

Copilot AI review requested due to automatic review settings July 7, 2026 23:48
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ychampion ychampion force-pushed the fix-exec-batch-command-order branch from bd9e365 to 15a7e01 Compare July 7, 2026 23:58
Multiple --exec-batch commands should keep CLI order even when one command reaches the OS argument limit before the others. Flush all batch builders together at a shared boundary before pushing the next path.

Constraint: The issue was maintainer-filed as sharkdp#2033 and the changelog requires behavior changes to be listed under the upcoming release.

Rejected: Only documenting the exception | The surprising ordering can be fixed with a localized batch-boundary change.

Confidence: high

Scope-risk: narrow

Directive: Keep --exec-batch commands aligned on shared flush boundaries when adding new batch-splitting rules.

Tested: cargo test batch_command_order_is_preserved_when_argument_limit_flushes_one_command -- --nocapture; cargo test test_exec_batch -- --nocapture; cargo fmt --all -- --check; cargo test --all-features; cargo clippy --all-targets --all-features -- -Dwarnings; cargo +1.90.0 clippy --locked --all-targets --all-features; cargo +1.90.0 test --locked --all-features

Not-tested: Cross-platform CI locally
@ychampion ychampion force-pushed the fix-exec-batch-command-order branch from 15a7e01 to 77e05f8 Compare July 8, 2026 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] ---exec-batch doesn't always run commands in order

2 participants