Skip to content

fix(desktop): add missing OmiSupport import in FocusAssistant#10556

Open
Git-on-my-level wants to merge 2 commits into
BasedHardware:mainfrom
Git-on-my-level:fix/focusassistant-missing-omisupport-import
Open

fix(desktop): add missing OmiSupport import in FocusAssistant#10556
Git-on-my-level wants to merge 2 commits into
BasedHardware:mainfrom
Git-on-my-level:fix/focusassistant-missing-omisupport-import

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes a Swift compile break on main introduced by #10523 (SCA-103: add macOS failure diagnostic context): FocusAssistant.swift references DesktopLocalProfile.applicationSupportURL() but the file only imports Foundation. DesktopLocalProfile lives in the separate OmiSupport module, so the Swift build fails with cannot find 'DesktopLocalProfile' in scope.

Adds the missing import OmiSupport — the exact pattern every other source file under Sources/ follows when it references DesktopLocalProfile.

Failure-Class: none

Root cause

Commit d0215a4 (merged via #10523) added this diagnostics call to FocusAssistant.swift:

context: StorageFailureDiagnostics.context(
  pathClass: "goals-db",
  containingURL: DesktopLocalProfile.applicationSupportURL(),  // ← DesktopLocalProfile
  databaseURL: nil,
  error: error,
  appIsTerminating: RewindDatabase.isTerminationInProgress))

StorageFailureDiagnostics and RewindDatabase live under Sources/Rewind/Core/ — same Omi Computer target as FocusAssistant, so no import is needed for them. But DesktopLocalProfile is declared in Sources/OmiSupport/DesktopLocalProfile.swift, a separate SwiftPM target (OmiSupport). FocusAssistant.swift had only import Foundation. Every other file that references DesktopLocalProfile (12 files: RewindDatabase.swift, RewindStorage.swift, AgentRuntimeProcess.swift, AuthService.swift, OmiApp.swift, etc.) includes import OmiSupport.

Why main's CI stayed green

The Desktop Swift CI workflow path-filters its build step on Swift file changes. Non-Swift commits to main (recent backend/sync/users fixes) skip the build, so the break only surfaces on PRs whose diff or PR-head context triggers the full Swift build — currently blocking #10540, #10543, and any other PR whose Desktop Swift CI runs.

Verification

  • xcrun swiftc -parse FocusAssistant.swift — passes (exit 0, no errors)
  • Desktop changelog gate — passes (internal-only fix, no changelog entry required)
  • The added import matches the established convention (12 existing call sites)

Test plan

  • Desktop Swift Static & Test Contracts passes
  • Desktop Swift Build & Tests passes

Review in cubic

BasedHardware#10523 added a DesktopLocalProfile.applicationSupportURL() reference to
FocusAssistant.swift's goals-load error path, but the file only imported
Foundation. DesktopLocalProfile lives in the separate OmiSupport SwiftPM
target, so the build fails with "cannot find 'DesktopLocalProfile' in scope"
on every PR whose Desktop Swift CI runs the build. Main's own CI stayed green
because non-Swift commits path-filter the build step.

Adds import OmiSupport — the exact pattern every other source file that
references DesktopLocalProfile already follows (12 call sites).

Failure-Class: none
The same SCA-103 diagnostics effort (commit d0215a4 + 7038f0c) left
two further Swift compile errors that CI surfaces once the full build runs:

- RewindIndexer.swift references DesktopLocalProfile.applicationSupportURL()
  but only imports Foundation. Add import OmiSupport, matching every other
  file that references DesktopLocalProfile (same root cause as FocusAssistant).
- DesktopErrorDiagnosticContext holds [String: Any] and is returned across an
  actor boundary (AgentRuntimeProcess.consumePendingStartFailureDiagnostics),
  so it must conform to Sendable. Mark it @unchecked Sendable, the established
  codebase pattern for Any-bearing value types (RuntimeJSONPayloadBox,
  AnySendableBox, ConversationCacheWriteScope).

These are the remaining two compile errors blocking Desktop Swift Build & Tests;
without them the FocusAssistant import alone does not restore a green build.

Failure-Class: none
@Git-on-my-level
Git-on-my-level force-pushed the fix/focusassistant-missing-omisupport-import branch from 4142949 to ede7dd6 Compare July 25, 2026 16:17
@Git-on-my-level

Copy link
Copy Markdown
Collaborator Author

Monitor run — completed remaining SCA-103 compile-break fixes

The original PR fixed the missing import OmiSupport in FocusAssistant.swift. CI showed two further Swift compile errors from the same SCA-103 diagnostics effort (commits d0215a40a0 + 7038f0cb04, already on main) that surfaced once the full Desktop Swift build ran:

  • RewindIndexer.swift — same missing import OmiSupport for DesktopLocalProfile.applicationSupportURL() (identical root cause).
  • Logger.swift / DesktopErrorDiagnosticContext — not Sendable, returned cross-actor from AgentRuntimeProcess.consumePendingStartFailureDiagnostics(). Marked @unchecked Sendable, the established codebase pattern for Any-bearing value types (RuntimeJSONPayloadBox, AnySendableBox, ConversationCacheWriteScope).

Both are in-scope: without them the FocusAssistant import alone does not restore a green build, which is this PR's stated goal.

Verification: xcrun swiftc -parse passes on all three changed files; git diff --check clean; no remaining files reference DesktopLocalProfile without import OmiSupport.

CI result after push: the three Swift compile errors are resolved — the build now compiles. The remaining check failures are pre-existing test assertion failures from SCA-103 feature code already on main (never ran before because the compile break masked them):

  • DesktopDiagnosticsManagerTests — beta trail path_class is nil (diagnostic values not merged into trail snapshot).
  • DesktopErrorTelemetryTests — expects snake_case handshake_timed_out but the StartFailure enum's rawValue is camelCase handshakeTimedOut.
  • RewindStorageErrorClassificationTests — source-inspection test expects exact logError(..., error: error) but SCA-103 added context: parameters.

These three test failures and the test-test-install-workflow-contract.sh YAML failures are unrelated to this PR's diff (3 source files only) and exist on main independently.

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

Labels

no-changelog-needed Skip desktop changelog enforcement for internal-only changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant