Expand ktsu.Semantics.Paths usage across services (#14)#34
Merged
Conversation
Migrate public service entry points off raw string paths to AbsoluteDirectoryPath / AbsoluteFilePath, with conversion at the Spectre command boundary: - MarkdownService.CleanAsync / LintAsync - RepoService.DiscoverRepositoriesAsync / BuildAndTestAsync / PullAllAsync / UpdatePackagesAsync - PackagesService.UpdateAsync (overloads for dir + single csproj) - PackagesService.MigrateToCpmAsync - SvnMigrateService.MigrateAsync (target dir + optional authors file) - ImageService.ProcessAsync (input + output dirs) - SyncService.RunAsync (root path) Each affected csproj now references ktsu.Semantics.Paths, and each command translates its string CommandSettings field via AbsoluteDirectoryPath.Create / AbsoluteFilePath.Create. RepoServiceTests updated for the new signature. https://claude.ai/code/session_015z5JX7CrrvNdfjWDZNV3Hy
|
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.



Summary
Closes #14. Public service entry points across the codebase now accept
AbsoluteDirectoryPath/AbsoluteFilePathfromktsu.Semantics.Pathsinstead of rawstring, with conversion handled at the Spectre command boundary (mirroring the pattern already used byMergeCommand/CodeGenCommand/ExplorerCommand).Service signatures migrated
MarkdownService.CleanAsync/LintAsync—AbsoluteDirectoryPathRepoService.DiscoverRepositoriesAsync/BuildAndTestAsync/PullAllAsync/UpdatePackagesAsync—AbsoluteDirectoryPathPackagesService.UpdateAsync— overloads forAbsoluteDirectoryPathandAbsoluteFilePath(single.csproj)PackagesService.MigrateToCpmAsync—AbsoluteDirectoryPathSvnMigrateService.MigrateAsync—AbsoluteDirectoryPathtarget + optionalAbsoluteFilePathauthors fileImageService.ProcessAsync—AbsoluteDirectoryPathfor input + outputSyncService.RunAsync—AbsoluteDirectoryPath(was the only remainingstringentry point in the project the issue called out)Command boundary
Each corresponding
*Command.cscallsAbsoluteDirectoryPath.Create<...>(Path.GetFullPath(settings.Path))(orAbsoluteFilePath.Create<...>(...)) once before delegating to the service.PackagesUpdateCommandchooses the file vs. directory overload based onFile.Existsto preserve current behaviour where the user can pass a single.csproj.csproj
Added
ktsu.Semantics.Pathspackage reference toKtsuTools.Markdown,KtsuTools.Repo,KtsuTools.Packages,KtsuTools.SvnMigrate, andKtsuTools.Image.Tests
Updated
RepoServiceTestsfor the newDiscoverRepositoriesAsync(AbsoluteDirectoryPath)signature. Other test files (MergeServiceTests,SyncServiceTests,CodeGenServiceTests,ImageServiceTests,MarkdownLintTests,SmokeTests) either already used the strong-path types or do not exercise the changed entry points.Out of scope (per issue)
Path.GetFileName/Path.Combinecalls that operate onstringresults fromDirectory.EnumerateFilesetc. are kept — the issue explicitly excludes those.Test plan
ktsu markdown clean,ktsu repo discover,ktsu packages update,ktsu svn-migrate,ktsu image process,ktsu sync) accepts a relative path and works end-to-endhttps://claude.ai/code/session_015z5JX7CrrvNdfjWDZNV3Hy
Generated by Claude Code