Skip to content

Rename file system path types for v4 - #4260

Merged
thomhurst merged 10 commits into
mainfrom
issue-4212-file-paths
Aug 29, 2026
Merged

Rename file system path types for v4#4260
thomhurst merged 10 commits into
mainfrom
issue-4212-file-paths

Conversation

@thomhurst

@thomhurst thomhurst commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • rename the public File and Folder abstractions to FilePath and FolderPath
  • update core, integration, test, and documentation consumers without changing GetFile/GetFolder member names
  • document the breaking v4 migration and remove obsolete type aliases

Validation

  • ModularPipelines.Tests.slnf Release build
  • Git, DotNet, and GitHub integration solution Release builds
  • Distributed unit-test project Release build
  • 47 focused file-system, temp-folder, extension, and ZIP tests
  • core whitespace formatting

Closes #4212

Summary by CodeRabbit

  • Breaking Changes
    • Renamed file and folder abstractions to FilePath and FolderPath.
    • Updated file, folder, download, archive, Git, and pipeline APIs to use the new path types.
    • Removed legacy File and Folder APIs and platform-specific installer contexts.
    • Renamed pipeline configuration concepts, including FailureMode, ExecutionHint, and PipelineBuilderSettings.
    • Updated command-line configuration and module predicate APIs.
  • Documentation
    • Updated guides and examples to reflect the new path types and submodule behavior.

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2ed5920c-1460-4b1d-887f-20c39aca82e3

📥 Commits

Reviewing files that changed from the base of the PR and between c49dd4f and d3127be.

📒 Files selected for processing (3)
  • RELEASE_NOTES_V4.md
  • src/ModularPipelines/PublicAPI.Shipped.txt
  • src/ModularPipelines/PublicAPI.Unshipped.txt
💤 Files with no reviewable changes (1)
  • src/ModularPipelines/PublicAPI.Shipped.txt

Included review availability: Your plan provides up to 4 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The PR renames the filesystem abstractions to FilePath and FolderPath. It updates APIs, implementations, serialization, build modules, Git and GitHub integrations, tests, documentation, release notes, and public API tracking files.

Changes

FilePath and FolderPath migration

Layer / File(s) Summary
Filesystem path abstractions
src/ModularPipelines/FileSystem/*, src/ModularPipelines/Extensions/*, src/ModularPipelines/Serialization/*
File and Folder become FilePath and FolderPath. Constructors, operations, conversions, equality members, temporary paths, extensions, traversal, and JSON converters use the renamed types.
Production API integrations
src/ModularPipelines/Context/*, src/ModularPipelines.Build/*, src/ModularPipelines.Git/*, src/ModularPipelines.GitHub/*, src/ModularPipelines.DotNet/*
Context contracts and implementations, build modules, Git models, pipeline writer options, downloader and archive operations, and TRX handling use FilePath and FolderPath.
Public API tracking
src/ModularPipelines/PublicAPI.*, src/ModularPipelines.DotNet/PublicAPI.*, src/ModularPipelines.Git/PublicAPI.*, src/ModularPipelines.GitHub/PublicAPI.*
Shipped entries for the old path types are removed. Unshipped entries declare the renamed types and updated members.
Tests and documentation
test/*, docs/*, RELEASE_NOTES_V4.md
Tests, examples, analyzer documentation, and release notes use the renamed path types. Existing test behavior and documented filesystem behavior remain unchanged.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to d3127

The PR renames the public file-system path types to FilePath and FolderPath while updating consumers and migration documentation; no actionable merge-blocking risk remains after normal checks and review.

Poem

A rabbit hops through paths anew
FilePath shines in morning dew
FolderPath guards each nested way
Old names rest beneath the hay
Tests and notes now follow too
The pipeline greets the change with cheer

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Most changes support issue #4212, but src/ModularPipelines/PublicAPI.Unshipped.txt also adds IPredefinedInstallersContext.NvmAsync, which is unrelated to the file system type rename. Remove the unrelated NvmAsync public API entry, or link an issue that explicitly requires this change.
Docstring Coverage ⚠️ Warning Docstring coverage is 20.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 248 functions across 58 files. (2 skipped… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: renaming file system path types for v4.
Linked Issues check ✅ Passed The pull request satisfies issue #4212. It renames File and Folder to FilePath and FolderPath, updates consumers and documentation, retains TempFile and TempFolder, and preserves GetFile and GetFolder…
Full details: Linked Issues check

Explanation

The pull request satisfies issue #4212. It renames File and Folder to FilePath and FolderPath, updates consumers and documentation, retains TempFile and TempFolder, and preserves GetFile and GetFolder member names.

Full details: Docstring Coverage

Explanation

Docstring coverage is 20.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 248 functions across 58 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-4212-file-paths

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Aug 28, 2026

Copy link
Copy Markdown

Greptile Summary

The PR performs the planned v4 rename of the public filesystem abstractions from File and Folder to FilePath and FolderPath.

  • Updates core filesystem, context, extension, serialization, and distributed APIs.
  • Migrates integration packages, build modules, tests, documentation, and public API baselines.
  • Documents the breaking migration while preserving GetFile and GetFolder member names.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
src/ModularPipelines/FileSystem/FilePath.cs Renames the file abstraction while preserving path operations, conversions, equality, and filesystem-provider propagation.
src/ModularPipelines/FileSystem/FolderPath.cs Renames the folder abstraction and consistently updates folder composition, enumeration, and file access APIs.
src/ModularPipelines/Distributed/Serialization/ModuleResultSerializer.cs Updates distributed serialization terminology and retains registration of portable path converters.
src/ModularPipelines/Distributed/Serialization/PortableFilePathJsonConverter.cs Migrates portable file serialization from the removed file type to FilePath.
src/ModularPipelines/Distributed/Serialization/PortableFolderPathJsonConverter.cs Migrates portable folder serialization from the removed folder type to FolderPath.
src/ModularPipelines/PublicAPI.Unshipped.txt Records the renamed path API and the intentional removal of the former public types.
RELEASE_NOTES_V4.md Documents the breaking path-type migration and clarifies that GetFile and GetFolder names remain unchanged.

Reviews (16): Last reviewed commit: "fix(api): record renamed path removals" | Re-trigger Greptile

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

Reviewed the full diff for "Rename file system path types for v4" (HEAD 464b5be6). This is a large, mostly mechanical rename of File/Folder to FilePath/FolderPath across the core library, tool integrations, tests, and docs, done to avoid the System.IO.File namespace collision described in #4212.

Verified:

  • No leftover references to the old ModularPipelines.FileSystem.File/Folder type names remain in src/ or test/ (grepped for using File = ModularPipelines.FileSystem.File and bare qualified references — all clear).
  • GetFile/GetFolder member names on IFilesContext/FolderPath are unchanged, matching the PR's stated intent.
  • The public API surface (implicit operators, equality members, constructors, JSON converters) was renamed consistently across both FilePath and FolderPath.

Issue found

Mechanical rename leaked into a user-facing log message.

src/ModularPipelines/Context/Downloader.cs#L74 — the log message text changed from:

_moduleLoggerProvider.GetLogger().LogInformation("File {Uri} downloaded to {SaveLocation}", options.DownloadUri, filePathToSave);

to:

_moduleLoggerProvider.GetLogger().LogInformation("FilePath {Uri} downloaded to {SaveLocation}", options.DownloadUri, filePathToSave);

Here "File" was the English word in a sentence ("File downloaded to "), not a reference to the type name. The blanket find/replace turned this into log output like FilePath https://example.com/foo.zip downloaded to /tmp/xyz, which reads as broken grammar for every consumer of DownloadFileAsync. Notably, every other Log*Operation message in FilePath.cs/FolderPath.cs (e.g. "Creating File: {Path}", "Moving Folder: ...") was correctly left untouched, since those refer to the file-system concept rather than the type — which shows this is an isolated slip in the rename pass rather than an intentional style change.

Suggested fix: reword the log message so it no longer depends on the type name at all, e.g. "Downloaded {Uri} to {SaveLocation}". That also means the next time this type gets renamed, this log line won't drift into nonsense again.

No other correctness or CLAUDE.md compliance issues found — the rest of the change set is a clean, complete rename.

@thomhurst
thomhurst force-pushed the issue-4212-file-paths branch from 464b5be to 6b37925 Compare August 28, 2026 17:23
@thomhurst

Copy link
Copy Markdown
Owner Author

Addressed the blocking review: restored the download log message to natural wording (Downloaded {Uri} to {SaveLocation}) while keeping the renamed FilePath type. Rebased onto current main. Validation: DownloaderTests passed (15/15).

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

Re-reviewed at HEAD 6b37925bb777df0419a817779aeb50b497d34396, up from the previously-reviewed 464b5be6.

Previous BLOCKING issue is fixed. The Downloader.cs log message ("File {Uri} downloaded to {SaveLocation}" → incorrectly "FilePath {Uri} downloaded...") has been reworded to "Downloaded {Uri} to {SaveLocation}", which sidesteps the type-name collision entirely. Good fix.

I re-read the full current diff (67 files) looking for the same class of mistake — places where the blanket FileFilePath / FolderFolderPath find/replace leaked into English prose rather than an actual type reference — plus checked the core type definitions (FilePath.cs, FolderPath.cs, the JSON/portable converters) for any accidental logic changes hiding inside the rename. The rename is otherwise clean and consistent: no leftover bare File/Folder type references, no stale using File = ModularPipelines.FileSystem.File; aliases, equality/hashing/implicit-operator members and JSON converter logic are byte-identical apart from the type name, and GetFile/GetFolder member names were correctly left untouched.

Issue found

Doc comment leak, same class as the already-fixed Downloader.cs issue.

/// <summary>
/// FilePath checksum operations.
/// </summary>

    /// <summary>
    /// FilePath checksum operations.
    /// </summary>
    IChecksumContext Checksum { get; }

IChecksumContext computes a checksum of a file's contents — "File" here was the English word in "File checksum operations" (i.e. checksumming a file), not a reference to the File/FilePath type, the same way "File {Uri} downloaded..." wasn't a type reference in the previous round. The blanket rename turned this into "FilePath checksum operations", which reads as checksumming a path object rather than file contents — incorrect and slightly confusing in the public API docs.

Suggested fix: revert this doc comment to /// File checksum operations. (or reword to avoid the ambiguity entirely, e.g. /// Operations for computing file checksums.).

No other correctness issues found. Build of ModularPipelines.slnx (core) succeeds with 0 warnings/errors under TreatWarningsAsErrors.

@thomhurst

Copy link
Copy Markdown
Owner Author

Addressed the current blocking review in 1ab56de386: the public XML summary now says “Operations for computing file checksums,” avoiding the mechanical type-rename leak and accurately describing content checksums. Validation: ModularPipelines.slnx Release build succeeded with 0 warnings/errors.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

Re-reviewed at HEAD 1ab56de3865c0577ac0e6df1426f622baf730ff9. This continues the File/FolderFilePath/FolderPath rename (v4, ref #4212).

Both previous BLOCKING issues are confirmed fixed:

  • Downloader.cs:74 log message is "Downloaded {Uri} to {SaveLocation}" — no longer leaks the type name into the sentence.
  • IFilesContext.cs:57 doc comment now reads /// Operations for computing file checksums. — no longer reads as "FilePath checksum operations."

I ran 8 parallel review passes across the diff (line-by-line read of all ~3168 diff lines plus a full build of ModularPipelines.slnx/ModularPipelines.Tests.slnf/the Git tool solution, a removed-behavior audit, a cross-file consumer/interface-consistency trace, and dedicated reuse/simplification/efficiency/altitude/CLAUDE.md-conventions passes). The rename is otherwise clean, complete, and consistent: no leftover ModularPipelines.FileSystem.File/Folder references anywhere in src//test/, no stale using File = ModularPipelines.FileSystem.File; aliases, no swapped FileFolder identifiers, and all interface/implementation/JSON-converter/test-consumer pairs stay in sync.

New (minor) finding

Test files weren't renamed alongside the production types they test.

The production rename moved File.csFilePath.cs and Folder.csFolderPath.cs (proper git renames, tracked). But the matching test files kept their old names even though their content now exercises the renamed types:

  • test/ModularPipelines.UnitTests/FileSystem/FileTests.cs (tests FilePath)
  • test/ModularPipelines.UnitTests/FileSystem/FileProviderTests.cs
  • test/ModularPipelines.UnitTests/FileSystem/FolderTests.cs (tests FolderPath)
  • test/ModularPipelines.UnitTests/FileSystem/FolderProviderTests.cs
  • test/ModularPipelines.UnitTests/Extensions/FileExtensionsTests.cs

This breaks the filename symmetry the rest of the codebase relies on for navigating from a type to its tests — "find the tests for FilePath.cs" no longer resolves to FilePathTests.cs the way it does for every other type in this PR (e.g. TempFile.cs/TempFolder.cs kept their names because they weren't renamed, but every renamed production file should have its test file renamed too for the pattern to hold). Suggest renaming these five files (FileTests.csFilePathTests.cs, FileProviderTests.csFilePathProviderTests.cs, FolderTests.csFolderPathTests.cs, FolderProviderTests.csFolderPathProviderTests.cs, FileExtensionsTests.csFilePathExtensionsTests.cs) to close out the rename consistently — trivial to do and cheap to review since it's a pure git mv.

Cosmetic-only, not blocking on its own

test/ModularPipelines.Distributed.UnitTests/Serialization/PortablePathConverterTests.cs — the placeholder example path "src/MyProject/File.cs" got swept up in the blanket rename and became "src/MyProject/FilePath.cs" in three test cases. It's arbitrary test fixture data unrelated to the real FilePath type, so renaming it is harmless, but it's worth knowing this wasn't a deliberate choice — a future reader could mistake it for a reference to the real type. Not worth a separate fix if the file-renaming above is done in the same pass.

No correctness, design, or CLAUDE.md-compliance issues found beyond the above.

@thomhurst

Copy link
Copy Markdown
Owner Author

Rebased onto current main at 2f543a2; preserved both conflicting V4 release-note sections. Validation: Release core build 0 warnings/errors; FileTests 31/31; FolderTests 26/26.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

Re-reviewed at HEAD 2f543a21ca366945358d3c40a0017c3d0173ca66, which is a rebase onto current main (per the author's note: "Rebased onto current main at 2f543a2; preserved both conflicting V4 release-note sections"). I diffed the previously-reviewed commit (1ab56de386) against this HEAD directly to isolate what changed versus what's just base-branch churn from the rebase, and confirmed RELEASE_NOTES_V4.md ends up with a single, non-duplicated "File-system path types" section — the rebase did not introduce a merge-artifact duplication.

Both prior BLOCKING issues remain fixed:

  • Downloader.cs log message wording.
  • IFilesContext.cs checksum doc comment wording.

The prior BLOCKING finding about test file naming is still not addressed.

The production rename moved File.csFilePath.cs and Folder.csFolderPath.cs as proper git renames, but the matching test files were not renamed to match, even though their content exercises the renamed types (confirmed unchanged in this HEAD — e.g. test/ModularPipelines.UnitTests/FileSystem/FileTests.cs still constructs new FilePath(...) under the old filename):

  • test/ModularPipelines.UnitTests/FileSystem/FileTests.cs (tests FilePath)
  • test/ModularPipelines.UnitTests/FileSystem/FileProviderTests.cs
  • test/ModularPipelines.UnitTests/FileSystem/FolderTests.cs (tests FolderPath)
  • test/ModularPipelines.UnitTests/FileSystem/FolderProviderTests.cs
  • test/ModularPipelines.UnitTests/Extensions/FileExtensionsTests.cs

This is a maintainability/naming-convention issue rather than a runtime bug: the rest of the codebase relies on the convention that a type's test file shares its name (e.g. TempFolder.csTempFolderTests.cs), and this PR is the one place in the diff where that convention breaks — a future contributor searching for "the tests for FilePath.cs" won't find FilePathTests.cs. Since this PR already does a full mechanical rename pass (types, docs, JSON converters, log messages), leaving the test file names as the sole exception is inconsistent with the PR's own stated goal of a complete rename. Suggested fix, unchanged from the last round: git mv the five files to FilePathTests.cs, FilePathProviderTests.cs, FolderPathTests.cs, FolderPathProviderTests.cs, and FilePathExtensionsTests.cs. This is a trivial, low-risk, purely-mechanical follow-up (no code changes required beyond the git mv), so there's no reason to leave it as an exception to an otherwise complete rename.

No new correctness, design, or CLAUDE.md-compliance issues found in the rebase itself — the only outstanding item is the carry-over test-naming inconsistency above.

@thomhurst

Copy link
Copy Markdown
Owner Author

Addressed the remaining blocking Claude finding in 3805d34: renamed the five test files to FilePathTests.cs, FilePathProviderTests.cs, FolderPathTests.cs, FolderPathProviderTests.cs, and FilePathExtensionsTests.cs as content-identical git renames. Validation: FileTests pass 31/31. @claude please re-review the current head and update the verdict.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

Re-reviewed at HEAD 3805d343423836cd259a2dd5f9552d95bcd19962, up from the previously-reviewed 2f543a21ca36.

The prior BLOCKING finding is now fixed. The five test files have been git mv'd to match the renamed production types, confirmed as pure 100%-similarity renames (no content changes):

  • FileTests.csFilePathTests.cs
  • FileProviderTests.csFilePathProviderTests.cs
  • FolderTests.csFolderPathTests.cs
  • FolderProviderTests.csFolderPathProviderTests.cs
  • FileExtensionsTests.csFilePathExtensionsTests.cs

This is the only change since the last-reviewed commit, so it closes out the naming-convention inconsistency without touching any other code.

All previously-flagged BLOCKING issues (the Downloader.cs log message, the IFilesContext.cs checksum doc comment, and this test-naming inconsistency) are now resolved. No new correctness, design, or CLAUDE.md-compliance issues found in this diff.

@thomhurst
thomhurst force-pushed the issue-4212-file-paths branch from 3805d34 to 2cdea71 Compare August 28, 2026 20:12
@thomhurst

Copy link
Copy Markdown
Owner Author

Rebased onto current main after #4266. Resolved the two converter conflicts by preserving #4266 internal visibility while applying this PR's FilePath/FolderPath generic targets. Validation: ModularPipelines.slnx Release build 0 warnings/errors; FileTests 31/31; PublicSurfaceLeakageTests 3/3; git diff --check passed. @claude please re-review current head 2cdea71.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

Re-reviewed at HEAD 2cdea7172191e344f651b285b6821726eecc60ab, which is a rebase of the previously-CLEARed 3805d343423836 onto current main after #4266 ("Reduce leaked core API surface"), per the author's note: "Rebased onto current main after #4266. Resolved the two converter conflicts by preserving #4266 internal visibility while applying this PR's FilePath/FolderPath generic targets."

All three prior BLOCKING findings remain fixed (confirmed unchanged in this diff):

  • Downloader.cs log message: "Downloaded {Uri} to {SaveLocation}".
  • IFilesContext.cs checksum doc comment: "Operations for computing file checksums.".
  • Test files renamed to match production types (FilePathTests.cs, FilePathProviderTests.cs, FolderPathTests.cs, FolderPathProviderTests.cs, FilePathExtensionsTests.cs).

Rebase conflict resolution verified. I diffed the merge base (79802137, i.e. #4266) against this HEAD to isolate exactly what #4266 touching the same files as this PR (the four JSON converters: PortableFilePathJsonConverter, PortableFolderPathJsonConverter, FilePathJsonConverter, FolderPathJsonConverter) resolved to. All four correctly combine both changes: internal visibility from #4266 is preserved, and the type/using changes from this PR (File/FolderFilePath/FolderPath, dropping the using File = ModularPipelines.FileSystem.File; alias in favor of a plain using ModularPipelines.FileSystem;) are applied consistently. RELEASE_NOTES_V4.md also resolves to a single non-duplicated "File-system path types" section rather than a merge-artifact duplicate.

Full diff re-checked for the same class of issue that caused the earlier BLOCKING rounds (mechanical FileFilePath/FolderFolderPath find/replace leaking into English prose rather than an actual type reference). Nothing new found — the diff is unchanged from the last CLEAR review except for the #4266 rebase mechanics above. One message worth explicitly confirming as not a regression of that pattern: FileExtensions.AssertExists now throws "FilePath reference is null{...}" (was "File reference is null{...}"). This reads correctly here — it's describing a null reference of the FilePath type, not the English word "file" — so it's the correct kind of rename, unlike the two that were previously flagged and fixed.

Also confirmed: no leftover ModularPipelines.FileSystem.File/Folder references anywhere in src//test/, and ModularPipelines.slnx (core) builds Release with 0 warnings/errors at this HEAD.

No correctness, design, or CLAUDE.md-compliance issues found. This PR is in a mergeable state.

@thomhurst

Copy link
Copy Markdown
Owner Author

Rebased onto current main to replace the stale Linux run. The prior Ubuntu failure was isolated to the timing-sensitive RunReportTests.DistributedMasterReconcilesMatchedMetricsPerWorker; the path-change reviews and other checks were clear.

Rebase validation:

  • CI-gated core build: 33 warnings, 0 errors
  • public API baseline tests: passed; 61 package baselines verified
  • FileTests: 31/31
  • FolderTests: 26/26
  • PublicSurfaceLeakageTests: 3/3
  • prior flaky RunReportTests case: 1/1 locally

The rebased branch also reconciles the API baselines with the generated-metadata namespace quarantine now on main.

@thomhurst

Copy link
Copy Markdown
Owner Author

Fixed the post-#4251 CI failures in cd2d63e by updating all eight stale integration baseline references: DotNet File→FilePath, Git Folder→FolderPath, and GitHub File→FilePath. Validation under the exact CI analyzer gate: DotNet solution 0 errors (33 RS0026 advisories), Git solution 0 warnings/errors, GitHub solution 0 errors (3 existing test nullability warnings); no old FileSystem.File/Folder baseline references remain. @claude please re-review current head cd2d63e.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of #4260 (head cd2d63eb36c75c4b191517eae5f8114e13ac2365)

This is a large, almost entirely mechanical rename (FileFilePath, FolderFolderPath). I traced usages across the whole repo (all tool-integration packages, Examples, docs, PublicAPI baselines) and the mechanical part of the rename is clean — no leftover bare references, no broken call sites, no tool package silently left on the old type. Two things flagged in earlier review rounds (the Downloader.cs log-wording revert and the Checksum XML-doc fix) are already addressed on this head, confirmed by the corresponding thomhurst comments and by reading the current file content.

Three issues remain, though, all introduced by this PR's own commits:

1. Test-file rename pass left the class names (and one sibling file) behind — test/ModularPipelines.UnitTests/FileSystem/

Commit "align path test filenames" renamed the files but not the types inside them, and missed one file entirely:

  • FilePathTests.cs still declares public class FileTests
  • FolderPathTests.cs still declares class FolderTests
  • FilePathProviderTests.cs still declares class FileProviderTests
  • FolderPathProviderTests.cs still declares class FolderProviderTests
  • FilePathExtensionsTests.cs still declares class FileExtensionsTests
  • test/ModularPipelines.UnitTests/Extensions/FolderExtensionsTests.cs — the structurally identical sibling of FilePathExtensionsTests.cs — wasn't renamed at all

Filename/type-name mismatch defeats "go to definition"/"find by type name" workflows and test-explorer grouping, and the asymmetry between the File-side and Folder-side extension test files means whoever copies one as a template for the other will propagate the inconsistency. Since this is purely mechanical, a global rename of the five class declarations plus a git mv for FolderExtensionsTests.csFolderPathExtensionsTests.cs (with its class FolderExtensionsTestsFolderPathExtensionsTests) closes this out completely — no behavior to reason about, just finish the rename that was started.

2. Unrelated public-API change riding along in src/ModularPipelines/Generated/GeneratedCommandMetadata.cs

-        bool isComplete = true)
+        bool isComplete)

on Register(Type optionsType, IReadOnlyList<PropertyCommandLinePart> model, bool isComplete). No File/Folder type appears anywhere in this method's signature, so this isn't part of the rename — it's a separate, source-breaking public API edit (dropping a default parameter value) that happens to be sitting in the same commit as the baseline reconciliation for the rename. PublicAPI.Unshipped.txt was updated to match, so the analyzer won't catch it, but a reviewer scanning this as a "pure rename" PR would not expect to find an unrelated API-surface change here. Worth splitting into its own commit/PR with its own justification, or reverting if it wasn't intentional — bundling makes it too easy to wave through unreviewed.

3. Inconsistent PublicAPI baseline reconciliation between packages

For src/ModularPipelines, renamed symbols were correctly removed from PublicAPI.Shipped.txt and re-added to PublicAPI.Unshipped.txt (signaling "this shape hasn't shipped yet"). For src/ModularPipelines.Git, .DotNet, and .GitHub, the same renames (e.g. GitRepositoryInfo.Root.get -> ModularPipelines.FileSystem.Folder!...FolderPath!) were instead edited directly in place inside PublicAPI.Shipped.txt. That falsely asserts the new signature already shipped in a prior release of those packages. It doesn't fail the analyzer (which only diffs against current symbols), but it defeats the entire point of the Shipped/Unshipped split — namely, giving reviewers and consumers an accurate record of what changed since the last release for a breaking-change gate. Recommend applying the same Shipped→Unshipped move used for the core package to the Git/DotNet/GitHub baselines for consistency.


Minor, non-blocking: test/ModularPipelines.Distributed.UnitTests/Serialization/PortablePathConverterTests.cs renamed an arbitrary sample filename used purely as test fixture data ("src/MyProject/File.cs""...FilePath.cs") on both sides of the assertion. It's self-consistent so nothing breaks, but it's a sign the rename was done via blind text substitution rather than being type-aware — worth a quick check that no other literal strings were altered without reason.

@thomhurst

Copy link
Copy Markdown
Owner Author

Fixed the changed-file analyzer lane: FilePath.cs and FolderPath.cs now narrowly suppress pre-existing RS0026 overload warnings that became in-scope only because the files/types were renamed. Exact CI dotnet-format analyzer verification for both files passes. @claude please review the latest head.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

This is a mechanical rename PR (File/FolderFilePath/FolderPath for v4), and the vast majority of it is clean and consistent — PublicAPI.Shipped.txt/Unshipped.txt reconciliation across core, DotNet, Git, and GitHub packages is complete and correctly paired, docs were updated, and the FolderPath/FilePath implicit string conversions keep dependent call sites (e.g. IEnvironmentContext.WorkingDirectory) compiling without changes.

Blocking

test/ModularPipelines.UnitTests/Helpers/FileInstallerTests.cs:9,18 — leftover reference to the removed ModularPipelines.FileSystem.File type:

using File = ModularPipelines.FileSystem.File;
...
var downloadedFile = new File("downloaded-installer");

ModularPipelines.FileSystem.File was renamed to FilePath by this PR (see f198dfed refactor(files)!: rename path types), and every other identical alias site (e.g. src/ModularPipelines.Build/Helpers/NugetUploadHelper.cs) was updated to using ModularPipelines.FileSystem; + FilePath. This file was never touched by the rename commits — git log --follow on it only shows the earlier #4276 PR — so it still references a type that no longer exists anywhere in the repo. This will fail ModularPipelines.UnitTests compilation with CS0246 ("The type or namespace name 'File' could not be found"). Fix: change the alias to FilePath (or drop the alias and use ModularPipelines.FileSystem.FilePath directly) and update the constructor call to new FilePath("downloaded-installer").

Non-blocking suggestions

  • src/ModularPipelines/FileSystem/FilePath.cs (~lines 110, 158, 160, 174, 298, 326, 351, 382) and FolderPath.cs (~lines 321, 394, 452, 494): six separate #pragma warning disable RS0026 / restore pairs were added, each with a slightly different hand-written comment, all suppressing the same underlying reason (the v4 rename intentionally preserves overloads that would otherwise look ambiguous to the analyzer). Consider consolidating into a single suppression per file, or a GlobalSuppressions.cs/.editorconfig scoped severity override targeting FilePath/FolderPath — mirroring the existing single-pair precedent in src/ModularPipelines/Context/IModuleContext.cs:191-208. A single suppression with one rationale is easier to keep correct than six near-duplicate comments that a future editor has to re-verify all mean the same thing.
  • src/ModularPipelines/Context/Downloader.cs:74: the log message wording changed from "File {Uri} downloaded to {SaveLocation}" to "Downloaded {Uri} to {SaveLocation}". This is an unrelated cosmetic change riding along in a rename PR — not load-bearing (no test or known log-scraper asserts on the old text), but worth calling out or splitting into a separate commit if any external tooling scrapes these logs.
  • PR description says it "remove[s] obsolete type aliases" — no [Obsolete]-attributed File/Folder compatibility shim was actually found in history; this line in the description doesn't correspond to any code being deleted. Minor description-accuracy nit only.

@thomhurst

Copy link
Copy Markdown
Owner Author

@claude review

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

Re-reviewed at HEAD ad5f570d4d240cdbb9a6595c2a48483ed0a6cb45, the diff since the last-reviewed d3127beb3dc962a2366276127c783c5fed664496 (single commit: test(files): use renamed file path type).

The prior BLOCKING issue is fixed. test/ModularPipelines.UnitTests/Helpers/FileInstallerTests.cs no longer aliases the removed ModularPipelines.FileSystem.File type — it now does using ModularPipelines.FileSystem; and constructs new FilePath("downloaded-installer"), matching the exact pattern used at the other identical alias site (src/ModularPipelines.Build/Helpers/NugetUploadHelper.cs). A repo-wide search confirms no remaining references to the removed FileSystem.File/FileSystem.Folder types.

No new issues introduced by this follow-up commit. This is a minimal, correctly-scoped fix — nothing further to flag.

@thomhurst

Copy link
Copy Markdown
Owner Author

Rebased onto current main after #4268 merged, preserving both release-note sections. Validation: core, DotNet, Git, and GitHub Release solution builds pass (GitHub retains 3 existing warnings); 68 focused tests pass; all 61 PublicAPI baseline pairs and assertion harness pass.

@thomhurst
thomhurst force-pushed the issue-4212-file-paths branch from ad5f570 to 5308aaa Compare August 29, 2026 00:39

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

Re-reviewed at HEAD 5308aaaf424fef8f73ea861f008958271c29c217, up from the previously-CLEARed ad5f570d4d240cdbb9a6595c2a48483ed0a6cb45.

The branch was rebased onto current main (which since picked up #4268's ModuleResult metadata rename) between the two reviews, so the commit hashes diverged, but the content of the sole new commit (test(files): use renamed file path type) is byte-identical to what was already reviewed and cleared — confirmed with a direct diff of the two commits.

I isolated the actual PR diff against the current merge-base with main (73 files, matching the PR description) to exclude unrelated base-branch churn, and re-verified the full scope:

  • No leftover bare references to the old File/Folder types anywhere in src/ or test/ (GetFile/GetFolder member names are correctly preserved per the design).
  • The two previously-fixed BLOCKING issues remain fixed: Downloader.cs logs "Downloaded {Uri} to {SaveLocation}" (no type-name leak), and IFilesContext.Checksum still documents "computing file checksums" (not "FilePath checksums").
  • PublicAPI.Shipped.txt/Unshipped.txt are correctly paired across the core, DotNet, Git, and GitHub packages — every removed old-type signature has a matching new-type signature added to Unshipped, and nothing outside the File/Folder surface was touched.
  • RELEASE_NOTES_V4.md has a single, non-duplicated "File-system path types" section.
  • Files that overlap with #4268 (e.g. ModuleResultSerializer.cs, GitInformation.cs, GitVersioning.cs) rebased cleanly — no conflict markers, no stale references.

No new issues. This PR is ready as-is.

@thomhurst

Copy link
Copy Markdown
Owner Author

Rebased onto current main through #4279/#4281. ZIP conflicts retain current CreateFromDirectory/ExtractToDirectory names with the renamed FilePath/FolderPath types; obsolete IFilesContext.Checksum stayed removed. Public API history now records all 121 shipped path removals and replaces four superseded unshipped ZIP declarations. Validation: ModularPipelines.Tests.slnf Release build succeeded (178 existing warnings, 0 errors); CI-conditioned core API build succeeded (6 advisory warnings, 0 errors); DotNet and Git solutions built with 0 warnings/errors; GitHub solution built with 3 existing warnings, 0 errors; 122 focused file/folder/ZIP/hash tests passed; 61 API baseline pairs passed; git diff --check passed.

@thomhurst
thomhurst force-pushed the issue-4212-file-paths branch from f48ec28 to c0c7b31 Compare August 29, 2026 01:44
@thomhurst

Copy link
Copy Markdown
Owner Author

Rebased again after #4274 merged. Logging conflicts retain the new IModuleLoggerAccessor contracts while applying FolderPath construction and the generic Downloaded message. Validation on exact head: CI-conditioned core API build succeeded (6 advisory warnings, 0 errors); ModularPipelines.Tests.slnf Release build succeeded (178 existing warnings, 0 errors); DotNet/Git builds 0 warnings/errors; GitHub build 3 existing warnings, 0 errors; 42 focused ZIP/hash/downloader/logger/GitVersioning tests passed; 61 API baseline pairs passed; git diff --check passed.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

Re-reviewed at HEAD c0c7b3109c04a7cfac263d43a12eee0d19bd6b92, up from the previously-CLEARed 5308aaaf424fef8f73ea861f008958271c29c217.

All prior BLOCKING/minor findings from earlier rounds remain fixed:

  • Downloader.cs still logs "Downloaded {Uri} to {SaveLocation}" (no type-name leak into the log sentence).
  • The IFilesContext.Checksum doc-comment leak is moot — IChecksumContext itself was removed from main by an unrelated, already-merged PR (IHashContext supersedes it) before this branch rebased on top of it.
  • The five test files (FileTests.cs, FileProviderTests.cs, FolderTests.cs, FolderProviderTests.cs, FileExtensionsTests.cs) were properly git mv'd to their FilePath/FolderPath names.

What changed since the last CLEAR: the branch rebased onto a newer main that had merged unrelated work (a IZipContext method un-rename, IHasherContextIHashContext, IModuleLoggerProviderIModuleLoggerAccessor, PowerShell casing fixes). I isolated the actual diff of this PR (73 files, matching the PR description) against its current merge-base to separate this from base-branch churn — the only genuine new commit is fix(api): record renamed path removals, which only touches src/ModularPipelines/PublicAPI.Unshipped.txt to reconcile *REMOVED* entries for the old File/Folder surface after the rebase.

I verified that reconciliation directly:

  • All 121 *REMOVED* entries in the core PublicAPI.Unshipped.txt reference only the old FileSystem.File/FileSystem.Folder types (no unrelated removals slipped in), and every one has a matching FilePath/FolderPath entry added elsewhere in the file.
  • ModularPipelines.Git/ModularPipelines.DotNet/ModularPipelines.GitHub took a different but equally valid approach (deleting the old signature from Shipped.txt outright rather than recording a *REMOVED* marker in Unshipped.txt). To confirm this doesn't break the public API gate, I built all three affected tool solutions plus the core library locally with -p:EnableCiAnalyzers=true (mirroring the dedicated analyzer CI job) — all four build clean with RS0016/RS0017 enforced as errors, confirming the baseline files are consistent with the actual compiled surface.

No new issues found. This PR is ready as-is.

@thomhurst
thomhurst merged commit 970652e into main Aug 29, 2026
16 checks passed
@thomhurst
thomhurst deleted the issue-4212-file-paths branch August 29, 2026 02:15
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.

v4: rename File/Folder to FilePath/FolderPath — they collide with System.IO.File under implicit usings

1 participant