feat(nuclear): Add nuclear mode for complete devtools cleanup#24
Merged
Conversation
a88b404 to
38697d1
Compare
- Add NUCLEAR_MODE flag and paths for complete cleanup - Create confirm_nuclear() that never auto-confirms with --force - Implement nuclear_devtools_clean() to remove ALL caches - Gradle: caches + wrapper - npm: complete directory - Cargo: registry + git - Composer: cache - pip + poetry: all caches including virtualenvs - Maven: repository - Add --nuclear flag to CLI with validation - Update help documentation with nuclear mode examples - Add 20 unit tests with full coverage Closes #14
- Add log_section() to display section headers - Fixes errors in jetbrains and docker tests - Used by log_cleanup_section() wrapper
38697d1 to
9b02023
Compare
- Remove Cargo/Composer from nuclear mode (no existing modules) - Add nuclear_*_clean() functions to each package manager module: * maven.sh: nuclear_maven_clean() - removes entire repository * gradle.sh: nuclear_gradle_clean() - removes caches + wrapper * node.sh: nuclear_node_clean() - removes npm, yarn, pnpm completely * python.sh: nuclear_python_clean() - removes pip + poetry with virtualenvs - Refactor devtools.sh nuclear_devtools_clean() to orchestrator pattern: * Collects sizes from all modules * Shows single summary with all caches * Single confirmation with confirm_nuclear() * Sets NUCLEAR_CONFIRMED flag to skip module confirmations * Calls each module's nuclear function - Update nuclear_mode_test.sh: * Remove Cargo/Composer path tests * Add tests for module nuclear functions * Add tests for NUCLEAR_CONFIRMED flag behavior - Clean up config.sh: remove unused CARGO_* and COMPOSER_* paths Architecture: monolithic (175 lines) -> orchestrator + 4 modules (more maintainable) Tests: 156/156 passing (24 nuclear mode tests) Manual test: verified with ~1GB real cache cleanup
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
Implements Issue #14 - Nuclear mode for complete package manager cleanup
Changes
--nuclearflag for aggressive cleanup of ALL development tool cachesconfirm_nuclear()that NEVER auto-confirms (even with--force)nuclear_devtools_clean()to destroy all caches without exceptionslog_section()function (bonus fix)Targets
_cacacheonlyUsage
Safety
--force--dry-runand--analyzemodesTests
Files Changed
bin/devsweep- CLI flag + validation + helpsrc/utils/config.sh- Paths + NUCLEAR_MODE flagsrc/utils/common.sh- confirm_nuclear() + log_section() fixsrc/modules/devtools.sh- nuclear_devtools_clean() implementationtests/unit/nuclear_mode_test.sh- 20 unit testsCloses #14