Repository navigation
ci(next): check-concurrency refuses a generic main-actor class with no nonisolated deinit (the #23050 Release crash) - #23361
Conversation
…onisolated deinit (red) #23050's FirstMouseHostingView, a generic NSHostingView subclass in a uiSwiftSettings target, had an implicit isolated deinit that crashed the Release compile's optimizer (fixed in #23233). This fixture test expects check-concurrency.sh to refuse that shape; the rule comes next. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15ba2-4ce2-7e02-8fa2-5cd34f7648b1&host=cosmic-gray
|
Owned by claude-sr2/pane-toolbar on cosmic-gray · session |
…eric-deinit-guard # Conflicts: # tests/test-execution.toml
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
red: cmux-next checks (god files, concurrency, crash safety, l10n); base red: the same failure on the base bc5becd; does not block |
|
Found 6 test failures on Blacksmith runners: Failures
|
…o nonisolated deinit In a uiSwiftSettings target a generic class's implicit deinit is isolated, and the Release compile's optimizer crashes on it (EarlyPerfInliner, swift-frontend 6.3, macOS 14 target): #23050's FirstMouseHostingView broke every Release compile until #23233, the same crash #20408 fixed before. The crash-class rule now requires `nonisolated deinit` there (a reviewed `// concurrency-allow:` escapes it). Non-UI targets stay out of scope. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15ba2-4ce2-7e02-8fa2-5cd34f7648b1&host=cosmic-gray
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
…eric-deinit-guard
…te; braces in strings don't end a class Base registered tests/test_crash_class_fast_gate.py (#23352) after the pre-commit hook had registered it on this branch, so keep base's entry only. Review: declares_nonisolated_deinit counted a "}" in a string literal; it now scans main_actor_scope.strip(line), and the header names the rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15ba2-4ce2-7e02-8fa2-5cd34f7648b1&host=cosmic-gray
|
Bead |
…r names it Review: declares_nonisolated_deinit counted a "}" in a string literal and ended the class before its deinit. Scan main_actor_scope.strip(line), as the scope scan does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15ba2-4ce2-7e02-8fa2-5cd34f7648b1&host=cosmic-gray
…eric-deinit-guard
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
|
|
Shipped in:
|
Summary
A crash-class rule so #23050's Release-compile crash can't come back (coord-deputy, 2026-10-21).
scripts/cmux-next/check-concurrency.sh: in auiSwiftSettingstarget (main actor by default), a generic class must declarenonisolated deinit. Without one its implicit deinit is isolated, and the Release compile's optimizer crashes on it (EarlyPerfInliner onFirstMouseHostingView's deinit, swift-frontend 6.3, macOS 14 target). cmux NEXT browser: Downloads popup under its toolbar button, draggable rows; Chromium's bubble off #23050 (7d2ee97) added that class, every Release compile failed withcompiler crash while optimizing 'deinit'until cmux-next: the Release compile no longer crashes on FirstMouseHostingView's deinit #23233 (230cc72) addednonisolated deinit {}, and fix(cmux-next): Release compile crash on main-actor generic class deinits (macOS 14 target) #20408 fixed the same crash before. A reviewed// concurrency-allow: <why>escapes the rule, like the file's other rules.cmux-next-crash-class.yml) blocks on it, and the pre-push gate and thecmux-next checksjob run it with the rest of the file.tests/test_check_concurrency_generic_deinit.pyruns the script on a fixture package with a UI and a non-UI target. Cases: cmux NEXT browser: Downloads popup under its toolbar button, draggable rows; Chromium's bubble off #23050's exact shape, red; withnonisolated deinit, green; in a non-UI target, green; an inner type's deinit doesn't count, red; the reviewed escape, green. The crash-class workflow runs it.Out of scope: generic classes in non-UI targets
These 6 have no
nonisolated deinitand sit in targets that aren't main actor by default, so the rule leaves them alone (base 4a6ef5b):CmuxNextCompat/Mutex.swift:44LockedStorage<Value: ~Copyable>CmuxNextCompat/ObservedItems.swift:5@MainActor public final class ObservedItems<Model, Item>CmuxNextCompat/ObservedMap.swift:15ObservedMap<Key, Value>CmuxNextControl/Concurrency/ControlDeadline.swift:44Race<T>CmuxNextServerHelper/ServerHelperDeadline.swift:44Race<T>CmuxNextWakeups/FirstOutcome.swift:6FirstOutcome<Value>(My first count to coord-deputy said 7; it is 6.)
ObservedItemsis explicitly@MainActorbut lives in CmuxNextCompat, a non-UI target, so it's outside the rule's stated scope. The 5 generic classes in UI targets already declarenonisolated deinit:ImmediateRun,FirstMouseHostingView,CEFReplyWaiters, and theOnceinBrowserHistoryWriterand inPageCallDeadline.Testing
CHECK_CONCURRENCY_ONLY=crash-class scripts/cmux-next/check-concurrency.sh:BrowserDownloadsPopup.swiftfrom 7d2ee97 (cmux NEXT browser: Downloads popup under its toolbar button, draggable rows; Chromium's bubble off #23050):Sources/CmuxNextApp/Handlers/BrowserDownloadsPopup.swift:459: generic main-actor class with no nonisolated deinit, exit 1.check-concurrency: ok), and the full check (noCHECK_CONCURRENCY_ONLY) is green too.Observed / Not run
Changelog
none
Agent session: cosmic-gray
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Adds a crash-class rule to
check-concurrency.shso #23050's Release-compile crash can't come back: a generic main-actor class in a UI target must declarenonisolated deinit, since its implicit isolated deinit crashes the Release optimizer (fixed in #23233, previously #20408). A reviewed// concurrency-allow:escapes the rule, and non-UI targets stay out of scope.tests/test-execution.toml.Written for commit d0fef77. Summary will update on new commits.