Skip to content

fix: missing template source files are hidden at Debug log level and reported as already up to date #245

Description

@credfeto

Found by AI full-repo code analysis (bugs and performance sweep of non-test projects).

Problem

src/Credfeto.DotNet.Repo.Tools.TemplateUpdate/Services/FileUpdater.cs:206-211OnSourceMissing returns Difference.SOURCE_MISSING, which UpdateFileAsync folds into the same arm as "already up to date" (Information), while the real cause is only logged at Debug (FileUpdaterLoggingExtensions, EventId 7). ValidateConfigPaths validates containment but never existence, so a typo in general.files/github.files/dotnet.files (or the mirror-folder failure in #235) is invisible at normal log levels and even mislabelled as "up to date".

Failure scenario

Config entry "CONTRIBUTING.md": "Docs" where the template file was renamed/removed: the file never syncs to any repo, and the run output shows only "already up to date" lines.

Suggested fix

Log LogSourceMissing at Warning (matching LogMissingPartialFileInTemplate, which is Error), and do not route SOURCE_MISSING through the up-to-date reporting arm.

Scope

  • src/Credfeto.DotNet.Repo.Tools.TemplateUpdate/Services/FileUpdater.cs
  • src/Credfeto.DotNet.Repo.Tools.TemplateUpdate/Services/LoggingExtensions/FileUpdaterLoggingExtensions.cs

Related: #235.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions