Standardize typed connection outcomes, retries, reporting, and fallback handoff #13

Open
opened 2026-07-15 10:04:23 +02:00 by Kyuubi · 2 comments
Owner

Parent: #1
Depends on: #12

Outcome

Make every connection attempt terminate predictably so consumers can choose a dedicated endpoint, future relay, or user-facing failure.

Scope

  • Define stable outcomes including not found/expired, incompatible, unauthorized, limited, no host presence, mediator unavailable, punch timeout, direct-connect timeout/rejection, cancellation, transport error, and success.
  • Separate authoritative service errors from locally observed NAT/direct-connect outcomes.
  • Establish phase-specific timeout/retry budgets and exactly-once completion semantics.
  • Add optional game-configured dedicated fallback hooks without routing gameplay through Rendezvous.
  • Add coarse authenticated/idempotent outcome reporting for aggregate traversal metrics under the #2 privacy policy.
  • Ensure service silence never becomes an infinite wait or false success.

Acceptance criteria

  • Every success, rejection, timeout, cancellation, restart, and service-unavailable path returns exactly one typed terminal outcome.
  • Games can distinguish compatibility, directory, mediation, NAT, and host rejection failures.
  • Fallback selection remains explicitly consumer-owned.
  • Relay-unavailable behavior is honest and documented.
  • Outcome reporting contains no stable player identity, secret, raw metadata, or reusable credential.
  • Retry and timeout behavior is deterministic under a fake clock.
  • Late events after completion cannot reopen or mutate the attempt.
Parent: #1 Depends on: #12 ## Outcome Make every connection attempt terminate predictably so consumers can choose a dedicated endpoint, future relay, or user-facing failure. ## Scope - Define stable outcomes including not found/expired, incompatible, unauthorized, limited, no host presence, mediator unavailable, punch timeout, direct-connect timeout/rejection, cancellation, transport error, and success. - Separate authoritative service errors from locally observed NAT/direct-connect outcomes. - Establish phase-specific timeout/retry budgets and exactly-once completion semantics. - Add optional game-configured dedicated fallback hooks without routing gameplay through Rendezvous. - Add coarse authenticated/idempotent outcome reporting for aggregate traversal metrics under the #2 privacy policy. - Ensure service silence never becomes an infinite wait or false success. ## Acceptance criteria - Every success, rejection, timeout, cancellation, restart, and service-unavailable path returns exactly one typed terminal outcome. - Games can distinguish compatibility, directory, mediation, NAT, and host rejection failures. - Fallback selection remains explicitly consumer-owned. - Relay-unavailable behavior is honest and documented. - Outcome reporting contains no stable player identity, secret, raw metadata, or reusable credential. - Retry and timeout behavior is deterministic under a fake clock. - Late events after completion cannot reopen or mutate the attempt.
Kyuubi added reference codex/issue-12-client-coordinator 2026-07-16 09:25:49 +02:00
Kyuubi self-assigned this 2026-07-16 09:25:49 +02:00
Author
Owner

Starting implementation on a stacked branch from codex/issue-12-client-coordinator. I’ll first inventory the existing contracts, coordinator terminal paths, fallback fields, and reporting endpoint, then implement deterministic typed outcomes and verify them with fake-clock and integration coverage.

Starting implementation on a stacked branch from `codex/issue-12-client-coordinator`. I’ll first inventory the existing contracts, coordinator terminal paths, fallback fields, and reporting endpoint, then implement deterministic typed outcomes and verify them with fake-clock and integration coverage.
Author
Owner

Implemented and pushed on codex/issue-13-typed-outcomes at 94aba8a (stacked on the completed roadmap branches).

Delivered typed, phase-aware client/host connection outcomes; bounded HTTP, punch, direct-connect, and attempt timeouts using monotonic elapsed time; policy-gated dedicated fallback propagation; capability-authenticated idempotent outcome reporting and aggregate metrics; precise stale-host/protocol HTTP errors; frozen-v1 compatibility preservation; documentation and ADR updates.

Adversarial branch review findings were fixed, including cancellation typing, stop/dispose reentrancy, retry/deadline starvation, pending-peer cleanup, revocation cleanup, fallback-policy enforcement, wire/API compatibility, and legacy report normalization.

Verification: formatting clean; Debug build + 199/199 tests; Release build + 199/199 tests; contracts and client NuGet packages created successfully; public API snapshot diff is additive-only (82 additions, 0 removals). Issue remains open until the stacked roadmap is landed.

Implemented and pushed on `codex/issue-13-typed-outcomes` at `94aba8a` (stacked on the completed roadmap branches). Delivered typed, phase-aware client/host connection outcomes; bounded HTTP, punch, direct-connect, and attempt timeouts using monotonic elapsed time; policy-gated dedicated fallback propagation; capability-authenticated idempotent outcome reporting and aggregate metrics; precise stale-host/protocol HTTP errors; frozen-v1 compatibility preservation; documentation and ADR updates. Adversarial branch review findings were fixed, including cancellation typing, stop/dispose reentrancy, retry/deadline starvation, pending-peer cleanup, revocation cleanup, fallback-policy enforcement, wire/API compatibility, and legacy report normalization. Verification: formatting clean; Debug build + 199/199 tests; Release build + 199/199 tests; contracts and client NuGet packages created successfully; public API snapshot diff is additive-only (82 additions, 0 removals). Issue remains open until the stacked roadmap is landed.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: HeiKyu/Rendezvous#13