Close #7, #35, #37: dedup command, parallel repo build, merge --diff-style#40
Merged
Merged
Conversation
Closes #35. RepoService.BuildAndTestAsync now actually runs solutions in parallel when the flag is set (Parallel.ForEachAsync with DOP = ProcessorCount/2, since dotnet build already multithreads internally), serialises console writes behind a lock, and aggregates failures into a named summary instead of just a count.
Closes #37. Introduces a DiffStyle enum plumbed through MergeService.RunMergeAsync, with a git/unified renderer backed by DiffPlex's InlineDiffBuilder alongside the existing side-by-side renderer (both capped at 50 lines). DiffStyleParser centralises the string<->enum mapping shared by MergeCommand, MergeBatchSaveCommand and the persisted batch JSON. Unknown values are rejected at the Spectre validation layer.
Closes #7. Adds KtsuTools.FileDedupe with a SHA256-based parallel scan and a "shortest filename wins" tie-breaker, exposed as four subcommands: ktsu dedup scan - display duplicate groups ktsu dedup dry-run - preview which files would be deleted ktsu dedup dedupe - delete redundant files (y/N prompt; -y to skip) ktsu dedup stats - totals, wasted bytes, breakdown by extension
|
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.



Three independent, non-conflicting issues from the open backlog, each in its own commit.
Summary
repo build --parallelis now real.RepoService.BuildAndTestAsyncwas discarding the flag (_ = parallel;). It now usesParallel.ForEachAsyncwithMaxDegreeOfParallelism = ProcessorCount/2(dotnet build is already multithreaded — going wider thrashes), serialises Spectre console writes behind a lock, and aggregates failed solution names into the summary instead of just emitting a count.ktsu merge --diff-style {side-by-side|git}. Adds aDiffStyleenum plumbed throughMergeService.RunMergeAsync. The git/unified renderer uses DiffPlex'sInlineDiffBuilder; the existing side-by-side renderer stays the default. A sharedDiffStyleParserhandles the string↔enum mapping for the flag, themerge-batch save --diff-styleflag, and the persisted batch JSON. Unknown values are rejected at the Spectre validation layer.ktsu dedupbranch. NewKtsuTools.FileDedupeproject plus four subcommands (scan,dry-run,dedupe,stats). SHA256-based parallel scan; "shortest filename wins" tie-breaker;dedupeprompts y/N by default (-y/--yesto skip).Test plan
ktsu.AppDataStorage↔ktsu.Semantics.Pathsversion pin — pre-existing onmain)RepoServiceTests.BuildAndTestAsyncParallelAggregatesExitCodespassesRepoServiceTests.BuildAndTestAsyncParallelIsFasterThanSequentialpassesMergeServiceTestsdiff-style parser tests passFileDedupeServiceTests(4 tests) passktools dedup scan --path <dir-with-dupes>and confirm the shortest-name file is the keeperCloses #7, #35, #37.
Generated by Claude Code