Skip to content

Keep iOS Iroh connections alive through stalls and traffic bursts - #12411

Merged
azooz2003-bit merged 19 commits into
mainfrom
feat-ios-iroh-connection-authority
Sep 15, 2026
Merged

azooz2003-bit merged 19 commits into
mainfrom
feat-ios-iroh-connection-authority

Conversation

@azooz2003-bit

@azooz2003-bit azooz2003-bit commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator

iOS could reconnect while its Iroh connection remained usable: application pong deadlines, stalled writes, event queue overflow, failed network refreshes, and large batches of valid messages could all trigger teardown.

Use native Iroh connection state for liveness decisions. Keep unfinished control frames serialized until their writes complete or fail, repair optional streams independently, and retain the session after failed application probes. Native dead-peer detection, required control-stream failure, and authorization rejection still drive recovery.

Event pressure now retains ordered events and sheds recoverable refresh frames. RPC overload returns server_busy for the affected request. Framing drains bounded batches and applies size limits per message, so a read containing many valid messages or the tail of one large message cannot trigger teardown. Ordered-event memory can grow during prolonged congestion, an intentional tradeoff to preserve delivery without disconnecting.

Validation on the Mac fleet: 194 RPC tests, 4 framing tests, 6 live QUIC tests, and 44 shell recovery/liveness tests passed. The stalled-write, missing-pong, foreground-age, and coalesced-frame-tail regressions failed before their fixes. All 109 host authorization tests passed on the final head (run); the ordered-input hosted run also passed (run). Matching tagged Mac and iOS apps were built. A measured one-hour proactive desktop workload soak completed with 113 terminal passes (16 harness records adjudicated), 69 browser passes, and 73 quiet-workspace passes. There were no failed host status calls. Three early browser records are metadata-only harness failures, and one deliberate reload batch remains recorded as a harness timing failure. Authenticated iOS coverage is blocked because all seven relays reject freshly minted credentials as invalid token; an isolated native probe reproduced the rejection after successful registration and token minting. Deployed relay key, endpoint identity, DNS forwarding, and native token plumbing were verified; per-probe relay-log correlation remains unavailable. This is not a live iOS stability pass.

Also corrects a pre-existing compile error in panel cleanup by calling clearCloudMaterializationFailure(surfaceID:) instead of accessing another file's private storage.

@vercel

vercel Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cmux166 Ready Ready Preview Sep 13, 2026 2:08am UTC
cmux41 Ready Ready Preview Sep 13, 2026 2:08am UTC

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@azooz2003-bit
azooz2003-bit marked this pull request as ready for review September 15, 2026 19:39
@azooz2003-bit
azooz2003-bit merged commit b9fbbe4 into main Sep 15, 2026
13 of 14 checks passed
@azooz2003-bit
azooz2003-bit deleted the feat-ios-iroh-connection-authority branch September 15, 2026 19:39
@austinywang austinywang mentioned this pull request Sep 15, 2026
rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 15, 2026
f5da007 Bump version to 0.64.24 (manaflow-ai#12698)
b9fbbe4 Keep iOS Iroh connections alive through stalls and traffic bursts (manaflow-ai#12411)
1bbb37e Guard production IROH v2 deploy against Stack Auth drift (manaflow-ai#12686)
9314041 Fix recursive Codex autoresume after nightly regression (manaflow-ai#12697)

# Conflicts:
#	.github/workflows/ci.yml
teamleaderleo added a commit that referenced this pull request Sep 25, 2026
- networkChangeKeepsLegacyNoStoreConnectionAvailable: a no-store network
  change only resyncs, and 57ec73a keeps an already-connected session from
  being demoted to reconnecting while the subscription ACK is in flight.
  Expect .connected.
- operationFailurePreservesOpenIrohConnection: the sequenced test transport
  did not expose CmxByteTransportLivenessObserving, so isTransportClosed
  returned nil and recoverDeadConnection treated the live transport as dead.
  Add an opt-in observing wrapper, as production Iroh transports conform.
- hungRedialSettlesAtDeadlineAndUnfreezesRecovery: since #12411
  recoverDeadConnection only redials a natively closed transport. Close the
  live transport before the trigger so the hung redial is exercised.

Refs #14689

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants