Skip to content

test(system): avoid flaky GNU mirror in brew source e2e - #11509

Merged
jdx merged 1 commit into
mainfrom
agent/harden-brew-source-e2e
Jul 30, 2026
Merged

jdx merged 1 commit into
mainfrom
agent/harden-brew-source-e2e

Conversation

@jdx

@jdx jdx commented Jul 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • redirect the GNU hello source download from the flaky load-balancing mirror to the canonical GNU archive host in the slow brew source-build e2e test
  • retain Homebrew's SHA-256 verification for the downloaded archive

Why

ftpmirror.gnu.org intermittently returns HTTP 502 responses, causing the test to fail before it exercises mise's source-build pipeline. The canonical ftp.gnu.org archive serves the same checksum-verified tarball more reliably.

Validation

  • mise run test:e2e test_system_install_brew_source_slow
  • mise run lint-fix

AI-assisted — Tool: Codex; model: unavailable/unavailable; version: unavailable.


Note

Low Risk
Test-only URL rewrite for e2e; no runtime behavior or security-sensitive code paths change.

Overview
The slow brew source-build e2e (test_system_install_brew_source_slow) sets MISE_URL_REPLACEMENTS so GNU hello tarballs are fetched from https://ftp.gnu.org/gnu instead of https://ftpmirror.gnu.org/gnu, which intermittently returns HTTP 502 and fails the test before mise’s source-build path runs.

Inline comments document that Homebrew’s SHA-256 check still applies to the downloaded archive. No production or installer logic changes—only test stability.

Reviewed by Cursor Bugbot for commit ff36f21. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Tests
    • Improved the GNU Hello system installation test to use a consistent download source.
    • Preserved checksum verification while ensuring the source-build installation path is exercised reliably.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: de3cdc8a-dd40-4051-96b2-f33ed6f84867

📥 Commits

Reviewing files that changed from the base of the PR and between ac9c840 and ff36f21.

📒 Files selected for processing (1)
  • e2e/cli/test_system_install_brew_source_slow

📝 Walkthrough

Walkthrough

The slow GNU hello system-install test now exports MISE_URL_REPLACEMENTS to redirect GNU mirror URLs to ftp.gnu.org, ensuring the source-build download uses the canonical host.

Changes

GNU source installation test

Layer / File(s) Summary
Canonicalize GNU downloads
e2e/cli/test_system_install_brew_source_slow
Adds an exported URL replacement mapping from ftpmirror.gnu.org/gnu to ftp.gnu.org/gnu.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: benjaminwestern

Poem

A bunny hops past mirrors bright,
And finds GNU’s archive just right.
One URL swap, downloads flow,
Checksums guard the source below.
“Hello!” sings the rabbit light.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: making the system install brew source E2E test avoid the flaky GNU mirror.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR stabilizes the slow Homebrew source-build end-to-end test.

  • Redirects GNU hello downloads from the load-balancing mirror to the canonical GNU archive host.
  • Retains Homebrew’s existing SHA-256 verification of the downloaded source archive.

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The replacement matches the GNU hello source URL used by the Homebrew source-download path, rewrites it to the intended canonical archive host, and leaves SHA-256 verification intact.

Important Files Changed

Filename Overview
e2e/cli/test_system_install_brew_source_slow Adds a correctly formatted URL replacement that is applied to the Homebrew source download while preserving checksum validation.

Reviews (1): Last reviewed commit: "test(system): avoid flaky GNU mirror in ..." | Re-trigger Greptile

@jdx
jdx merged commit 982ac0a into main Jul 30, 2026
24 checks passed
@jdx
jdx deleted the agent/harden-brew-source-e2e branch July 30, 2026 18:34
@github-actions

Copy link
Copy Markdown
Contributor

Instruction counts

benchmark trend instructions Δ wall (min) Δ
env ▃▂▃▃▂▄▂▂▃▃▂▂▂▁▆▆█▆▇█ 84,949,144 → 84,980,344 +0.04% 22.20 → 23.56ms +6.11%
hook-env ▄▃▄▅▃▄▁▂▂▂▁▂▂▁▇▇█▆▇▇ 87,636,085 → 87,607,482 -0.03% 24.36 → 22.34ms -8.29%
ls ▇▅▇▇▃█▂▅▅▅▄▄▆▁▃▅█▃▅▆ 76,725,903 → 76,763,455 +0.05% 19.82 → 19.10ms -3.66%
registry ▅▄▆▆▅█▂▃▄▃▇▅▄▁▅▆▇▄▆▇ 50,251,613 → 50,259,528 +0.02% 13.20 → 14.40ms +9.11%
startup ▇▄▇▇▆█▅█▅▇▇▆█▁▇▆▆▅▆▆ 16,054,451 → 16,053,273 -0.01% 8.67 → 9.66ms +11.48%

No instruction-count regression above 1%.

Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run.

Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.

ff36f21395ec vs ac9c84078716 · measured on the runner, not pushed to the history.

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.

1 participant