Skip to content

perf(uninstall): bound retries for unsplittable Homebrew batches - #2245

Merged
tw93 merged 1 commit into
tw93:mainfrom
Yuxin-Qiao:codex/bound-brew-list-retries
Dec 5, 2026
Merged

tw93 merged 1 commit into
tw93:mainfrom
Yuxin-Qiao:codex/bound-brew-list-retries

Conversation

@Yuxin-Qiao

Copy link
Copy Markdown
Contributor

Summary

  • Retry a successful Homebrew info batch in two smaller groups when its text cannot be split by the requested cask names. This can happen when Homebrew prints a cask's new name for an old token.
  • Share a three-second budget across optional split probes in one mo uninstall --list invocation. Keep the existing per-cask fallback when a group cannot be used.

Safety Review

  • This changes read-only uninstall inventory. Each reused block still requires a successful query and the existing complete, request-ordered split. Ordinary failures and original batch timeouts keep their existing handling. A signal cancels the inventory.
  • The uninstall execution path and its fresh ownership checks are unaffected.

Tests

  • ./scripts/check.sh --format, ./scripts/check.sh --no-format, and ShellCheck for the changed Bats file.
  • 361 uninstall Bats tests passed as written. An existing interactive test stalled in live inventory on both base and candidate in this environment. With that inventory mocked locally, its two exit-status cases passed on both. The mock is outside the PR diff.
  • ./scripts/test.sh passed in the isolated copy with that same fixture adjustment. The main Bats batch reported 2,746 tests and zero failures. Go and integration tests passed. The runner skipped its installation test on this Homebrew host.
  • Added a regression proving that later batches cannot reset the retry budget.
  • Manual read-only A/B on one arm64 Mac with warm caches. Three runs per version, median mo uninstall --list time was 12.541 s on main and 10.778 s on the patch. All six JSON outputs were byte-identical.

@Yuxin-Qiao
Yuxin-Qiao requested a review from tw93 as a code owner December 5, 2026 02:59
@tw93

tw93 commented Dec 5, 2026

Copy link
Copy Markdown
Owner

@Yuxin-Qiao Thanks for bounding the Homebrew info retry split cleanly; merging into main now (available via mo update --nightly and included in the upcoming release).

@tw93
tw93 merged commit 818b72b into tw93:main Dec 5, 2026
12 checks passed
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.

2 participants