Skip to content

fix adapter cancellation ownership races - #375

Merged
momics merged 1 commit into
mainfrom
codex/release-0.6-tauri-lifecycle
Jul 18, 2026
Merged

fix adapter cancellation ownership races#375
momics merged 1 commit into
mainfrom
codex/release-0.6-tauri-lifecycle

Conversation

@momics

@momics momics commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • replay an early Tauri stopServe() after native serve registration so lifecycle shutdown cannot be lost
  • give each pathChanges() iterator an adapter subscription ID and use one token-aware core watcher to fan out per peer
  • make unsubscribe and endpoint cleanup ownership-scoped across Node, Deno, and Tauri
  • add regressions for pre-registration aborts, overlapping observers, rapid resubscribe, and early Tauri serve shutdown

Why

The exact-SHA extended run for c828112 exposed two bridge scheduling races: Tauri could lose a stop before serve registration, and Node could lose an abort before the native path subscription existed. A first adapter-only ownership pass was rejected during review because core still owned one peer-wide sender. This version fixes ownership at the source while retaining exactly one polling watcher per peer.

Validation

  • cargo test -p iroh-http-core --test observe (3/3)
  • Node Rust tests (5/5), Deno Rust tests (8/8), Tauri Rust tests (59 + 4 + doc)
  • Tauri guest tests (86/86)
  • TypeScript typecheck for all workspaces
  • strict clippy for core, Node, Deno, and Tauri
  • complete rebuilt Node extended suite (88/88, 152s)
  • focused rebuilt Node path observer suite (2/2)
  • two independent final race reviews: clean

@momics
momics merged commit 193a6ff into main Jul 18, 2026
8 checks passed
@momics
momics deleted the codex/release-0.6-tauri-lifecycle branch July 20, 2026 08:56
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