Unsynchronised statics and an unbalanced security scope #218

open cmc opened this on 2026-11-22 07:11 UTC · feature · milestone Backlog

Discussion

cmc 2026-11-22 07:11 UTC

Severity: Low.

Theme.blockBackground, selection and focusedLayouts are nonisolated(unsafe), written on the main actor and read by layout fragments (Sources/OrgEditorAppKit/Theme.swift:73-77); UserConfig.directoryOverride is reassigned on each iOS config reload (Sources/OrgApp/UserConfig.swift:12, Sources/OrgstarMobile/MobileModel.swift:127). WorkspaceRoot.resolve() calls startAccessingSecurityScopedResource() with no matching stop (Sources/OrgWorkspace/Discovery.swift:22). Guard the statics with a lock and keep the first resolved URL.

From the performance review, docs/review-2026-11-21.md (#96).

Platforms: macOS, iOS.