Skip to content

test(ios): eliminate Swift concurrency warnings (#154) - #164

Merged
psimaker merged 1 commit into
mainfrom
fix/issue-154-swift-concurrency-warnings
Aug 27, 2026
Merged

test(ios): eliminate Swift concurrency warnings (#154)#164
psimaker merged 1 commit into
mainfrom
fix/issue-154-swift-concurrency-warnings

Conversation

@psimaker

@psimaker psimaker commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Run the doctor-command assertion on the main actor and move mutable settlement state into the existing
actor-isolated test recorder. This removes the two Xcode 26.6 warnings without touching product code or changing
the tested behavior.

Verification:

  • Full Xcode plan: 497 passed, 0 failed, 0 skipped
  • Focused suites: 14 passed
  • Build result: 0 warnings and 0 errors
  • Design-token lint: passed
  • Strings-key parity: passed
  • Independent review: no findings

This is issue-level evidence only. The exact 2.0.2 candidate and its rebuilt XCFramework do not yet exist.

Fixes #154

Summary

  • Removed two Swift concurrency warnings from the iOS test suite.
  • Isolated the doctor-command assertion to the main actor.
  • Moved mutable settlement state into the actor-isolated test recorder.
  • Preserved sync behavior and tested runtime behavior. No product-code, privacy, security, or background-execution changes.

Verification

  • 497 tests passed; 0 failed; 0 skipped.
  • 14 focused tests passed.
  • Build completed with 0 warnings and 0 errors.
  • Design-token lint and strings-key parity checks passed.
  • The 2.0.2 candidate and rebuilt XCFramework are not yet available.

Run the doctor-command assertion on the main actor and keep mutable settlement state in the existing actor-
isolated test recorder. This removes the Xcode 26.6 warnings without changing app runtime code or the asserted
transition.

What could go wrong and why this is safe: moving test state could weaken the settlement-transition coverage.
The test still proves the same true-to-false transition, the complete 497-test plan and focused 14-test run pass,
and the build result contains zero warnings.

Fixes #154
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d6709697-c93f-4458-8b43-ec7d52738bdb

📥 Commits

Reviewing files that changed from the base of the PR and between 6eeb50c and 9fe6cbb.

📒 Files selected for processing (2)
  • ios/VaultSyncTests/RelaySetupDoctorTests.swift
  • ios/VaultSyncTests/ShareAcceptCoordinatorTests.swift

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (5)
  • GitHub Check: Helper Runtime Packaging
  • GitHub Check: Go Tests
  • GitHub Check: M5/M6 Syncthing Transfer E2E
  • GitHub Check: Notify Tests
  • GitHub Check: govulncheck (go bridge)
🧰 Additional context used
📓 Path-based instructions (4)
Focus on Swift 6 strict concurrency, Sendable/MainActor correctness, Task cancellation,

⚙️ CodeRabbit configuration file

Files:

  • ios/VaultSyncTests/RelaySetupDoctorTests.swift
  • ios/VaultSyncTests/ShareAcceptCoordinatorTests.swift
VaultSync syncs private Obsidian notes through Syncthing. Treat data loss,

⚙️ CodeRabbit configuration file

Files:

  • ios/VaultSyncTests/RelaySetupDoctorTests.swift
  • ios/VaultSyncTests/ShareAcceptCoordinatorTests.swift
Build the iOS/iPadOS application with Swift 6 and SwiftUI, targeting iOS/iPadOS 18 or later.

📄 CodeRabbit inference engine (README.md)

Files:

  • ios/VaultSyncTests/RelaySetupDoctorTests.swift
  • ios/VaultSyncTests/ShareAcceptCoordinatorTests.swift
For Swift background execution changes, pass if work is bounded, cancellation-aware, handles expiration callbacks, and records errors without leaking private vault data. Fail only when background work can continue unbounded, miss cleanup, o...

📄 CodeRabbit inference engine (Custom checks)

Files:

  • ios/VaultSyncTests/RelaySetupDoctorTests.swift
  • ios/VaultSyncTests/ShareAcceptCoordinatorTests.swift
🔇 Additional comments (3)
ios/VaultSyncTests/RelaySetupDoctorTests.swift (1)

7-8: LGTM!

ios/VaultSyncTests/ShareAcceptCoordinatorTests.swift (2)

18-18: LGTM!


148-156: LGTM!


📝 Walkthrough

Walkthrough

The changes update two iOS tests. One test gains main-actor isolation. Another moves mutable settlement state into its recorder helper. Both test names reference issue #154.

Changes

iOS test concurrency cleanup

Layer / File(s) Summary
Update test isolation and state handling
ios/VaultSyncTests/RelaySetupDoctorTests.swift, ios/VaultSyncTests/ShareAcceptCoordinatorTests.swift
The doctor test is marked @MainActor. The share-acceptance test stores settlement state on Recorder and toggles that state between confirmations.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 9fe6c

This change removes Swift concurrency warnings from iOS tests while preserving the tested behavior, with no actionable merge-blocking risk remaining after normal checks and review.

Poem

Two tests align with actors bright
A recorder keeps its state in sight
Consent reruns, then checks anew
Warnings fade from the review queue
Small changes keep the suite in flight

🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title uses a concise conventional-commit format and accurately describes the removal of Swift concurrency warnings in iOS tests.
Linked Issues check ✅ Passed The changes address issue #154 by adding main-actor isolation to the doctor test and moving mutable settlement state into the actor-isolated recorder. The changes preserve product code and tested beha…
Out of Scope Changes check ✅ Passed The changes are limited to the two test files named in issue #154. No unrelated product or feature changes are present.
No Private Note Leakage ✅ Passed PASS — The diff only adds test annotations, issue references, and the in-memory Recorder.settled property. It adds no logging, analytics, diagnostics, crash reporting, or network requests. No protec…
Bounded Ios Background Work ✅ Passed PASS: The pull request changes only two iOS test files. The diff adds @MainActor annotations, a test Recorder property, and test naming updates. It changes no Swift background execution APIs, task han…
Bridge Contract Compatibility ✅ Passed PASS — The check is not applicable to this pull request. The commit changes only two Swift test files. The changes add @MainActor, add test-title text, and move test-only settlement state into `Reco…
Full details: Linked Issues check

Explanation

The changes address issue #154 by adding main-actor isolation to the doctor test and moving mutable settlement state into the actor-isolated recorder. The changes preserve product code and tested behavior.

Full details: No Private Note Leakage

Explanation

PASS — The diff only adds test annotations, issue references, and the in-memory Recorder.settled property. It adds no logging, analytics, diagnostics, crash reporting, or network requests. No protected note, path, filename, token, key, bookmark, or receipt data enters a new output or request path.

Full details: Bounded Ios Background Work

Explanation

PASS: The pull request changes only two iOS test files. The diff adds @MainActor annotations, a test Recorder property, and test naming updates. It changes no Swift background execution APIs, task handlers, expiration callbacks, cancellation paths, cleanup, or vault-data handling. The bounded background-work check is therefore not applicable, and no stated failure condition is introduced.

Full details: Bridge Contract Compatibility

Explanation

PASS — The check is not applicable to this pull request. The commit changes only two Swift test files. The changes add @MainActor, add test-title text, and move test-only settlement state into Recorder. No Go bridge, Swift bridge service, gomobile-compatible type, JSON response shape, empty-string success convention, or bridge contract test changed.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issue-154-swift-concurrency-warnings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@psimaker
psimaker merged commit 4ddc4ad into main Aug 27, 2026
19 checks passed
@psimaker
psimaker deleted the fix/issue-154-swift-concurrency-warnings branch August 27, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(ios): eliminate Swift concurrency warnings in test suite

1 participant