Skip to content

refactor: move sniffler CLI to cac#3

Merged
V3RON merged 9 commits into
masterfrom
refactor/cac-cli
Jun 18, 2026
Merged

refactor: move sniffler CLI to cac#3
V3RON merged 9 commits into
masterfrom
refactor/cac-cli

Conversation

@V3RON

@V3RON V3RON commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

What is this?

This PR moves Sniffler's CLI from hand-rolled parsing to cac. It changes the CLI contract to use positional changed files or --base/--head, removes --changed, and adds explicit --version support.

How does it work?

This PR builds a fresh cac instance for each runCli call, defines impact and run commands with variadic positional file args, and maps parsed options into the existing impact/run command inputs. Validation for selection mode, output format, and runner command boundaries stays in the CLI layer, so command execution and dependency injection remain unchanged.

Why is this useful?

  • CLI behavior is easier to extend and reason about.
  • Help and version output are handled in one command parser instead of custom branching.
  • The new contract matches the plan: positional files, clearer validation, and no --changed compatibility shim.

V3RON added 9 commits June 16, 2026 09:06
Track imports and re-exports by entity so barrel changes only reach real consumers.
Thread source extensions through resolver context, add file-only candidate probing, and cover the new resolution order with regression tests.
Normalize tsconfig alias targets and workspace package roots before they enter the graph, and cover the relative path behavior with regression tests.
Select impacted tests, append them to a runner command, and exit with the runner status.
Add an opt-in Vitest benchmark that measures Sniffler's core impact pipeline on a synthetic in-memory project, plus a dedicated benchmark script and README entry.
Add concise AGENTS.md rule for performance-sensitive changes and PR benchmark attachment.
Add recursive .DS_Store rules so Finder metadata stays out of the repo.
Replace hand-rolled argument parsing with cac command definitions.
Keep CLI output routed through injected IO and update coverage for positional files.
Adds missing coverage for the run command with --base/--head and updates docs to show positional changed-file arguments.
@V3RON V3RON merged commit 56462ff into master Jun 18, 2026
@V3RON V3RON deleted the refactor/cac-cli branch June 18, 2026 14:30
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.

1 participant