Skip to content

Discussion: concurrency direction — GCD TaskManager vs async/await - #8

Merged
zigdanis merged 6 commits into
masterfrom
discuss/concurrency-direction
Aug 3, 2026
Merged

Discussion: concurrency direction — GCD TaskManager vs async/await#8
zigdanis merged 6 commits into
masterfrom
discuss/concurrency-direction

Conversation

@zigdanis

@zigdanis zigdanis commented Jun 7, 2026

Copy link
Copy Markdown
Owner

What

Adds migrations/07-concurrency-direction.md — a discussion / decision doc, not an implementation ticket. Use this PR thread to pick a direction; an implementation ticket follows once a box is checked.

The question

Background work goes through a hand-rolled TaskManagerOnGCD (DispatchQueue + DispatchGroup). The current implementation is quietly buggy: it swallows thrown errors (try? task()), creates a DispatchGroup it never waits/notifies on, and its typealias Task now clashes with Swift's _Concurrency.Task.

Options

  • A — Keep & fix the GCD TaskManager (smallest change)
  • B — Migrate to async/await (structured concurrency, real error propagation, cancellation) — recommended
  • C — Hybrid/incremental, then retire TaskManager

Recommendation leans B, since the deployment-target bump (#5) and SwiftUI migration (#3) both pair naturally with async/await. Noting your stated preference not to keep DispatchGroup over async/await — this doc just confirms scope/sequencing before committing.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added a Russian-language, responsive and print-friendly migration plan for adopting async/await through staged pull requests.
    • Documented implementation sequencing, validation steps, risks, open questions, and relevant reference materials.
    • Added a decision document comparing improvements to the current approach, Swift Concurrency, and a hybrid migration path.
    • Clarified concurrency behavior, including task operations, error handling, and recommended migration considerations.

@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@zigdanis, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 39 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ac4ac152-243e-45ac-a6ff-386417db26b8

📥 Commits

Reviewing files that changed from the base of the PR and between a1374ec and 6d0d874.

📒 Files selected for processing (2)
  • .coderabbit.yaml
  • docs/concurrency-migration-plan.html
📝 Walkthrough

Walkthrough

Adds documentation for choosing Swift Concurrency, planning the migration through stacked pull requests, defining persistence operation semantics, and verifying the migration workflow.

Changes

Concurrency migration documentation

Layer / File(s) Summary
Migration decision and plan foundation
migrations/07-concurrency-direction.md, docs/concurrency-migration-plan.html
Documents the current GCD TaskManager, migration alternatives, recommended direction, migration goals, and the responsive HTML page structure.
Stack design and execution
docs/concurrency-migration-plan.html
Defines the five-level PR structure and the GitHub Stack workflow for creation, publication, review fixes, and bottom-up merging.
Operation semantics and verification
docs/concurrency-migration-plan.html
Specifies Add, Edit/replace, and Remove behavior, rollback and cleanup handling, validation criteria, risks, open questions, and official references.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: documenting the decision between the existing GCD TaskManager and Swift async/await.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch discuss/concurrency-direction

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.

zigdanis added a commit that referenced this pull request Jun 12, 2026
- IPHONEOS_DEPLOYMENT_TARGET = 18.0 on app, Core, Widget and test targets;
  objectVersion 50 -> 56, LastUpgradeCheck -> 2600 (Xcode 26)
- Remove availability guards now dead under the iOS 18 floor:
  iOS 11 placeholder fallback (PersonOverview), iOS 12 userInterfaceStyle
  guard (UIColor+Extensions), iOS 17 containerBackground shim (Widget)
- Replace deprecated topLayoutGuide with safeAreaLayoutGuide
- protocol X: class -> AnyObject across all protocols
- Delete dead Obfuscator.swift plus its commented-out call sites and
  obfuscated constants in Logging/Constants
- Readme requirements: iOS 18.0+

SWIFT_VERSION stays 5.0: Swift 6 language mode hinges on the concurrency
direction discussed in PR #8, so it is deferred there.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/concurrency-migration-plan.html`:
- Line 393: Update the 8A–8C guidance in the list item to explicitly instruct
creating draft PRs: either mark each PR as draft in the interactive gh stack
submit editor or use gh stack submit --auto without --open, reserving --open for
PRs intended to be ready for review.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c29b42d7-0b8a-43fc-86bb-4a475186f4ff

📥 Commits

Reviewing files that changed from the base of the PR and between 818631c and 1a5b577.

📒 Files selected for processing (2)
  • docs/concurrency-migration-plan.html
  • migrations/07-concurrency-direction.md

Comment thread docs/concurrency-migration-plan.html Outdated
zigdanis and others added 3 commits August 1, 2026 21:46
A decision doc (not an implementation ticket) laying out options for the
GCD TaskManager: keep & fix, migrate to async/await, or hybrid. Implemen-
tation ticket follows once a direction is chosen.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@zigdanis
zigdanis force-pushed the discuss/concurrency-direction branch from 1a5b577 to a1374ec Compare August 1, 2026 19:01
@zigdanis

zigdanis commented Aug 1, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/concurrency-migration-plan.html`:
- Line 235: Update docs/concurrency-migration-plan.html at lines 235-235,
384-384, and 391-391: describe stacked pull requests as a public preview, retain
only the repository feature-availability check at the account-access
verification site, and state that the public-preview feature may change in the
risk text.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b5b9f288-a42c-40a3-a8d5-e4c112bd9481

📥 Commits

Reviewing files that changed from the base of the PR and between c3eb205 and a1374ec.

📒 Files selected for processing (2)
  • docs/concurrency-migration-plan.html
  • migrations/07-concurrency-direction.md

Comment thread docs/concurrency-migration-plan.html Outdated
@zigdanis
zigdanis merged commit aef4c3b into master Aug 3, 2026
6 checks passed
@zigdanis
zigdanis deleted the discuss/concurrency-direction branch August 3, 2026 13:20
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.

1 participant