- Make every statically-poked method public and call it directly,
keeping `public_send` only for dynamically-named public methods.
- Read and write state through public `attr_*` accessors instead of
instance variable reflection.
- Enable `Homebrew/NoSendInTests` and
`Homebrew/NoInstanceVariableAccessInTests` now the test suite is
clean, so neither pattern creeps back in.
- Keep rare justified disables, e.g. `Module#remove_const` is
private core Ruby and raw memoisation state has no accessor.
Address review feedback on #23144: delete the fixture README, merge the
per-era trees into a single fixture Caskroom copied directly onto the
sandboxed test Caskroom path (no path stub, no mkpath), hardcode the
per-era expectations in one typed example in update-report_spec.rb and
make migrate_caskroom_caskfiles_to_json public instead of calling it via
send.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- preserve artifacts when receipts or metadata are missing
- share recovery between migration, upgrade and reinstall
- verify rewritten JSON before deleting legacy metadata
- a zero-argument `brew upgrade` or `brew outdated` lists the
outdated packages itself right after auto-updating
- suppress the duplicate `You have N outdated ...` count that
the auto-update report would otherwise print first
- unset `HOMEBREW_AUTO_UPDATE_SKIP_OUTDATED` on the early return
too so it cannot leak into the command's environment
- Follow GitHub redirects while preventing old tap names from staying trusted
- Update redirected tap remotes so future operations use the new canonical URL
- Remove old `trustedtaps` and per-item trust entries after a tap redirect
- Show tap trust status in `tap-info` when tap trust is required
- Query redirected tap metadata only after tap API redirects
- Keep forced redirect checks limited to taps
- Preserve update-report revisions when a tap redirect renames a tap
- Keep no-op tap updates from querying redirected metadata
- Treat redirected tap SHA API checks as updates
- Print redirected and untrusted tap messages with explicit tap wording
- remove `brew test-bot` auto-tapping that silently tapped and
retried on `TapFormulaUnavailableError` for discovered dependency
taps; missing taps now surface so they can be tapped explicitly
- gate `update` tap migrations behind `Trust.trusted_tap?` so only
official or already-trusted taps are auto-tapped, otherwise warn
with manual instructions instead of erroring out the wider
`brew update`
- recommend trusting just the migrated `user/repo/formula` rather
than the whole tap, tapping first so `brew trust` can infer the
package type from the on-disk tap files
- recommend `brew migrate` only for renames; a tap-only migration
keeps the name so `brew migrate` is a no-op there, so recommend
`brew reinstall` to re-pour from the new tap instead
- spell out manual completion because a skipped tap migration will
not re-run on a later `brew update`
- now that `brew trust` exists, tapping untrusted taps should be an
explicit user action rather than an implicit side effect
- Since https://github.com/sorbet/sorbet/commit/d9d4b57b3fde3907d739ed85d340e64f75f2a7b8
Sorbet types `described_class` more correctly than assuming `T.untyped`.
- Switched back via having Copilot CLI (GPT 5.3 Codex) write me a
script to change all of the `klass` references into full class names,
and then running RuboCop's autocorrector having removed the `explicit`
style. The explicit style was deemed too verbose in
0c1321f1b1, hence why we went with
`let(:klass)`.
- This is much less verbose than the full class name, while preserving
Sorbet typing of the tests fully.
- The "explicit" setting on the `RSpec/DescribedClass` cop is still
enabled, because `described_class` is bad for Sorbet typing, but
instead of applying its autocorrections to specify the full class name
everywhere that `described_class` was used, use
`let(:klass) { Foo }` so that the repetition per-test isn't massive in
tests that use it a lot (say, >5 times).
- Changes made with Copilot CLI, agent mode, Claude Opus 4.7.
- Now that we've enabled `--experimental-rspec-mode` [1], let's start
using Sorbet in tests at its basic `typed: false` level for now.
- This will ease the migration to `typed: true` of any or all tests we
want to do in the future.
[1]: https://github.com/Homebrew/brew/pull/21742
From reading https://github.com/orgs/Homebrew/discussions/3328: I
initially thought we should just change "Updated" to "Modified" when
appropriate. After conversation with Bo98, though, I thought more and
saw that we're already checking for outdated formulae here so, rather
than ever traverse through the formula history, look at the outdated
formula and list them unless we've set
`HOMEBREW_UPDATE_REPORT_ALL_FORMULAE` in which case we show the
modifications.
While we're here, also do a bit of reformatting and renaming to better
clarify intent.