Repository navigation
refactor(quickfiler): remove unused stackMovedItems parameter from MoveEmailsAsync (#629) - #734
Merged
Conversation
…ms removal Fills in the feature-folder scaffold that had only issue.md populated (spec.md/user-story.md/plan.md were unfilled templates). Removes the stale empty plan.2026-08-30T08-15.md scaffold, replaced by a real 7-task Phase 0 / 6-task Phase 1 / 10-task Phase 2 atomic plan. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ATYLDoRLKXS5sgAzegW7ZL
…ackmoveditems-parameter-629
…veEmailsAsync (#629) The undo stack is populated by EmailFiler.PushToUndoStack directly onto the shared Globals.AF.MovedMails instance; the parameter was never read. Updates the sole call site and the four tests whose call shape referenced the old signature, rewriting one test in place to preserve its early-return-branch coverage. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ATYLDoRLKXS5sgAzegW7ZL
drmoisan
deleted the
feature/qfc-remove-stackmoveditems-parameter-629
branch
September 2, 2026 13:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Suggested title
refactor(quickfiler): remove unused
stackMovedItemsparameter fromMoveEmailsAsync(#629)Summary
stackMovedItemsparameter fromIQfcCollectionController.MoveEmailsAsyncandits implementation — the undo stack was never populated from this argument.
QfcFormController.EventHandlers.cs) to invoke thezero-argument overload.
fixes, one rewrite that preserves the early-return-branch coverage the old test happened to also pin.
<remarks>block explaining where theundo stack is actually populated, instead of leaving a stale
<param>tag.Why
Issue #469's investigation (defect 4) established that
MoveEmailsAsync'sstackMovedItemsparameteris never used to populate the undo stack —
EmailFiler.PushToUndoStackwrites onto the same globalSloStackinstance directly (UtilitiesCS/EmailIntelligence/EmailParsingSorting/EmailFiler.cs:185-189).Issue #468's branch could not remove the parameter itself because doing so required editing
QfcFormController.EventHandlers.cs, a file outside that branch's declared scope, so it added anexplicit discard (
_ = stackMovedItems;) and deferred the actual removal to this issue (#629). Leavinga discarded, unused parameter on a production interface is a maintenance hazard: a future reader may
reasonably — and incorrectly — assume it does something.
What Changed
Core feature (production code):
QuickFiler/Interfaces/IQfcCollectionController.cs—Task MoveEmailsAsync(SloStack<IMovedMailInfo> stackMovedItems)→Task MoveEmailsAsync();<param>doc replaced with a<remarks>block.QuickFiler/Controllers/QfcCollectionController.cs(line 2152) — parameter removed,_ = stackMovedItems;discard deleted, stale trace-log comment updated, doc comment rewritten.QuickFiler/Controllers/QfcFormController.EventHandlers.cs(line 228) — call site updated toawait _groups.MoveEmailsAsync();.Tests:
QuickFiler.Test/Controllers/QfcCollectionControllerDefects468MoveTests.cs— 3 call sites updated mechanically;MoveEmailsAsync_WithNullStack_BehavesIdenticallyToAnEmptyStackrewritten toMoveEmailsAsync_WithEmptyItemGroupsToMove_DoesNotThrow, keeping the early-return-branch coverage it was the only test to exercise.QuickFiler.Test/Controllers/QfcFormControllerUndoHandoffTests.cs— one MoqSetupand oneVerifyupdated to the zero-argument signature.Docs/feature folder:
spec.md,user-story.md, and a new atomic plan (plan.2026-09-02T11-00.md) authored for this feature folder, which previously held onlyissue.md.policy-audit,code-review, andfeature-auditartifacts.Architecture / How It Fits Together
No architectural change.
IQfcCollectionControllerremains a single-implementation, first-partyinterface (
QfcCollectionController) with a single production call site(
QfcFormController.EventHandlers.cs). The undo stack's actual population path(
EmailFiler.PushToUndoStack→Globals.AF.MovedMails) is unchanged and was never wired through thisparameter.
Verification
Completed:
dotnet tool run csharpier check .— exit 0, no diffs.msbuild TaskMaster.sln /t:Rebuild /m /p:Configuration=Debug "/p:Platform=Any CPU" /p:EnableNETAnalyzers=true /p:EnforceCodeStyleInBuild=true— exit 0, 0 errors.msbuild TaskMaster.sln /t:Rebuild /m /p:Configuration=Debug "/p:Platform=Any CPU" /p:TreatWarningsAsErrors=true— exit 0, 0 errors.QuickFiler.Testsuite viavstest.console.exewith coverage — 6949/6949 passing, both baseline and final.lines-covered/lines-validsums, not the root Cobertura rate attributes, which are known-unreliable per open defects Bug: cobertura-package-rates-not-recomputed #529/Bug: cobertura-merged-class-methods-incomplete #530): line coverage +0.0078pp, branch coverage −0.0121pp (within run-to-run noise; no branching logic was touched by this change). Full analysis:evidence/qa-gates/p2-t6-coverage-delta.md.origin/main: exactly the 5 production/test files predicted inspec.md, plus this feature folder's own docs/evidence.evidence/other/p1-t6-footprint-check.md.Recommended:
Backward Compatibility / Migration Notes
Breaking change to
IQfcCollectionController.MoveEmailsAsync's signature. This is not a published orexternal API — it has exactly one production implementation and one production call site, both
first-party and updated in this same PR. No external consumer is affected.
Risks and Mitigations
Mitigation: a full-repo grep for
MoveEmailsAsyncandMock<IQfcCollectionController>was runbefore editing began and found all 6 call sites (4 direct + 2 mock), one more than
issue.mdoriginally anticipated (
evidence/baseline/p0-t8-mock-sweep.md).the early-return path.
Mitigation: confirmed via grep this was the only test setting
_itemGroupsToMoveto an emptycollection, and rewrote rather than deleted it.
Review Guide
Suggested order:
QuickFiler/Interfaces/IQfcCollectionController.cs— the signature change and doc-comment rewrite.QuickFiler/Controllers/QfcCollectionController.cs— the implementation-side removal.QuickFiler/Controllers/QfcFormController.EventHandlers.cs— the one-line call-site update.QuickFiler.Test/Controllers/QfcCollectionControllerDefects468MoveTests.cs— 3 mechanical fixes plus the one rewritten test (seeevidence/other/p1-t5-test-disposition.mdfor rationale).QuickFiler.Test/Controllers/QfcFormControllerUndoHandoffTests.cs— the two Moq site updates.docs/features/active/2026-08-26-qfc-remove-stackmoveditems-parameter-629/folder is documentation and evidence only; the two.cobertura.xmlfiles are large and mechanical (raw coverage tool output), not hand-authored.Follow-ups
None identified. This closes out the deferred cleanup that issue #468 explicitly left for a later issue.
GitHub Auto-close
stackMovedItemsparameter fromMoveEmailsAsync#629