Skip to content

Refactor QuickFiler coverage seams for issue 236 - #237

Merged
drmoisan merged 18 commits into
mainfrom
refactor/coverage-gaps-test-seams-236
Jul 5, 2026
Merged

Refactor QuickFiler coverage seams for issue 236#237
drmoisan merged 18 commits into
mainfrom
refactor/coverage-gaps-test-seams-236

Conversation

@drmoisan

@drmoisan drmoisan commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Suggested title: Refactor QuickFiler coverage seams for issue 236

Summary

  • Refactors the issue Refactor: coverage-gaps-test-seams #236 QuickFiler targets so EfcViewerQueue, ItemViewerQueue, QfcThemeHelper, EfcHomeController, and TlpCellStates can be covered through deterministic seams or isolated logic.
  • Adds production adapters and seam-focused tests that preserve existing public/static entry points while avoiding live Outlook COM, viewer construction, and WinForms dependencies in unit coverage.
  • Adds coverage normalization support in the MSTest coverage helper so repository and changed/new coverage gates are measured from canonicalized coverage output.
  • Adds baseline, regression, QA, remediation, and final review evidence under the active feature folder.
  • Confirms issue Refactor: coverage-gaps-test-seams #236 acceptance criteria AC1 through AC10 are checked in the authoritative feature sources.

Why

The issue #236 targets previously contained logic coupled to static queues, live viewer construction, WinForms controls, Outlook COM traversal, or controller construction. The feature requirement was to close those coverage gaps through narrow seams or isolated testable methods without adding exemptions or weakening production behavior.

What Changed

Core behavior or architecture:

  • Added ViewerQueueCore and queue adapters so the viewer queue behavior can be exercised without constructing live viewer forms in tests.
  • Split EfcHomeController responsibilities into testable dependency, metrics, timing, and execute-move surfaces while retaining production factories.
  • Added QfcThemeControlSet and theme helper seams for deterministic theme construction and control-group mapping coverage.
  • Added TlpCellStates coverage paths for construction, conversion, duplicate handling, TryAddState, empty inputs, and null-input behavior.

Tooling, automation, CI, or developer experience:

  • Updated the MSTest coverage helper to normalize Cobertura sources and line data for stable repository and changed/new coverage calculations.
  • Added Pester coverage-helper tests for the normalization behavior.

Tests:

  • Added QuickFiler MSTest coverage for the five issue Refactor: coverage-gaps-test-seams #236 targets and production factory paths.
  • Added repository-coverage remediation tests across related test projects to satisfy the repository-wide coverage floor.
  • Updated affected test project files to include the new test coverage files.

Docs, templates, or agents:

  • Added issue Refactor: coverage-gaps-test-seams #236 plan, baseline evidence, regression evidence, remediation evidence, QA gate outputs, and final policy/code/feature review artifacts.
  • Updated feature source documents so AC1 through AC10 are checked as delivered.

Architecture / How It Fits Together

The change keeps production behavior behind adapters and factory methods while moving decision logic into local, injectable seams. Tests exercise queue behavior, theme mapping, controller dependency behavior, and state handling through those seams rather than through live COM, viewer, or WinForms construction. Coverage evidence is generated through the repository MSTest coverage script and normalized before threshold evaluation.

Verification

Completed

  • dotnet tool run csharpier format . passed in the current source state.
  • msbuild TaskMaster.sln /t:Build /p:Configuration=Debug /p:Platform='Any CPU' /p:EnableNETAnalyzers=true /p:EnforceCodeStyleInBuild=true passed in the current source state.
  • msbuild TaskMaster.sln /t:Build /p:Configuration=Debug /p:Platform='Any CPU' /p:Nullable=enable /p:TreatWarningsAsErrors=true passed in the current source state.
  • pwsh -File scripts/vscode/Invoke-MSTestWithCoverage.ps1 -SearchRoot . -Configuration Debug -CoverageOutput docs\features\active\2026-07-04-coverage-gaps-test-seams-236\evidence\qa-gates\remediation-cycle2-current-coverage.cobertura.xml passed in the current source state.
  • Current coverage thresholds passed: repository line coverage 81.08% against 80.00%; issue Refactor: coverage-gaps-test-seams #236 changed/new coverage 95.74% against 90.00%; per-file changed/new coverage PASS; target coverage PASS.
  • Current no-exemption audit passed with no coverage configuration diff for coverage.config, TaskMaster.runsettings, or scripts/vscode/TaskMaster.cli.runsettings.
  • Final policy audit, code review, and feature audit artifacts validated successfully.

Recommended

  • Verify the GitHub Actions checks for this PR complete successfully.
  • Re-run the required C# toolchain if new commits are added to the branch.

Backward Compatibility / Migration Notes

  • Existing public/static production entry points remain source-compatible.
  • No migration steps are required for users.
  • No coverage exemptions were added for the issue Refactor: coverage-gaps-test-seams #236 targets.

Risks and Mitigations

  • Risk: seams around COM, viewer, and WinForms boundaries could diverge from production behavior. Mitigation: production factories remain in place and targeted tests cover seam behavior plus production factory construction paths where practical.
  • Risk: coverage measurement can vary when Cobertura output includes non-canonical paths. Mitigation: coverage helper normalization is covered by Pester tests and current threshold evidence.
  • Risk: the branch has a broad evidence footprint. Mitigation: final review artifacts and current QA evidence are stored under the feature folder for auditability.

Review Guide

  • Review the seam boundaries in QuickFiler/Helper Classes/ViewerQueueCore.cs, QuickFiler/Helper Classes/QfcThemeControlSet.cs, and QuickFiler/Controllers/EfcHomeControllerDependencies.cs first.
  • Review the updated production adapters in the original issue Refactor: coverage-gaps-test-seams #236 target files to confirm caller compatibility.
  • Review the QuickFiler test additions for deterministic coverage of queue, theme, controller, and TlpCellStates behavior.
  • Review scripts/vscode/Invoke-MSTestWithCoverage.Helpers.ps1 and its Pester tests for coverage normalization behavior.

Follow-ups

GitHub Auto-close

Related issues / PRs

  • None

@drmoisan
drmoisan merged commit 193b3ff into main Jul 5, 2026
2 checks passed
@drmoisan
drmoisan deleted the refactor/coverage-gaps-test-seams-236 branch July 18, 2026 20:40
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.

Refactor: coverage-gaps-test-seams

1 participant