Repository navigation
fix(tests): nonisolated deinit for MainActor back-deploy crash - #104
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
MarketplaceViewModelTests sync construction hit malloc on iOS 26.2 MainActor isolated-deinit back-deployment (swiftlang/swift#87316), same class of bug as UserPreferences/ProfileViewModel. Empty nonisolated deinit on ViewModels/MockRepositories is the root fix; keep a sync release probe and source hygiene guard. Co-authored-by: Cursor <cursoragent@cursor.com>
The deinit insertion landed inside the parameter list and broke the simulator build; move it after the complete initializer. Co-authored-by: Cursor <cursoragent@cursor.com>
Pigbibi
force-pushed
the
fix/marketplace-mainactor-test-hygiene
branch
from
November 13, 2026 15:38
534fc89 to
c3082ca
Compare
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.
改动内容
根治
MarketplaceViewModelTests的 malloc 崩溃:在无自定义清理的 ViewModel / MockRepository 上补充nonisolated deinit {},并保留同步释放回归探针与 Marketplace 源码护栏。不改会怎样
在
SWIFT_DEFAULT_ACTOR_ISOLATION=MainActor+ iOS 26.2 isolated-deinit back-deployment 下,同步构造/释放仍可能触发malloc: pointer being freed was not allocated;仅把用例改 async 只是绕过。怎么验证的
检查清单
local.properties或环境配置文件涉及隐私、权限或数据流的改动
不涉及。
关联 Issue
无。对应 untangle 剩余项「MarketplaceViewModelTests 崩溃排查」。
AI 辅助
Cursor(Composer)协助根因分析与批量补
nonisolated deinit。风险
低。空
nonisolated deinit与既有ProfileViewModel/SessionState修法一致;BindPhoneViewModel等有真实清理逻辑的 deinit 未改。