Skip to content

fix(QuickFiler): guard null calendar and appointment in GetMoveDiagnostics #97#102

Merged
drmoisan merged 3 commits into
developmentfrom
bug/getmovediagnostics-null-guard-97-clean
Mar 26, 2026
Merged

fix(QuickFiler): guard null calendar and appointment in GetMoveDiagnostics #97#102
drmoisan merged 3 commits into
developmentfrom
bug/getmovediagnostics-null-guard-97-clean

Conversation

@drmoisan

Copy link
Copy Markdown
Owner

Summary

Fixes #97 — guards null calendarItem and �ppointmentItem in QfcHomeController.GetMoveDiagnostics() and QfcCollectionController metrics path to prevent NullReferenceException when Outlook items lack calendar/appointment data.

Changes

  • QuickFiler/Controllers/QfcHomeController.cs: Added null guards before accessing calendar/appointment properties in the diagnostics collection path.
  • QuickFiler/Controllers/QfcCollectionController.cs: Added null guards in the metrics aggregation path.
  • QuickFiler.Test/Controllers/QfcHomeControllerTests.cs: Added regression tests for the null-guard paths.
  • QuickFiler.Test/Controllers/QfcCollectionControllerTests.cs: Added regression tests for the null-guard paths.

QA Evidence

  • csharpier: clean (0 files changed)
  • Analyzer build: 0 errors, 39 warnings (all pre-existing)
  • Nullable build: 0 errors, 0 warnings
  • MSTest: 2853 passed, 14 failed (all pre-existing on origin/development, outside QuickFiler scope)
  • Coverage: QfcHomeController.cs improved from 60.60% to 78.71% line rate; QfcCollectionController.cs improved from 3.33% to 4.27% line rate

Closes #97

- In GetMoveDiagnostics, wrap olAppointment.Body access with `if (olAppointment is not null)` to eliminate NullReferenceException when the "Email Time" calendar subfolder is absent
- In QuickFileMetrics_WRITE, guard olEmailCalendar before .Items.Add() and propagate null olAppointment safely downstream
- Add regression tests covering both null paths in QfcCollectionControllerTests and QfcHomeControllerTests
- Capture Phase 0–2 baseline and QA gate evidence artifacts; add atomic-executor, atomic-planner, and feature-review skill definitions

Refs: #97
@drmoisan
drmoisan merged commit 5119eae into development Mar 26, 2026
1 of 2 checks passed
@drmoisan
drmoisan deleted the bug/getmovediagnostics-null-guard-97-clean branch March 26, 2026 22:36
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