Skip to content

fix(UtilitiesCS.Test): remove duplicate PercentageFormatterTests compile entry (CS2002) - #533

Merged
drmoisan merged 4 commits into
epic/build-ci-coverage-gate-fidelity-integrationfrom
bug/utilitiescs-test-cs2002-duplicate-compile-entry-394
Aug 11, 2026
Merged

fix(UtilitiesCS.Test): remove duplicate PercentageFormatterTests compile entry (CS2002)#533
drmoisan merged 4 commits into
epic/build-ci-coverage-gate-fidelity-integrationfrom
bug/utilitiescs-test-cs2002-duplicate-compile-entry-394

Conversation

@drmoisan

Copy link
Copy Markdown
Owner

fix(UtilitiesCS.Test): remove duplicate PercentageFormatterTests compile entry (CS2002)

Summary

  • Deletes one duplicated <Compile Include="OutlookObjects\Folder\PercentageFormatterTests.cs" /> item from UtilitiesCS.Test/UtilitiesCS.Test.csproj, eliminating the warning CS2002: Source file ... specified multiple times emitted on every build of that project.
  • Single-line deletion, zero insertions, no reordering. Zero .cs files touched, so there is no behavior change and no changed-line coverage surface.
  • Fail-before / pass-after proven with the identical /t:Rebuild command: 6 warnings before, 5 after, with CS2002 present then absent.
  • PercentageFormatterTests test count is unchanged at 7 passing, before and after.
  • Wave 0 child of the build-ci-coverage-gate-fidelity epic. Base is the epic integration branch, not main.

Why

UtilitiesCS.Test.csproj listed the same source file twice, at line 304 and line 356. The two lines were byte-identical. MSBuild passes both to csc, which reports CS2002 and compiles the file once. The warning is therefore harmless at runtime but permanently noisy, and it is the kind of residual warning that erodes the signal value of a build log — directly relevant to this epic's build/CI gate fidelity objective.

A duplicate sweep across every item type in the project file (Compile, EmbeddedResource, None, Reference, ProjectReference, BootstrapperPackage, Analyzer, AdditionalFiles) plus every <package> entry in packages.config found exactly one duplicate — the one fixed here — and zero duplicates anywhere else.

What Changed

Production (1 file)

  • UtilitiesCS.Test/UtilitiesCS.Test.csproj — deleted the second occurrence at line 356, retained line 304. Total <Compile Include= count 452 → 451. CRLF line endings preserved; no reformatting.

Docs and evidence (this feature folder only)

  • spec.md, issue.md, plan.2026-08-10T14-09.md — acceptance-criteria and task check-offs; three figures in spec.md's duplicate-sweep table corrected to match the captured evidence (Analyzer 9 → 11, Reference ~114 → 126, packages.config ~99 → 105). The table's "no duplicates" conclusion is unchanged.
  • evidence/** — baseline, regression-testing, and QA-gate artifacts, each recording Timestamp:, Command:, EXIT_CODE:, Output Summary:.
  • policy-audit.*, code-review.*, feature-audit.* at both the entry (2026-08-10T23-45) and exit (2026-08-11T04-05) timestamps, plus remediation-inputs.* and remediation-plan.* for cycle 1.

Other (1 file)

  • .claude/agent-memory/feature-review/project_durable-feature-script-triggers-python-coverage-gate.md — a two-line memory-index append written by the review subagent during this feature's own audit. No production surface.

Architecture / How It Fits Together

No architectural change. This is a build-configuration edit inside one test project's item group. Nothing is added, removed, renamed, or rewired; the compiler already deduplicated the file, so the compiled output is byte-for-byte equivalent.

Verification

Completed

Gate Command Result
Fail-before MSBuild UtilitiesCS.Test\UtilitiesCS.Test.csproj /t:Rebuild /p:Configuration=Debug /p:Platform=AnyCPU CSC : warning CS2002 present; 6 Warning(s), 0 Error(s)
Pass-after same command zero CS2002; 5 Warning(s), 0 Error(s)
CI-equivalent build MSBuild TaskMaster.sln /t:Rebuild /m /p:Configuration=Debug '/p:Platform=Any CPU' /p:TreatWarningsAsErrors=true EXIT 0; zero CS2002 across 6976 output lines; only 5 pre-existing unrelated System.Reactive warnings
Scoped tests vstest.console.exe UtilitiesCS.Test.dll /InIsolation /TestCaseFilter:'FullyQualifiedName~PercentageFormatterTests' 7 total, 7 passed — identical before and after
Duplicate sweep XML parse + group-by across all item types and packages.config exactly 1 duplicate (the one fixed), 0 elsewhere

/t:Rebuild rather than /t:Build is load-bearing: a /t:Build after any earlier build skips CoreCompile and would have returned success having compiled nothing, making the fail-before gate vacuous.

Deliberately not run, each with a recorded rationale artifact

  • CSharpier — zero .cs files touched; .claude/rules/csharp.md scopes it to *.cs.
  • /p:Nullable=enable — a known repository defect (issue Bug: claudemd-nullable-gate-diverges-from-ci #522): it does not match ci.yml and produces roughly 200-414 spurious CS86xx errors on a clean main. The CI-equivalent solution build above is the applicable type-check gate.
  • Repo-wide C# coverage capture — zero .cs source lines changed, so there is no changed-line coverage surface to regress.

Recommended for the reviewer

msbuild UtilitiesCS.Test\UtilitiesCS.Test.csproj /t:Rebuild /p:Configuration=Debug /p:Platform=AnyCPU

Confirm no CS2002 for PercentageFormatterTests.cs in the output.

Backward Compatibility / Migration Notes

None. No public API, no behavior, no test surface, and no build output changes. The removed line was redundant to the compiler.

Risks and Mitigations

Risk Mitigation
Deleting the wrong one of two byte-identical lines Both lines are identical, so either deletion is equivalent; the edit was anchored on unique surrounding context and the resulting diff was verified as exactly 1 - / 0 +
Silently dropping the file from compilation Verified: exactly one occurrence remains, <Compile Include= count went 452 → 451, and the 7 PercentageFormatterTests tests still discover and pass
A vacuous gate hiding a non-fix /t:Rebuild forces CoreCompile; the warning is demonstrably present before and absent after under the same command

Rollback is a one-line revert.

Review Guide

  1. UtilitiesCS.Test/UtilitiesCS.Test.csproj — the entire production change, one deleted line.
  2. evidence/baseline/fail-before-cs2002.*.md and evidence/qa-gates/post-fix-cs2002.*.md — the before/after pair.
  3. feature-audit.2026-08-11T04-05.md — acceptance-criteria verdicts.
  4. Everything else is evidence and audit narrative; skim as needed.

Follow-ups

Remediation cycle 1 removed an unplanned .ps1 sweep helper that had been committed under the evidence tree. Retaining it would have placed PowerShell in the branch's changed-language set and triggered a mandatory coverage obligation with no Pester test or coverage artifact behind it. Its logic and complete output remain captured verbatim in evidence/baseline/duplicate-sweep.2026-08-10T22-31.md, so nothing was lost. The exit reaudit recorded 0 blocking findings.

No deferred work.

GitHub Auto-close

drmoisan and others added 4 commits August 10, 2026 23:22
…ile entry

UtilitiesCS.Test.csproj listed
<Compile Include="OutlookObjects\Folder\PercentageFormatterTests.cs" />
twice (lines 304 and 356), which made csc emit
warning CS2002: Source file ... specified multiple times on every build.

Delete the second occurrence and keep the first. This is a build-configuration
change only: no .cs file is touched, no behavior changes, and the
PercentageFormatterTests test count is unchanged at 7.

Evidence captured under the feature folder:
- fail-before: direct-project /t:Rebuild reproduces CS2002 (6 warnings)
- pass-after: same /t:Rebuild emits zero CS2002 (5 warnings)
- CI-equivalent solution /t:Rebuild with TreatWarningsAsErrors=true exits 0
- scoped vstest run: 7 tests, 7 passed, before and after

Refs #394

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…hell helper

Feature review raised one blocking finding: the executor retained
docs/features/.../evidence/baseline/duplicate-sweep.ps1 for reproducibility,
which put PowerShell into the branch's changed-language set and triggered a
mandatory coverage-verification obligation with no Pester test, no PoshQC run,
and no artifacts/pester/powershell-coverage.xml behind it.

The plan never required committing the script - only capturing its output.
That output, and the script's logic, are already recorded verbatim in the
sibling evidence/baseline/duplicate-sweep.2026-08-10T22-31.md, so removing the
.ps1 loses nothing and clears the changed-language signal at its source.

Also folded in the two non-blocking review follow-ups:
- corrected three stale figures in spec.md's duplicate-sweep table to match the
  captured evidence (Analyzer 9 -> 11, Reference ~114 -> 126,
  packages.config ~99 -> 105); the "no duplicates" conclusion is unchanged
- added evidence/qa-gates/analyzer-not-applicable artifact for parity with the
  existing CSharpier and nullable-gate determinations

Zero .cs files changed this cycle, so the C# build and vstest gates were not
re-run; that determination is recorded rather than silently omitted.
UtilitiesCS.Test.csproj is untouched by this cycle.

Also commits the feature-review and remediation audit artifacts.

Refs #394

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
P2-T1 and P2-T2 could not resolve while the git rm was staged rather than
committed, so they were re-run against the committed state.

P2-T1 now passes: the merge-base diff and porcelain status together contain
zero .ps1/.psm1/.psd1 paths, which is the condition this cycle exists to
establish.

P2-T2's original acceptance ("no path outside the feature folder other than the
.csproj") was over-broad: it failed on
.claude/agent-memory/feature-review/project_durable-feature-script-triggers-python-coverage-gate.md,
a two-line memory-index append written by the feature-review subagent during
this feature's own audit. That is not a scope violation and reverting it would
discard a legitimate memory record, so the clause was revised mid-execution
through the planner rather than reinterpreted at execution time.

The revised acceptance splits into four clauses and is strictly narrower than a
blanket exclusion: it still fails on CLAUDE.md, .claude/rules/**, scripts/**,
any .cs file, any other .csproj, and any coverage-threshold change, and its
.ps1/.psm1/.psd1 clause takes no exclusion at all. The evidence artifact must
enumerate every out-of-feature-folder path by name so the agent-memory file is
visible to a reviewer rather than silently swallowed.

All 15 remediation-plan tasks are now checked off.

Refs #394

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Reaudit of branch HEAD f39c6fc9 against the epic integration base, written with
a fresh exit timestamp so the 2026-08-10T23-45 entry audits stay intact.

Independently re-derived from the diff rather than read off the remediation
narrative:
- zero .ps1/.psm1/.psd1 paths in the merge-base diff and a clean porcelain
  status, closing the entry audit's sole blocking finding
- UtilitiesCS.Test.csproj still exactly 1 deletion / 0 insertions, unregressed
- the mid-execution [P2-T2] acceptance revision was compared against its
  original text recovered from 2a2116eb and judged legitimate: it carves out
  only the verified two-line .claude/agent-memory append and re-states every
  substantive prohibition, with the .ps1 check exempt from any carve-out
- spec.md's three corrected sweep figures verified numerically against the
  captured sweep evidence
- authoritative AC count established at 8 (spec.md), all delivered; issue.md's
  non-authoritative mirror carries 6

Remediation cycle 1 exit condition met.

Refs #394

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@drmoisan
drmoisan merged commit c1fe356 into epic/build-ci-coverage-gate-fidelity-integration Aug 11, 2026
drmoisan added a commit that referenced this pull request Aug 11, 2026
Feature 394 merged via PR #533 (c1fe356) and its worktree removed.
Records that ci.yml's pull_request trigger excludes the integration branch,
so child PRs carry no CI and the integrated tree is gated by workflow_dispatch
plus the final main-based integration PR.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
drmoisan added a commit that referenced this pull request Aug 15, 2026
Feature 394 merged via PR #533 (c1fe356) and its worktree removed.
Records that ci.yml's pull_request trigger excludes the integration branch,
so child PRs carry no CI and the integrated tree is gated by workflow_dispatch
plus the final main-based integration PR.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@drmoisan
drmoisan deleted the bug/utilitiescs-test-cs2002-duplicate-compile-entry-394 branch August 15, 2026 02:51
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.

1 participant