Skip to content

fix(swift-ios): let worktree setup finish before retrying - #11704

Merged
t3dotgg merged 1 commit into
t3code/rebuild-mobile-app-swiftfrom
t3code/swift-worktree-bootstrap-safety
Sep 14, 2026
Merged

t3dotgg merged 1 commit into
t3code/rebuild-mobile-app-swiftfrom
t3code/swift-worktree-bootstrap-safety

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Sep 14, 2026

Copy link
Copy Markdown
Member

The server now waits for a worktree setup script before starting the first turn. SwiftUI still stopped every request after 30 seconds. Its recovery could then send a bare turn into an empty thread while setup or cleanup was still running.

Worktree bootstrap requests now wait for their reply without the normal response deadline. Connection waits, socket sends, keepalive, disconnect handling, cancellation, and ordinary RPC deadlines stay in place. Recovery accepts a committed original message but never sends a bare turn for a worktree bootstrap. The server owns worktree cleanup, and uncertain attempts keep their stable identity.

No setup UI, wire changes, or server changes. This fixes SwiftUI compatibility with #11372.

Validation: All 32 focused native tests passed on this head. The deadline test advances a controlled clock. Other cases cover cancellation, disconnects, bounded socket sends, empty worktree recovery, committed-message recovery, and stable retry IDs. Swift parse and git diff checks pass. No device performance or layout claim.

Created with Codex.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.6 KiB 15.1 KiB
Codex Thread snapshot wire 7.0 KiB 7.3 KiB
Codex Live turn WebSocket wire 6.6 KiB 7.8 KiB
Codex Live turn WebSocket decoded 57.1 KiB 66.4 KiB
Codex Live turn messages 10 21
Claude Total thread wire 13.6 KiB 15.1 KiB
Claude Thread snapshot wire 7.1 KiB 7.3 KiB
Claude Live turn WebSocket wire 6.6 KiB 7.8 KiB
Claude Live turn WebSocket decoded 57.9 KiB 66.4 KiB
Claude Live turn messages 10 21

Baseline: unavailable · PR result: 2eb0335 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 113.9 KiB
  • Claude decoded thread snapshot: 114.6 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@macroscopeapp

macroscopeapp Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 2eb0335

Macroscope's review found this PR approvable — This is a focused Swift iOS reliability fix for existing worktree bootstrapping, with standard RPC behavior preserved and cancellation/disconnect handling tested. The production changes are localized and do not alter product defaults, schemas, or deployment behavior.

You can add or adjust custom eligibility rules. Learn more.

@t3dotgg
t3dotgg merged commit c6e5850 into t3code/rebuild-mobile-app-swift Sep 14, 2026
21 checks passed
@t3dotgg
t3dotgg deleted the t3code/swift-worktree-bootstrap-safety branch September 14, 2026 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant