Skip to content

Expand UtilitiesCS coverage, fix triage classifier reset, and add Codex Web setup validation#94

Merged
drmoisan merged 95 commits into
mainfrom
development
Mar 22, 2026
Merged

Expand UtilitiesCS coverage, fix triage classifier reset, and add Codex Web setup validation#94
drmoisan merged 95 commits into
mainfrom
development

Conversation

@drmoisan

Copy link
Copy Markdown
Owner

Expand UtilitiesCS coverage, fix triage classifier reset, and add Codex Web setup validation

Summary

  • Expand deterministic MSTest coverage across the remaining UtilitiesCS surface and additional OutlookObjects slices, with mirrored UtilitiesCS.Test additions and targeted production hardening where new tests exposed edge cases.
  • Fix triage classifier reset behavior so clearing triage recreates a valid seeded classifier group instead of persisting an empty state that can later propagate null engine failures.
  • Initialize the Sort Email / QuickFiler theme from the current Windows mode on first render by introducing UtilitiesCS/HelperClasses/ThemeHelpers/SystemThemeDetector.cs and wiring TaskMaster/AppGlobals/AppOlObjects.cs to use it.
  • Add a manually triggered GitHub Actions workflow for .codex/codex-web-setup.sh, along with supporting restore/build/coverage/dev-tool scripts and bundled actionlint assets for reproducible validation.
  • Refresh agent, prompt, and instruction assets under .github/ and .claude/, including generated AGENTS.md and CLAUDE.md, so the repository’s automation and documentation stay aligned with the expanded workflow surface.

Why

  • The active UtilitiesCS coverage workstream documents a large testing gap: 196 of 292 tracked classes were below the repository’s 80% per-file line-coverage floor, including helpers, threading utilities, serialization infrastructure, email intelligence modules, and Outlook-related code. The stated goal is to turn current behavior into executable documentation and reduce regression risk across dependent projects.
  • The OutlookObjects feature docs describe UtilitiesCS/OutlookObjects as a high-risk module that mixes deterministic helper logic with Outlook COM interop, WinForms prompts, filesystem access, reflection wrappers, and lazy-loading behavior. The planned response is mirrored tests, explicit UtilitiesCS.Test.csproj wiring, per-file coverage evidence, and explicit blocker documentation rather than silent gaps.
  • The folder-wrapper coverage feature further narrows that requirement to deterministic, in-memory coverage for every compiled production file under UtilitiesCS/OutlookObjects/Folder, with minimal seams only where UI/filesystem coupling blocks testability.
  • The triage bug context states that Triage.CreateNewTriageClassifierGroupAsync() could serialize an empty BayesianClassifierGroup, causing later triage validation to fail, CreateAsync() to return null, and downstream runtime paths such as Triage Set A to hit System.NullReferenceException.
  • The dark-mode feature requires QuickFiler to follow the current Windows theme on first render and on subsequent launches after the system theme changes, while still falling back deterministically if theme detection is unavailable.
  • The Codex Web setup workflow plan explicitly calls for a manually triggered GitHub Actions workflow that validates .codex/codex-web-setup.sh on Linux and verifies the expected failure-mode harness with actionlint.

What Changed

  • Core behavior / architecture

    • Added UtilitiesCS/HelperClasses/ThemeHelpers/SystemThemeDetector.cs and switched QuickFiler theme initialization in TaskMaster/AppGlobals/AppOlObjects.cs to system-theme detection.
    • Fixed triage classifier-group recreation in UtilitiesCS/EmailIntelligence/ClassifierGroups/Triage/Triage.cs, with related startup/runtime hardening reflected in the modified TaskMaster app-global surfaces.
    • Hardened a broad set of shared utilities and Outlook-facing helpers while expanding coverage, including targeted fixes called out in commit subjects such as Outlook helper edge-case handling, user-defined-field cast corrections, tag chooser option preservation, malformed project/config repairs, and QuickFiler sort-failure propagation.
    • Added .github/workflows/codex-web-setup-test.yml plus .codex/codex-web-setup.sh support assets and script updates under scripts/vscode/ and scripts/dev-tools/.
  • Tooling / automation / CI / DevEx

    • Added or expanded VS Code helper scripts for restore, build, coverage, SDK setup, package synchronization, and coverage extraction, including scripts/vscode/Invoke-MSTestWithCoverage*.ps1, scripts/vscode/Invoke-Restore.ps1, scripts/vscode/Install-RepoDotNetSdk.ps1, and scripts/vscode/Sync-PackageReferences.ps1.
    • Updated .github/workflows/ci.yml, .vscode/tasks.json, .vscode/settings.json, .vscode/extensions.json, Directory.Build.targets, global.json, and dotnet-tools.json to support the repo-local .NET/tooling flow.
    • Bundled actionlint-bin/ and added scripts/dev-tools/run-actionlint.ps1 so workflow validation is available inside the repo.
  • Tests

    • Added or expanded a large mirrored MSTest surface under UtilitiesCS.Test, including substantial new coverage for Dialogs, EmailIntelligence, Extensions, HelperClasses, NewtonsoftHelpers, ReusableTypeClasses, Threading, and OutlookObjects.
    • Extended OutlookObjects coverage across AppointmentItem, Attachment, Category, Conversation, Fields, Folder, Item, MailItem, Recipient, Store, and Table, with the folder slice explicitly targeting every compiled production file in scope.
    • Added focused triage regression coverage in UtilitiesCS.Test/EmailIntelligence/ClassifierGroups/Triage/TriageCreationTests.cs.
    • Updated explicit compile registration in UtilitiesCS.Test/UtilitiesCS.Test.csproj so new test files are included in the build.
  • Docs / templates / agents

    • Added .claude/commands/*, .claude/skills/*, and refreshed .github/agents/*, .github/skills/*, prompts, and instruction files.
    • Generated AGENTS.md and CLAUDE.md and updated active feature folders, plans, audits, specs, user stories, and evidence artifacts across issues #65, #67, #71, #79, #82, #87, and #88.

Architecture / How It Fits Together

  • UtilitiesCS remains the shared logic layer for helpers, serialization, email intelligence, threading, and Outlook-related wrappers; TaskMaster, QuickFiler, Tags, and related projects consume those behaviors.
  • UtilitiesCS.Test mirrors production folder structure so coverage additions stay aligned with the implementation surface. The explicit <Compile Include=...> model in UtilitiesCS.Test.csproj is part of the execution path, not just documentation.
  • The repo automation layer now combines:
    • GitHub Actions workflows in .github/workflows/
    • local validation scripts in scripts/vscode/ and scripts/dev-tools/
    • repo-pinned SDK/tooling metadata in global.json, dotnet-tools.json, and bundled actionlint assets
  • Feature delivery is tracked through docs/features/active/... issue/spec/plan/evidence files, which tie each coverage slice or bug fix to its acceptance criteria, QA artifacts, and any documented exclusions or blocked branches.

Verification

Completed

  • docs/features/active/2026-03-19-utilities-coverage-part-three-87/evidence/qa-gates/final-qa-format.md records:
    • csharpier .
    • EXIT_CODE: 0
  • docs/features/active/2026-03-19-utilities-coverage-part-three-87/evidence/qa-gates/final-qa-analyzer-build.md records:
    • msbuild TaskMaster.sln /t:Build /p:Configuration=Debug /p:Platform="Any CPU" /p:EnableNETAnalyzers=true /p:EnforceCodeStyleInBuild=true
    • EXIT_CODE: 0
  • docs/features/active/2026-03-19-utilities-coverage-part-three-87/evidence/qa-gates/final-qa-nullable-build.md records:
    • msbuild TaskMaster.sln /t:Build /p:Configuration=Debug /p:Platform="Any CPU" /p:Nullable=enable /p:TreatWarningsAsErrors=true
    • EXIT_CODE: 0
  • docs/features/active/2026-03-19-utilities-coverage-part-three-87/evidence/qa-gates/final-qa-test-coverage.md records:
    • vstest.console.exe <all-test-assemblies> /EnableCodeCoverage /InIsolation /Logger:trx
    • EXIT_CODE: 0
  • docs/features/active/2026-03-19-utilities-coverage-part-three-87/evidence/qa-gates/final-coverage-verification.md records a non-green final coverage gate:
    • coverage verification against coverage/coverage.cobertura.xml, baseline coverage, and skip candidates
    • EXIT_CODE: 1
  • PR digest #89 records focused triage verification:
    • UtilitiesCS.Test.dll /Tests:CreateClassifier_ReturnsGroupWithClassifiersABC,CreateClassifier_ReturnsGroupWithNonNullSharedTokenBase /InIsolation
    • EXIT_CODE: 0
    • 2 tests executed, 2 passed, 0 failed
  • The PR context records HEAD CI status as in_progress.

Recommended

  • pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/vscode/Invoke-Restore.ps1 -SolutionPath TaskMaster.sln -Configuration Debug -Platform "Any CPU"
  • dotnet tool run csharpier format .
  • pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/vscode/Invoke-VSBuild.ps1 -SolutionPath TaskMaster.sln -Configuration Debug -Platform "Any CPU" -EnableNETAnalyzers -EnforceCodeStyleInBuild
  • pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/vscode/Invoke-VSBuild.ps1 -SolutionPath TaskMaster.sln -Configuration Debug -Platform "Any CPU" -EnableNullable -TreatWarningsAsErrors
  • pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/vscode/Invoke-MSTestWithCoverage.ps1 -SearchRoot . -Configuration Debug
  • pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/dev-tools/run-actionlint.ps1

Backward Compatibility / Migration Notes

  • No intentional public API removals are called out in the context; most behavior changes are additive, test-driven, or narrowly scoped bug fixes.
  • Triage reset behavior changes intentionally: clearing/recreating triage now uses the seeded classifier-group path rather than persisting an empty group. Callers should not rely on the previous invalid serialized state.
  • QuickFiler theme initialization now derives first-render theme from Windows mode via SystemThemeDetector; this replaces reliance on the prior _darkMode field initializer behavior in AppOlObjects.
  • The repository’s validation flow now relies more heavily on repo-local scripts, bundled tooling, and workflow assets. Developers reviewing or reproducing the branch should prefer the scripted restore/build/test path reflected in the evidence artifacts.
  • New test files continue to require explicit UtilitiesCS.Test.csproj registration; the mirrored test layout is only effective when those compile includes are maintained.

Risks and Mitigations

  • Risk: The branch is very large (1283 files changed; 128152 insertions / 21320 deletions) and aggregates many merged PRs.
    • Mitigation: Review by subsystem and defer mechanical agent/docs churn until after core scripts, production fixes, and tests.
  • Risk: The #87 UtilitiesCS coverage objective is advanced substantially but not fully verified green because the final coverage verification artifact recorded EXIT_CODE: 1.
    • Mitigation: Treat #87 as follow-up work rather than closure; review skip-candidates.md and the final coverage artifact before declaring the coverage campaign complete.
  • Risk: Legacy .NET Framework / packages.config tooling remains environment-sensitive.
    • Mitigation: Use the repo restore/build scripts and the repo-local SDK/tooling path that this branch adds and updates.
  • Risk: HEAD CI is still in_progress, so final workflow status is not yet confirmed in the context.
    • Mitigation: Wait for CI completion and rerun the recommended local validation commands if any follow-up changes land.
  • Risk: Agent, prompt, and documentation sync changes add substantial review noise.
    • Mitigation: Review .claude/, .github/agents/, .github/skills/, AGENTS.md, and CLAUDE.md last as a separate documentation/automation pass.

Review Guide

  • Review .github/workflows/codex-web-setup-test.yml, .codex/codex-web-setup.sh, scripts/vscode/*, scripts/dev-tools/run-actionlint.ps1, and actionlint-bin/ first to understand the new validation/tooling path.
  • Review the targeted production fixes next:
    • UtilitiesCS/HelperClasses/ThemeHelpers/SystemThemeDetector.cs
    • TaskMaster/AppGlobals/AppOlObjects.cs
    • UtilitiesCS/EmailIntelligence/ClassifierGroups/Triage/Triage.cs
    • related app-global and helper changes surfaced by coverage-driven fixes
  • Then review the focused OutlookObjects coverage slices (AppointmentItem, Folder, Item, MailItem, Recipient, Store, Table) and the corresponding UtilitiesCS.Test/OutlookObjects/... additions.
  • After that, review the broader UtilitiesCS.Test expansion across Dialogs, EmailIntelligence, Extensions, HelperClasses, NewtonsoftHelpers, ReusableTypeClasses, and Threading, together with UtilitiesCS.Test/UtilitiesCS.Test.csproj.
  • Leave .claude/*, .github/agents/*, .github/skills/*, AGENTS.md, CLAUDE.md, and the feature-doc/evidence churn under docs/features/active/* for the final pass, since much of that diff is mechanical or documentation-heavy.

Follow-ups

  • Resolve the remaining per-file coverage gaps and exclusions documented for #87, using docs/features/active/2026-03-19-utilities-coverage-part-three-87/evidence/other/skip-candidates.md and the failing final coverage verification artifact as the starting point.
  • Confirm the in-progress HEAD CI run completes successfully and, if needed, reconcile any failures with the repo-local script/tooling changes added here.
  • Keep future agent/instruction synchronization work isolated from large product-and-test branches where practical, to reduce reviewer load and make functional changes easier to audit.

GitHub Auto-close

Related issues / PRs

drmoisan and others added 30 commits March 11, 2026 13:10
Sync main to development
- add a PowerShell test runner that collects Cobertura coverage with dotnet-coverage and vstest.console
- configure coverage filtering and post-processing so Koverage can read workspace-relative results reliably
- wire the workflow into VS Code tasks and settings and ignore generated coverage artifacts
(test(coverage)): add VS Code MSTest coverage workflow for Koverage
(chore): change tooling for hierarchical koverage
- add broad MSTest coverage across UtilitiesCS dialogs, email logic, extensions, helpers, outlook-object logic, reusable types, and threading utilities
- wire the new test corpus into UtilitiesCS.Test and capture the feature plan, research, baseline evidence, QA audits, and remediation artifacts for the coverage initiative
- tighten orchestrator agent guidance so delegated feature review artifacts remain the authoritative completion gate

Refs: #65
- update app and test project package references, binding redirects, and import targets to the newer NuGet dependency set
- align MSTest-based test projects with the newer testing platform and replace assertions that no longer match the upgraded framework API
- add a change plan documenting the upgrade fallout, current findings, and remaining build-recovery steps
Restore solution compatibility after NuGet package upgrades
- route junk-potential setting reads and writes through the current JunkPotential key in AppOlObjects
- add regression tests covering junk-potential setting reads and updates
- remove legacy OlJunkPotential setting entries and record validation status in the change plan
…ting

(fix(junk-potential)): persist selected folder to JunkPotential
…ts phase 1-2

- add mirrored MSTest coverage for attachment, calendar, com, explorer, folder, item, mail, recipient, and store OutlookObjects helpers and wrappers
- replace legacy flat OutlookObjects test entries with mirrored compile includes and expand existing recipient/store coverage paths
- capture phase 0 baseline artifacts, target-matrix evidence, and verified exclusions for non-live ItemComparer and root MailResolution

Refs: #67
- Add mirrored MSTest coverage for Outlook appointment, category, folder, item, and mail-item helpers and wrappers
- Replace async enumerable dependency-failure assertions with behavioral coverage and align test-project async package references and binding redirects
- Refresh the #67 feature plan into an executor-ready atomic plan for the remaining OutlookObjects coverage work

Refs: #67
- add mirrored MSTest coverage for conversation, fields, folders, store, table, and mail-item projection paths
- introduce small internal seams in OutlookObjects helpers to exercise null, retry, and COM-safe branches without live Outlook dependencies
- relocate coverage evidence into active feature folders and update the feature plan with baseline and QA artifacts
…erage-66

Expand mirrored OutlookObjects coverage with targeted Outlook test seams
- Added method to set the caption
- Wired new category calls with captions so that use knows what they are being asked to choose
- add SystemThemeDetector and use the Windows AppsUseLightTheme registry value to set AppOlObjects dark mode at startup
- register initial SystemThemeDetector tests and capture issue, plan, baseline, and QA evidence for issue #71
- pin a repo-local .NET 8.0.205 SDK with install guidance so dotnet format avoids the host SDK 10.0.200 XMakeElements crash

Refs: #71
- Add Install-RepoDotNetSdk.ps1 and test to enable installation
- Add global.json to prefer local sdk if exists
- Add dotnet local folders to gitignore
Initialize `Sort Email` theme from Windows mode and add repo-local SDK formatting support
drmoisan and others added 29 commits March 20, 2026 18:50
- Add MSTest coverage for dialog helpers, classifier groups, WinForms helpers, Outlook table/store/mail helpers, threading utilities, and supporting helper classes
- Register the new UtilitiesCS.Test sources and extend ConversationHelper coverage with additional COM and retry-path scenarios
- Adjust Triage loaded creation to initialize missing state during test setup and record skip candidates and plan progress for feature 87

Refs: #87
- Correct ConversationHelper filtering and mail-item list behavior for missing columns and forwarded flags
- Initialize safe MailItemHelper defaults and recipient matching to avoid null dereferences in serialization and equality paths
- Make Outlook table header enumeration and store/controller regression tests work against empty or mocked COM objects

Refs: #87
- added task to invoke csharpier to format code
- ran csharpier formatting across the repo
- Load triage classifier configuration from the persisted manager key during create and initialize flows
- Add a regression test that verifies create-treatment triage initialization reuses the stored ManagerTriage.json config
- Extend the VSBuild helper and VS Code tasks to pass analyzer and nullable MSBuild switches, with PowerShell tests covering argument generation
- store each rendered option key on its checkbox and only reconstruct prefixed tags when no original key is available
- launch program selection without forcing a program prefix and add a regression test project path that exercises the unprefixed checkbox flow
- expand UtilitiesCS coverage for classifier groups, mail item helpers, and store wrapper behaviors while updating the active feature plan evidence
- retarget the C# orchestration agent manifests to GPT-5.4
- update UtilitiesCS test cases to satisfy analyzer and nullable gates while preserving MSTest coverage scenarios
- align the UtilitiesCS.Test System.Reflection.Metadata reference to the resolved package version used by the final QA build
- capture final format, analyzer, nullable, test, and coverage verification evidence in the active feature plan, including the remaining uncovered-file gap
- add generated AGENTS.md and CLAUDE.md instruction manifests for the synchronized agent policy set

Refs: #87
- add branch-focused MSTest coverage for EmailIntelligence parsers, tokenization, and subject-map behaviors
- expand helper and collection coverage across enumerable, filesystem, pretty-print, trace, stack, tree, and wrapper scenarios
- add MonoExtension coverage tests, deepen SDIL reader assertions, register the new test file, and reopen the active coverage plan checkpoints

Refs: #87
…rage

- add MSTest coverage for null-guard, config restoration, copy, and derived-conversion paths
- verify emitted Config and backing-field behavior with dynamic type builders across getter-only and missing-getter scenarios
- update VS Code workspace recommendations and disable the Copilot CLI session controller in repo settings

Refs: #87
- add MSTest coverage for Bayesian classifier groups, Outlook item wrappers, attachment helpers, and observable collection nodes
- extend helper and algorithm coverage for Initializer, TraceUtility, DeepCompare, SmithWaterman, and ImageStripper, including current legacy failure paths
- register new test files in UtilitiesCS.Test.csproj and update the utilities coverage plan with captured MSTest output

Refs: #87
…5-42

Copilot/worktree 2026 03 21T20 45 42
- store `GetUdfValue<T>` intermediate values as `object` so array and scalar UDF values flow through the generic path correctly
- add broad regression coverage for property accessor reads, validation mappings, null defaults, bulk setters, and Outlook item overloads
…three-87

Expand UtilitiesCS coverage, fix triage classifier reset, and add Codex Web setup validation
@drmoisan
drmoisan merged commit 8aaa16b into main Mar 22, 2026
2 of 4 checks passed
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.

Feature: dark-mode-detection Feature: outlook-objects-test-coverage Feature: utilities-coverage

1 participant