fix: address code review findings across installer, auth, and brew#105
Merged
Conversation
- installer: remove four dead step* functions (stepMacOS, stepPostInstall, stepShell, stepDotfiles, hasDotfiles) that had no production callers; tests in installer_test.go were exercising this dead code instead of the live apply* paths, producing false coverage - installer: replace 14 TestStep* and 5 TestHasDotfiles* tests with equivalent tests on the real apply* functions and Plan() entrypoints - auth: pollOnce now uses httputil.Do() instead of httpClient.Get(), consistent with startAuthSession(); HTTP 429 + Retry-After handling now applies to poll requests; archtest baseline updated - brew: InstallWithProgress now returns a non-nil error when packages permanently fail after retries (was silently swallowing failures) - brew: ctx context.Context threaded through InstallWithProgress and all internal brew helpers; exec.CommandContext used so installs are cancellable - brew: retryBrew() helper extracted to deduplicate the retry-with-backoff loop shared by installFormulaWithError and installSmartCaskWithError - brew: parseBrewError default line truncation increased from 60 to 120 chars to preserve enough error context - brew: PreInstallChecks(formulaeCount, caskCount int) uses type-aware estimates (0.1 GB/formula, 0.5 GB/cask) instead of a flat 0.2 GB/pkg - archtest baselines regenerated to reflect removed dead code and shifted line numbers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan