fix(quickfiler): advisory High Confidence deadline and ordered, logged Cancel teardown (#791) - #795
Merged
drmoisan merged 14 commits intoSep 6, 2026
Conversation
…dline defects Add the promoted potential entries for issues #791 (QuickFiler High Confidence cancel teardown and first-batch deadline defects) and #792 (breadcrumb WebView2 initialization failure 0x8007139F, filed as a sibling defect out of scope for #791), and seed the active full-bug feature folder for #791 with issue.md, the spec template, and the plan template. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Hugw6Vwd7q8bopFt4g9KP
Record the human-exception runbook for the manual live-Outlook verification step that AC2 of issue #791 requires, and carry the runbook agent's memory re-verification date bump. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Hugw6Vwd7q8bopFt4g9KP
Record the task-researcher design for the advisory first-batch checkpoint with hard scan bounds (AC1) and the ordered, logged, exception-safe Cancel teardown (AC2). Refine AC1 to permit an empty dialog only on exhaustion or at the bound, and move the live-Outlook confirmation in AC2 to a runbook-backed human follow-up. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Hugw6Vwd7q8bopFt4g9KP
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Hugw6Vwd7q8bopFt4g9KP
…dline fix Fill spec.md from the design research (advisory checkpoint with hard scan bounds, ordered logged Cancel teardown, superseded #424/#608 criteria, test strategy, logging plan) and add the operator user story. Carry the prd-feature agent memory updates. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Hugw6Vwd7q8bopFt4g9KP
Four-phase plan: policy reads and C# baseline capture, fail-first regression tests with retargeting of the seven superseded gate tests, per-file implementation of the advisory checkpoint and ordered Cancel teardown, and the final QA loop with coverage delta and AC check-off. Plan validator passed. Carry the atomic-planner agent memory notes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Hugw6Vwd7q8bopFt4g9KP
Scope the 500-line ceiling to .cs files, add the R10 shell-variable re-binding rule, retarget the datamodel stop-reason test to the time ceiling, make the NuGet restore a confirmation step, fix the NotImplementedException and pass-count gates, and record the coverage collector substitution. Carry the atomic-planner memory notes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Hugw6Vwd7q8bopFt4g9KP
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Hugw6Vwd7q8bopFt4g9KP
… task Admit a non-executable marker for changed lines that carry no Cobertura line element and scope the zero-hits count to executable lines. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Hugw6Vwd7q8bopFt4g9KP
…e regex Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Hugw6Vwd7q8bopFt4g9KP
- QfcStreamingDequeueConfidenceGate: first-batch deadline is now a zero-acceptance checkpoint that resets and logs rather than returning an empty batch; the scan is instead bounded by hard candidate-scan and duration caps, reported via the new QfcDequeueStop.ScanCapReached member, with a launch line logging the checkpoint interval and both caps. - QfcFormController.EventHandlers/Deactivate: ActionCancelAsync now runs its stages in order through a shared helper that logs each stage and its failures, awaits QuiesceLoaderAsync to drain the background loader before groups cleanup, and invokes the ribbon release callback under finally so a throwing stage still releases it; ButtonCancel_Click no longer lets an exception escape the async void handler. - QfcHomeController/QfcDatamodel: cleanup guards its two stages independently, nulls datamodel fields only after the loader has quiesced, and runs ParentCleanup under finally. - Retargeted five confidence-gate and controller test files from the deadline-expiry contract to the checkpoint/scan-cap contract, and added four new test files covering datamodel teardown ordering, form-controller cancel teardown, home-controller cleanup, and the scan-cap iteration path. - Added the plan, spec, issue record, and evidence artifacts under docs/features/active/2026-09-06-quickfiler-high-confidence-cancel- teardown-and-deadline-defects-791/. Refs: #791 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Hugw6Vwd7q8bopFt4g9KP
… path Promote the two non-blocking feature-review findings into tracked issues (#793 disposed-but-shared token source and unprotected release link; #794 unasserted scan-bound log line) and replace the absolute account-bearing manifest path in the live-Outlook runbook with a registry-derived placeholder. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Hugw6Vwd7q8bopFt4g9KP
Record the policy audit, code review, and feature audit for the cancel-teardown and deadline fix. All three pass the MCP artifact validator after two structural repairs to the policy audit (checklist bullets and the positional coverage metrics table). Carry the feature-review agent memory notes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Hugw6Vwd7q8bopFt4g9KP
Capture the follow-up idea surfaced by the #791 research: expose the High Confidence scan cap and zero-acceptance ceiling as user settings once live measurement has confirmed the defaults. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Hugw6Vwd7q8bopFt4g9KP
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
fix(quickfiler): make the High Confidence deadline advisory and the Cancel teardown ordered, logged, and exception-safe (#791)
Summary
QfcDequeueStop.ScanCapReachedreports the bounded exit; the queue stays open.finallyso the ribbon release callback always runs.IQfcDatamodel.QuiesceLoaderAsync), the remaining-queue admission is guarded against nulled fields,QfcDatamodel.Cleanup()is null-safe and idempotent, andButtonCancel_Clickno longer rethrows from anasync voidhandler.null 'this'crash reproduced from the production log.Why
On 2026-09-06 three High Confidence launches logged
First-batch deadline expired ... Accepted=0 Scanned=38|44|42 Deadline=00:00:12and opened empty dialogs even though later items in the same view scored above the cutoff; scan order follows the Explorer view, so the same view reproduced the empty result on every rerun. In the same session a Cancel after an undo burst left the Outlook keyboard unusable with no log output for 37 minutes, and a later Cancel left the background loader running until it crashed withDelegate to an instance method cannot have null 'this'at the admission construction inQfcDatamodel, four seconds after the next launch. Root causes are recorded in the feature folder's issue.md and research artifact: the gate checked the deadline only whileaccepted.Count == 0and returned;Worker_DoWorkwasasync voidwith no retained task, andCleanup()nulled the fields the loader still dereferenced; the Cancel path never reset keyboard state or parked focus and had notry/finally.What Changed
Core feature (QuickFiler):
QuickFiler/Controllers/QfcStreamingDequeueConfidenceGate.cs: checkpoint instead of return;maxScanWithoutAcceptanceandzeroAcceptanceCeilingbounds with internal defaults and an optional constructor seam; launch, checkpoint, and bound log lines.QuickFiler/Interfaces/IQfcDatamodel.cs:QfcDequeueStop.ScanCapReached;DeadlineExpiredretained and documented as advisory;QuiesceLoaderAsync(TimeSpan)declared.QuickFiler/Controllers/QfcDatamodel.QueueProcessing.csandQfcDatamodel.cs: loader task captured;QuiesceLoaderAsync; guarded synchronousTryCreateRemainingQueueAdmission; null-safeCleanup(); internalQuiesceDebugLogtest seam.QuickFiler/Controllers/QfcFormController.EventHandlers.csandQfcFormController.Deactivate.cs: orderedActionCancelAsyncwithRunTeardownStagelogging;ParkFocusAndCancelSelectors()extracted from the Deactivate handler and shared with the Cancel path; no rethrow fromButtonCancel_Click.QuickFiler/Controllers/QfcHomeController.cs:Cleanup()guarded in two blocks, disposes the token source, detaches the worker-completed handler, and invokes the release callback underfinally.Tests (QuickFiler.Test):
QfcStreamingDequeueConfidenceGateTests.Part4.cs,QfcFormControllerCancelTeardownTests.cs,QfcHomeControllerCleanupTests.cs,QfcDatamodelTeardownTests.cs.QfcStreamingDequeueConfidenceGateTests.cs,.Part2.cs,.Part3.cs,QfcQueuePurePathsTests.cs,QfcHomeControllerIterationTests.cs;QuickFiler.Test.csprojgains fourCompileentries.Docs and evidence:
docs/features/active/2026-09-06-quickfiler-high-confidence-cancel-teardown-and-deadline-defects-791/: issue, spec, user story, research, atomic plan (69 tasks checked), runbook for the live-Outlook follow-up, 38 evidence artifacts, and the three review artifacts.Architecture / How It Fits Together
RibbonControllerlaunchesQfcHomeController, which builds aQfcDatamodelwhoseBackgroundWorkerrunsLoadRemainingEmailsToQueueAsyncto fill the master queue whileQfcStreamingDequeueConfidenceGate.DequeueAsyncscores candidates from that queue.RunAsyncloads the accepted batch intoQfcFormController. On Cancel,QfcFormController.ActionCancelAsyncnow drives the teardown in order, awaitsIQfcDatamodel.QuiesceLoaderAsyncthroughIQfcHomeController.DataModelbefore any datamodel field is nulled, and reachesQfcHomeController.Cleanup(), which invokes the ribbon release callback underfinally. No settings surface changes; both bounds are gate-internal constants with a constructor seam, following the #424 precedent.Verification
Completed (from the feature folder evidence, final pass in one uninterrupted loop):
dotnet tool run csharpier format .thendotnet tool run csharpier check .: exit 0, 1587 files.msbuild TaskMaster.sln /t:Rebuild /m /p:Configuration=Debug "/p:Platform=Any CPU" /p:EnableNETAnalyzers=true /p:EnforceCodeStyleInBuild=true: exit 0, 0 warnings, 0 errors.msbuild TaskMaster.sln /t:Rebuild /m /p:Configuration=Debug "/p:Platform=Any CPU" /p:TreatWarningsAsErrors=true: exit 0, 0 warnings, 0 errors.dotnet-coverage collect --output-format cobertura(/InIsolation, LiveOutlook filter): 7023 passed, 0 failed; QuickFiler.Test 1362 passed.Recommended:
runbooks/live-outlook-cancel-teardown-verification.runbook.md(human-interaction exception HI-1): Cancel after an undo burst, keyboard usable, new teardown log lines present, nonull 'this'loader error.Backward Compatibility / Migration Notes
IQfcDatamodelgainsQuiesceLoaderAsync(TimeSpan);QfcDatamodelis the only implementer in the solution.QfcDequeueStopgainsScanCapReached;DeadlineExpiredremains a valid member so existing switch statements and mocks compile.QfcStreamingDequeueConfidenceGategains two optional constructor parameters; existing call sites are unchanged.ButtonCancel_Clicklogs instead of rethrowing.Risks and Mitigations
QfcDatamodelpartials carry a type-level[ExcludeFromCodeCoverage](pre-existing), so 115 new lines there are covered by named tests but not by the coverage metric.SetupDisposal.cs, which was out of scope) and Bug: gate-scan-bound-log-line-content-unasserted #794 (scan-bound log line content not asserted). Rollback is a revert of the single implementation commit plus the test csproj entries.Review Guide
QfcStreamingDequeueConfidenceGate.cs(checkpoint loop and bounds), thenQfcStreamingDequeueConfidenceGateTests.Part4.cs.QfcFormController.EventHandlers.cs(ActionCancelAsyncorder andRunTeardownStage),QfcFormController.Deactivate.cs, thenQfcFormControllerCancelTeardownTests.cs.QfcDatamodel.QueueProcessing.csandQfcDatamodel.cs(quiesce and guarded admission), thenQfcDatamodelTeardownTests.cs.QfcHomeController.csCleanup(), thenQfcHomeControllerCleanupTests.cs..Part2.cs,.Part3.cs,QfcQueuePurePathsTests.cs,QfcHomeControllerIterationTests.cs.Follow-ups
evidence/other/manual-verification.<timestamp>.md.QfcFormController.SetupDisposal.cs.GitHub Auto-close
The PR-context collector ran without GitHub CLI access, so its author-asserted list is unverified and includes non-issue tokens; the single closing reference above is the canonical issue created for this branch and was verified directly with
ghin the authoring session.🤖 Generated with Claude Code
https://claude.ai/code/session_014Hugw6Vwd7q8bopFt4g9KP