Skip to main content

Import-safe autofix decision tree

This chart explains how import-aware rewrite helpers decide whether to emit a fix, a suggestion, or a diagnostic-only report.

Why this chart mattersโ€‹

  • Import insertion is where most autofix regressions happen.
  • The tree clarifies that symbol safety and parse safety are independent gates.
  • Suggestion fallback is a correctness tool, not a failure mode.

Review checklistโ€‹

  • Verify import insertion honors plugin settings and nearest program scope.
  • Verify local alias selection does not shadow existing bindings.
  • Verify rewritten output remains parse-safe and semantically equivalent.