Summary
UtilitiesCS/EmailIntelligence/FolderConverter.cs declares the same fully-qualified static class
name as the live UtilitiesCS/OutlookObjects/Folder/FolderConverter.cs, but it is not compiled:
UtilitiesCS/UtilitiesCS.csproj:1054 includes only the OutlookObjects file. The orphaned copy is
dead code that no build has validated, and it contains two guards that can never be true.
At line 30 it compares a value with itself, olBranchURI.Scheme != olBranchURI.Scheme, which is
always false, so the guard it protects never fires. At line 40 it evaluates
relativePath[0].Equals("."), comparing a char to a string; char.Equals(object) returns false
for a boxed string regardless of content, so that guard is also always false. Neither defect can
affect runtime today because the file is not in the compilation, which is precisely what has allowed
them to persist unnoticed.
The file is also a latent build hazard. Because it declares UtilitiesCS.FolderConverter a second
time, any change that causes it to be auto-included - most plausibly a migration of UtilitiesCS
from the current non-SDK packages.config project format to an SDK-style project, where **/*.cs
is globbed by default - turns it into a CS0101 duplicate-definition error. That failure would
appear during an unrelated migration and would be time-consuming to attribute.
Recommended resolution is deletion. The live implementation at
UtilitiesCS/OutlookObjects/Folder/FolderConverter.cs is the one under active development (it is
the subject of issue #614), and keeping a stale second copy of the same type creates an ongoing risk
that a maintainer or an agent reads or edits the wrong file. If any behavior in the orphaned copy is
judged worth keeping, it should be ported deliberately into the live file with tests rather than
retained as an uncompiled shadow.
Found during the issue #614 defect census and deliberately not absorbed into that fix, because it is
not on the #614 path-representation chain and changes nothing that #614 exercises.
Environment
- OS/version: Windows 11 Pro 10.0.26200; .NET Framework 4.8.1; Visual Studio 18 Community MSBuild.
- Python version: Not applicable; this is C#.
- Command/flags used: Static inspection; confirmed against
msbuild TaskMaster.sln /t:Rebuild /m /p:Configuration=Debug "/p:Platform=Any CPU".
- Data source or fixture: Repository source at commit
c279d40b.
Steps to Reproduce
- Open
UtilitiesCS/EmailIntelligence/FolderConverter.cs and note it declares
UtilitiesCS.FolderConverter.
- Search
UtilitiesCS/UtilitiesCS.csproj for FolderConverter.cs and observe that only
OutlookObjects\Folder\FolderConverter.cs is included (line 1054).
- Inspect line 30 of the orphaned file:
olBranchURI.Scheme != olBranchURI.Scheme.
- Inspect line 40 of the orphaned file:
relativePath[0].Equals(".").
Expected Behavior
The repository contains exactly one definition of UtilitiesCS.FolderConverter, and every C# file
under a project directory is either compiled or absent. Guard conditions compare distinct operands
and use type-compatible comparisons.
Actual Behavior
A second, uncompiled definition of the same type persists with two guards that are unconditionally
false. The project builds today only because the file is excluded from the compilation.
Logs / Screenshots
Impact / Severity
No runtime impact today. The cost is maintainer confusion and a latent CS0101 that would surface
during an SDK-style project migration.
Source
From: docs/features/potential/2026-08-26-orphaned-duplicate-folderconverter-dead-file-with-always-false-guards.md
Summary
UtilitiesCS/EmailIntelligence/FolderConverter.csdeclares the same fully-qualified static classname as the live
UtilitiesCS/OutlookObjects/Folder/FolderConverter.cs, but it is not compiled:UtilitiesCS/UtilitiesCS.csproj:1054includes only theOutlookObjectsfile. The orphaned copy isdead code that no build has validated, and it contains two guards that can never be true.
At line 30 it compares a value with itself,
olBranchURI.Scheme != olBranchURI.Scheme, which isalways false, so the guard it protects never fires. At line 40 it evaluates
relativePath[0].Equals("."), comparing acharto astring;char.Equals(object)returns falsefor a boxed
stringregardless of content, so that guard is also always false. Neither defect canaffect runtime today because the file is not in the compilation, which is precisely what has allowed
them to persist unnoticed.
The file is also a latent build hazard. Because it declares
UtilitiesCS.FolderConvertera secondtime, any change that causes it to be auto-included - most plausibly a migration of
UtilitiesCSfrom the current non-SDK
packages.configproject format to an SDK-style project, where**/*.csis globbed by default - turns it into a
CS0101duplicate-definition error. That failure wouldappear during an unrelated migration and would be time-consuming to attribute.
Recommended resolution is deletion. The live implementation at
UtilitiesCS/OutlookObjects/Folder/FolderConverter.csis the one under active development (it isthe subject of issue #614), and keeping a stale second copy of the same type creates an ongoing risk
that a maintainer or an agent reads or edits the wrong file. If any behavior in the orphaned copy is
judged worth keeping, it should be ported deliberately into the live file with tests rather than
retained as an uncompiled shadow.
Found during the issue #614 defect census and deliberately not absorbed into that fix, because it is
not on the #614 path-representation chain and changes nothing that #614 exercises.
Environment
msbuild TaskMaster.sln /t:Rebuild /m /p:Configuration=Debug "/p:Platform=Any CPU".c279d40b.Steps to Reproduce
UtilitiesCS/EmailIntelligence/FolderConverter.csand note it declaresUtilitiesCS.FolderConverter.UtilitiesCS/UtilitiesCS.csprojforFolderConverter.csand observe that onlyOutlookObjects\Folder\FolderConverter.csis included (line 1054).olBranchURI.Scheme != olBranchURI.Scheme.relativePath[0].Equals(".").Expected Behavior
The repository contains exactly one definition of
UtilitiesCS.FolderConverter, and every C# fileunder a project directory is either compiled or absent. Guard conditions compare distinct operands
and use type-compatible comparisons.
Actual Behavior
A second, uncompiled definition of the same type persists with two guards that are unconditionally
false. The project builds today only because the file is excluded from the compilation.
Logs / Screenshots
the project-file include list.
Impact / Severity
No runtime impact today. The cost is maintainer confusion and a latent
CS0101that would surfaceduring an SDK-style project migration.
Source
From: docs/features/potential/2026-08-26-orphaned-duplicate-folderconverter-dead-file-with-always-false-guards.md