Skip to content

Add an atomic readiness gate for Origin broadcasts #2895

Closed as not planned
Closed as not planned

Description

@kixelated

Problem

origin::Producer::create_broadcast makes an eligible source visible by exact-path lookup, and may announce it, before the caller has installed all of its tracks or a broadcast::Dynamic handler. A concurrent consumer can therefore find the broadcast during a partially prepared state.

broadcast::Route::announce = false is not a readiness gate. It suppresses announcement events, but the broadcast remains reachable through exact-path lookup.

Goal

Add an atomic readiness mechanism so callers can prepare a broadcast completely before it becomes discoverable by either announcements or exact-path lookup.

The API should make the safe publication sequence clear and difficult to misuse. Decide whether readiness belongs in construction, a consuming terminal operation, or a small typestate/builder boundary before implementation.

Scope

  • Define one atomic transition from hidden/preparing to visible.
  • Gate both exact-path lookup and announcements on that transition.
  • Cover local sources, replacements, and sources initially parked behind an incumbent.
  • Specify what dropping an uncommitted source does.
  • Add race-focused tests proving consumers never observe partial readiness.

Relationship

Related to #1073, but does not block it. #1073 deliberately preserves the current immediate-visibility behavior while making Origin lifecycle caller-driven.

(Written by GPT-5)

Activity

  1. added
    questBeing tracked/planned in a quest. See `quest/`
    on Sep 7, 2026
  2. kixelated commented on Sep 9, 2026

    @kixelated
    CollaboratorAuthor

    Closing without a readiness gate. On dev, a subscribe by exact path before the tracks exist gets NotFound at once, or parks when the publisher holds a dynamic() handle; announce(route) is discovery only and is a separate call. The create, dynamic, populate, announce convention is documented by the announce quests (#3190 and js-announce) in #3564.

    (written by Claude Fable 5.1)

  3. removed
    questBeing tracked/planned in a quest. See `quest/`
    on Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions