Repository navigation
refactor(lint): migrate orchestration to application layer - #101
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (14)
💤 Files with no reviewable changes (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe lint runner moved to the application layer. The application service now supports optional safe fixes, reloads and reanalyzes changed files, reconciles fixed findings, and reports changes. The CLI and benchmark use the new service API. ChangesLint application migration and safe fixes
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to The lint orchestration migration preserves the planned safe-fix lifecycle and existing command behavior without an identified merge-blocking regression. Sequence Diagram(s)sequenceDiagram
participant CLI
participant ApplicationLint
participant MutationPlanner
participant MutationPlan
participant LintEngine
CLI->>ApplicationLint: RunWithSelection(options, selection)
ApplicationLint->>LintEngine: Load and analyze selected scope
ApplicationLint->>MutationPlanner: BuildPlan(documents, rules)
MutationPlanner-->>ApplicationLint: Mutation plan
ApplicationLint->>MutationPlan: Apply changed files
MutationPlan-->>ApplicationLint: Applied changes
ApplicationLint->>LintEngine: Reload and rerun rules
LintEngine-->>ApplicationLint: Final findings
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
Full details: Out of Scope Changes checkExplanation The post-fix rerun and reconciliation logic are outside issue Full details: Docstring CoverageExplanation Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 10 files. (1 skipped: 1 unsupported.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #95
Summary
Migrate lint orchestration from the legacy Runner into the layered lint application service while preserving existing CLI behavior.
Why
The refactor requires lint execution, safe fix application, post-fix reload/reanalysis, finding reconciliation, and result handling to flow through the application boundary defined by Discussion #58.
Type
Breaking change
Changes
internal/lint.Runnertointernal/application/lint.Service.--fixlifecycle: initial analysis, mutation planning, safe application, reload, reanalysis, and finding reconciliation.Makefileto benchmark the migrated application path.User-visible changes
None.
The CLI implementation moved to the layered application path, but command syntax, output formats, finding behavior, exit codes, and existing user-visible behavior remain unchanged.
Validation
Commands run:
gofmt -w <touched Go files>make lintgo test ./...go run ./cmd/vaar lint ...Additional commands:
go run ./cmd/vaar lint ...was not run separately because the existing CLI integration test suite exercises the migrated command path and preserves the existing behavior.Tests
Tests cover successful fixes, mixed fixed and remaining findings, no-change fix runs, selected and skipped rules, shifted line-number reconciliation, JSON fixed markers, mutation failures, reload failures, provenance validation, arbitrary dotenv suffix discovery, CLI behavior, output handling, and secret non-disclosure.
Documentation
Updated directly affected package comments to reflect the application boundary and the removal of legacy Runner orchestration.
Release notes
Migrates lint execution and safe-fix orchestration to the layered application pipeline without changing CLI behavior.
Reviewer notes
Please pay particular attention to:
RulePlanacross both lint passes.internal/mutations.internal/envfileremoval.Checklist