Skip to content

feat: let Keepalive hosts manage their own handoffs - #810

Open
0xcadams wants to merge 1 commit into
mainfrom
0xcadams/keepalive-local-turns
Open

0xcadams wants to merge 1 commit into
mainfrom
0xcadams/keepalive-local-turns

Conversation

@0xcadams

Copy link
Copy Markdown
Member

What

A browser host now invites one volunteer at a time. The volunteer can be on the same network. Ordinary turns last up to 15 minutes, with a quiet five-minute warning and a countdown during hosting.

Why

The experiment needs working copies of the site, not a globally exact host count. A single reservation list made every start and stop depend on a Durable Object. Comparing public IPs also prevented two people behind one router from helping each other without proving that different addresses belonged to independent hosts.

Changes

  • Replace central reservations, the IP comparison, and the fixed fleet target with finite peer invitations. Preserve upload checks, invitation expiry, certificate handoff, and the direct current-run check before confirming a replacement.
  • Have the Worker confirm the pending invitation at its donor before requesting a scoped one-use key. Retries use the same invitation ID. Bootstrap remains on the restart site when no publisher answers.
  • Keep the one-hour seed turn and four-minute replacement window. Use the existing sound control for both the invitation and expiry cues.
  • Retire the coordinator with a versioned Worker migration; drain old turns before rollout.

@0xcadams

Copy link
Copy Markdown
Member Author

Local checks passed: 26 Keepalive tests, the Keepalive production build (page, Worker, SDK/WASM), demo TypeScript, repository JS lint, and diff checks. The handoff tests include competing volunteers, invitation expiry, donor-confirmed enrollment, direct replacement checks, certificate continuity, and warning timing. No hosted handoff or staged experiment was run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T15:03:28.914757Z 8c37b56 PR opened
🔒 Security Review ✅ Completed 2026-11-20T15:10:24.199647Z 8c37b56 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@0xcadams
0xcadams enabled stacked auto-merge (squash) November 20, 2026 15:08
@0xcadams
0xcadams disabled stacked auto-merge November 20, 2026 15:13
@0xcadams
0xcadams added this pull request to stack #812 November 20, 2026 15:13

This branch has not been deployed

No deployments
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