Skip to content

ci(next): check-concurrency refuses a generic main-actor class with no nonisolated deinit (the #23050 Release crash) - #23361

Merged
teamleaderleo merged 7 commits into
feat-cmux-nextfrom
cmux/generic-deinit-guard
Oct 21, 2026
Merged

teamleaderleo merged 7 commits into
feat-cmux-nextfrom
cmux/generic-deinit-guard

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

A crash-class rule so #23050's Release-compile crash can't come back (coord-deputy, 2026-10-21).

Out of scope: generic classes in non-UI targets

These 6 have no nonisolated deinit and sit in targets that aren't main actor by default, so the rule leaves them alone (base 4a6ef5b):

  • CmuxNextCompat/Mutex.swift:44 LockedStorage<Value: ~Copyable>
  • CmuxNextCompat/ObservedItems.swift:5 @MainActor public final class ObservedItems<Model, Item>
  • CmuxNextCompat/ObservedMap.swift:15 ObservedMap<Key, Value>
  • CmuxNextControl/Concurrency/ControlDeadline.swift:44 Race<T>
  • CmuxNextServerHelper/ServerHelperDeadline.swift:44 Race<T>
  • CmuxNextWakeups/FirstOutcome.swift:6 FirstOutcome<Value>

(My first count to coord-deputy said 7; it is 6.) ObservedItems is explicitly @MainActor but lives in CmuxNextCompat, a non-UI target, so it's outside the rule's stated scope. The 5 generic classes in UI targets already declare nonisolated deinit: ImmediateRun, FirstMouseHostingView, CEFReplyWaiters, and the Once in BrowserHistoryWriter and in PageCallDeadline.

Testing

Observed / Not run

  • Observed: the two script runs above.
  • Not run here: the fixture test itself (running test files is blocked on this Mac); CI's crash-class job runs it on both commits.

Changelog

none

Agent session: cosmic-gray

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Adds a crash-class rule to check-concurrency.sh so #23050's Release-compile crash can't come back: a generic main-actor class in a UI target must declare nonisolated 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.

Written for commit d0fef77. Summary will update on new commits.

View guided diff Turn on auto-fix

…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
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by claude-sr2/pane-toolbar on cosmic-gray · session

@teamleaderleo teamleaderleo added the risk:low Risk tier (docs/ci/risk-tiers.md) label Oct 21, 2026
…eric-deinit-guard

# Conflicts:
#	tests/test-execution.toml
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review d0fef77: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr23361 -f ref=cmux/generic-deinit-guard -f platform=macos -f backend_mode=local

red: cmux-next checks (god files, concurrency, crash safety, l10n); base red: the same failure on the base bc5becd; does not block

@blacksmith-sh

blacksmith-sh Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Found 6 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpmn_gr4ja/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpolm83lms/summary-fail.json (live):/summary-fail.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…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
@cursor

cursor Bot commented Oct 21, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot 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.

mikelbai2 and others added 2 commits October 21, 2026 04:59
…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
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-144pj created for this PR by the cmux coordinator.

mikelbai2 and others added 2 commits October 21, 2026 05:01
…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
@cursor

cursor Bot commented Oct 21, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot 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.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / defaults-snapshot is red on 15 of 15 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@teamleaderleo
teamleaderleo merged commit 8edc2c9 into feat-cmux-next Oct 21, 2026
@teamleaderleo
teamleaderleo deleted the cmux/generic-deinit-guard branch October 21, 2026 15:28
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:low Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants