Skip to content

relay: give LocalForwarderRegistry a three-state entry - #542

Merged
afrind merged 1 commit into
fix/initial-statefrom
feat/local-fwd-reg-claim
Aug 11, 2026
Merged

relay: give LocalForwarderRegistry a three-state entry#542
afrind merged 1 commit into
fix/initial-statefrom
feat/local-fwd-reg-claim

Conversation

@afrind

@afrind afrind commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

The registry mapped a track name straight to a forwarder, which let a reader attach to one before its largest and extensions arrived from upstream.

An entry is now absent, pending, or ready, and a pending entry does not hand out its forwarder. Only the Claim that join() returns can reach it, and dropping that Claim fails the entry instead of stranding whoever waits on it.

Nothing observes the pending state yet, because both callers mark the entry ready on the next line; holding a claim open across setup is what the commits above this one do. LocalForwarderRegistryTest is new, and covers the three states, the identity checks, and the two asserts a caller can trip.


This change is Reviewable

@akash-a-n akash-a-n left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@akash-a-n reviewed 5 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on afrind).

@afrind
afrind force-pushed the feat/local-fwd-reg-claim branch from 97c49da to d4095d6 Compare August 11, 2026 15:37
The registry mapped a track name straight to a forwarder, which let a reader
attach to one before its largest and extensions arrived from upstream. A client
reads that as a track restart.

An entry is now absent, pending, or ready, and a pending entry does not hand out
its forwarder. Only the Claim that join() returns can reach it, and dropping that
Claim fails the entry instead of stranding whoever waits on it.

Nothing observes the pending state yet, because both callers mark the entry ready
on the next line; holding a claim open across setup is what the commits above
this one do. LocalForwarderRegistryTest is new, and covers the three states, the
identity checks, and the two asserts a caller can trip.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@afrind
afrind force-pushed the feat/local-fwd-reg-claim branch from d4095d6 to 1f8d73c Compare August 11, 2026 15:39
@afrind
afrind merged commit e5f4b27 into main Aug 11, 2026
15 of 16 checks passed
@afrind
afrind deleted the feat/local-fwd-reg-claim branch August 11, 2026 17:22
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