* removed duplicate calls to clean_xcode_tools and clean_code_editors
in lib/clean/app_caches.sh clean_user_gui_application() was making calls
to clean_xcode_tools and clean_code_editors.
in lib/clean/dev.sh clean_xcode_tools and clean_code_editors was also
being called, causing the duplication when executing the clean command.
removed the calls from lib/clean/app_caches.sh
clean_user_gui_application since these two calls are developer focused.
* test: cover removed developer app calls
---------
Co-authored-by: Tw93 <hitw93@gmail.com>
Scan Application Scripts, Containers and FileProvider directories for
entries that share the app bundle-id prefix (e.g. share extensions,
file-provider extensions) so they are included in uninstall cleanup.
Show "Bluetooth devices may disconnect briefly during refresh" before
actually restarting bluetoothd, so the user is not surprised by a
momentary disconnect.
Add a lightweight top-level entry cap to Containers and Group
Containers scanning. When a cache directory exceeds the threshold,
skip the expensive per-item du/find size scan and take a partial-size
/ "cleaned" output path instead. Replace find-piped-to-read loops
with pure-bash glob iteration to cut external process overhead.
Closes#586
Replace LastRecommendedUpdatesAvailable defaults check with unified
softwareupdate -l --no-scan parsing. Add caching layer and teach the
parser to distinguish macOS updates, Background Security Improvements,
Rapid Security Responses, and non-macOS entries so each gets an
accurate title in the output.
Fix reset_softwareupdate_cache() to also reset the in-memory
SOFTWARE_UPDATE_LIST_LOADED flag, and add a regression test.
Closes#585
Add MOLE_TEST_MODE=1 checks to skip AppleScript osascript calls
and sudo operations that trigger system permission dialogs during tests:
- lib/check/all.sh: Skip login items listing
- lib/clean/apps.sh: Skip running app detection
- lib/clean/user.sh: Skip Finder trash operations and sudo test calls
- lib/core/log.sh: Skip sudo status check in debug log
- lib/uninstall/batch.sh: Skip login item removal
Also add MOLE_TEST_MODE=1 export to all test files that load
these modules to ensure consistent test isolation.
Add hint_is_system_binary() to short-circuit detection for plists that
use /bin/*, /usr/bin/*, /usr/libexec/* etc. as their program path.
These are custom scripts, not app-backed launch agents, so the stale
detection logic does not apply. Previously the function relied on the
absence of AssociatedBundleIdentifiers as an implicit skip, which could
fail on certain macOS plutil edge cases.
Also add teardown() in clean_hints.bats to explicitly remove the
LaunchAgents directory after each test, and add run_with_timeout mock
in the "skips custom shell wrappers" test to prevent mdfind from
influencing results. This eliminates the intermittent failure where
test 70 showed "Review:" in output without "Potential stale login item:".
- Fix 'bats_opts[@]: unbound variable' under set -u + bash 3.2: empty
arrays must use ${arr[@]+"${arr[@]}"} idiom, not "${arr[@]}"
- Split core_performance.bats out of the parallel batch; run it after
all parallel workers finish so wall-clock timing assertions aren't
skewed by CPU contention from concurrent bats processes
- Raise MOLE_PERF_GET_INVOKING_USER_LIMIT_MS default 500→2000ms and
add MOLE_PERF_SECTION_LIMIT_MS (default 2000ms) to give sufficient
headroom without masking real regressions
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: add JSON output tests and README docs for analyze and status
Add 7 BATS tests covering `--json` output for `mo analyze` and `mo status`:
- schema structure
- field types
- pipe auto-detection.
Also document the `--json` flag in a new "Machine-Readable Output" README section, including the auto-detection behavior when piped.
* chore: use waitgroup go in status collector
---------
Co-authored-by: Tw93 <hitw93@gmail.com>