Skip to content

feat!: remove --fix from audit/lint/test — refactor owns all code changes#865

Merged
chubes4 merged 3 commits intomainfrom
feat/refactor-owns-all-fixes
Mar 20, 2026
Merged

feat!: remove --fix from audit/lint/test — refactor owns all code changes#865
chubes4 merged 3 commits intomainfrom
feat/refactor-owns-all-fixes

Conversation

@chubes4
Copy link
Member

@chubes4 chubes4 commented Mar 20, 2026

Summary

Resolves #864. The --fix flags on audit, lint, and test were duplicate entry points into the same refactor engine. This removes them, making refactor the single source of truth for all code changes.

Mental model

audit, lint, test  →  find problems (read-only)
refactor           →  fix problems (writes)

What was removed

CLI flags:

  • audit: --fix, --write, --max-iterations, --warning-weight, --info-weight, --no-lint-smoke, --no-test-smoke, --preview
  • lint: --fix
  • test: --fix (including test --drift --fix)

Code (-450 lines):

  • 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() (dead after removing run_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/all
  • FixResult, fix policy, chunked application, sandbox isolation, verification gates
  • refactor rename, transform, decompose, move, propagate

Migration

# Before
homeboy audit my-component --fix --write
homeboy lint my-component --fix
homeboy test my-component --fix

# After
homeboy refactor my-component --from audit --write
homeboy refactor my-component --from lint --write
homeboy refactor my-component --from test --write
homeboy refactor my-component --from all --write  # all sources in one pass

The CI action (homeboy-action) already defaults to refactor --from all --write as of v2 (PR #102).

Verification

  • cargo check — clean compile, zero warnings
  • cargo test — all 25 tests pass
  • Rewritten audit test validates read-only mode

…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
@homeboy-ci
Copy link
Contributor

homeboy-ci bot commented Mar 20, 2026

Homeboy Results — homeboy

Lint

⚡ Scope: changed files only

lint (changed files only)

Test

⚡ Scope: changed files only

test (changed files only)

Audit

⚡ Scope: changed files only

audit (changed files only)

Auto-refactor

ℹ️ Autofix enabled, but no fixable file changes were produced

Failure Digest

Autofixability classification

  • Overall: human_needed
  • Autofix enabled: yes
  • Autofix attempted this run: no
  • Human-needed failed commands:
    • refactor --from all

Machine-readable artifacts

  • homeboy-lint-summary.json
  • homeboy-test-failures.json
  • homeboy-audit-summary.json
  • homeboy-autofixability.json

⚡ Scope: changed files only

refactor --from all

Tooling versions
  • Homeboy CLI: homeboy 0.82.0+0560141
  • Extension: rust from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: unknown
  • Action: Extra-Chill/homeboy-action@v1

Homeboy Action v1

homeboy-ci bot and others added 2 commits March 20, 2026 15:45
…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
@chubes4 chubes4 merged commit 367e9ce into main Mar 20, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove --fix flags from audit/lint/test — refactor owns all code changes

1 participant