feat!: remove --fix from audit/lint/test — refactor owns all code changes#865
Merged
feat!: remove --fix from audit/lint/test — refactor owns all code changes#865
Conversation
…nges BREAKING CHANGE: The --fix flag is removed from audit, lint, and test commands. Use 'homeboy refactor --from <source> --write' instead. The refactor command is the single source of truth for all code changes. audit/lint/test find problems (read-only), refactor fixes them (writes). Removed: - audit: --fix, --write, --max-iterations, --warning-weight, --info-weight, --no-lint-smoke, --no-test-smoke, --preview - lint: --fix - test: --fix (including test --drift --fix) - AuditCommandOutput::Fix variant - run_fix_workflow() from code_audit/run.rs - plan_autofix() from lint/run.rs - Autofix planning block from test/run.rs - process_ratchet() (only called from removed run_fix_workflow) Updated: - Hints now point to 'homeboy refactor <comp> --from <source> --write' - Docs updated for audit and lint commands - Tests rewritten for read-only audit mode The underlying refactor engine (run_audit_refactor, run_lint_refactor, run_test_refactor, build_refactor_plan, FixResult, etc.) is unchanged. refactor --from all --write continues to work exactly as before. Resolves #864
Contributor
Homeboy Results —
|
src/commands/audit.rs
…emoval Remove dead code in report.rs: - AutoRatchetSummary, AuditFixPolicySummary structs - build_fix_policy_summary(), build_fix_hints(), log_fix_summary() - Dead tests for removed functions in report_test.rs - Unused FixResult, PolicySummary imports Update stale docs: - cli-reference.md: remove --fix from AuditArgs, LintArgs, TestArgs - code-factory.md: update autofix commands to use refactor - commands/lint.md: update HOMEBOY_AUTO_FIX docs, hints, examples Update stale source comments: - format_write.rs, validate_write.rs: remove audit --fix references - refactor/mod.rs: update AppliedRefactor docstring
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
Resolves #864. The
--fixflags onaudit,lint, andtestwere duplicate entry points into the same refactor engine. This removes them, makingrefactorthe single source of truth for all code changes.Mental model
What was removed
CLI flags:
audit:--fix,--write,--max-iterations,--warning-weight,--info-weight,--no-lint-smoke,--no-test-smoke,--previewlint:--fixtest:--fix(includingtest --drift --fix)Code (-450 lines):
AuditCommandOutput::Fixvariantrun_fix_workflow()fromcode_audit/run.rsplan_autofix()fromlint/run.rstest/run.rsprocess_ratchet()(dead after removingrun_fix_workflow)What's unchanged
The underlying refactor engine is untouched:
run_audit_refactor(),run_lint_refactor(),run_test_refactor()build_refactor_plan()with--from audit/lint/test/allFixResult, fix policy, chunked application, sandbox isolation, verification gatesrefactor rename,transform,decompose,move,propagateMigration
The CI action (homeboy-action) already defaults to
refactor --from all --writeas of v2 (PR #102).Verification
cargo check— clean compile, zero warningscargo test— all 25 tests pass