COR-173 - Interrupt IMAP command on cancel - #101
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5e3105d. Configure here.
| $windowsSdkBin = "C:\Program Files (x86)\Windows Kits\10\bin\$($toolchain.windowsSdk)\x64" | ||
| $cmakeBin = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin" | ||
| $ninjaBin = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja" | ||
| $env:Path = "$swiftBin;$msvcBin;$windowsSdkBin;$cmakeBin;$ninjaBin;$env:Path" |
There was a problem hiding this comment.
Toolchain ignores pinned Swift version
Medium Severity
Initialize-Toolchain puts the first clang-cl.exe under Programs\Swift\Toolchains on PATH, not the version in windows-build-pins.json. The publish preflight only checks that the pinned platform exists. A machine with more than one Swift can compile the archive with a different toolchain than the digest claims.
Reviewed by Cursor Bugbot for commit 5e3105d. Configure here.
mailcore2-windows-0a7de371ed29.zip, already on the release, carries an MCIMAPAsyncConnection.h from the COR-180 branch: it declares setReserved, isReserved, setAutomaticDisconnectDelay and automaticDisconnectDelay, none of which are in the mailcore2.dll beside it. It is the only one of the 132 shipped headers that public-headers.cmake does not declare. src/CMakeLists.txt stages the public headers into the CMake binary directory with file(COPY) and installs that directory whole. file(COPY) adds but never prunes, so the header stayed behind from a build of another branch and was packaged. Publish cleaned the install tree and the staging copy but not the build directory, so: - the build directory is now cleaned too, which is what actually stops it; - the archive check no longer requires MCIMAPAsyncConnection.h. That line came over from COR-180 with the release-assets work, but this branch does not make the header public and spark2 never did - so the check was passing only by finding the stale copy. It now requires MailCore.h, which public-headers.cmake has always declared. The digest does not cover the publish script, so the archive keeps its name: re-publish 0a7de371ed29 with -Force to replace the contaminated one. Reported by Cursor Bugbot on the closed PR #101; the header it named there was the C one, which this branch does not have. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>


Note
High Risk
Changes live IMAP async teardown (stream cancel leaves the session unusable until reconnect) and shifts Windows C++ delivery to digest-named release assets—missing or mismatched prebuilts will block Spark Windows builds until someone publishes on Windows.
Overview
Adds
interruptCurrentCommand()so a running IMAP operation can abort its blocked socket read (viamailstream_cancel) instead of waiting on the timeout—wired throughOperationQueue’s running-op tracking,IMAPSession, C/Swift bindings, and Darwin unit tests with a silent TCP stub.Separately replaces the numbered S3 Windows prebuilt flow with content-addressed
mailcore2-windows-<digest>.zipassets on thewindows-prebuiltGitHub release: newwindows-build-pins.json, shared PowerShell (Prebuilt-Common.ps1,Publish-Mailcore2Prebuilt.ps1,Check-PrebuiltPublished.ps1,Build-Helpers.ps1), updatedGet-Mailcore2.ps1/Build-Mailcore2.ps1, a PR check job that verifies the merge-result digest has a published archive, plus README and AGENTS.md for the manual publish path.Reviewed by Cursor Bugbot for commit 5e3105d. Bugbot is set up for automated code reviews on this repo. Configure here.