Skip to content

feat(provider): darkbloom waitlist cluster / sandbox, per account; sandbox setup waits for approval - #1742

Closed
jonathan308 wants to merge 7 commits into
devfrom
feat/cluster-waitlist
Closed

jonathan308 wants to merge 7 commits into
devfrom
feat/cluster-waitlist

Conversation

@jonathan308

@jonathan308 jonathan308 commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds darkbloom waitlist. A waitlist is for the user account, not for a Mac: darkbloom waitlist cluster or darkbloom waitlist sandbox puts the account on that waitlist and shows where it stands, and darkbloom waitlist lists every waitlist. The waitlists are universal: the coordinator's catalog is the only list, so this CLI discovers them and a new waitlist needs no CLI release. A first darkbloom sandbox setup waits for an approved account on the sandbox waitlist before it checks or installs anything. darkbloom cluster is unchanged.

The coordinator side is Layr-Labs/darkbloom-platform#627: the catalog, the routes, the store, scripts/admin.sh waitlist and the admin dashboard. The console UI is Layr-Labs/darkbloom-platform#634: joining from the fleet dashboard, and the approver-only approval page.

Replaces #1682. GitHub closed #1682 when #1677 merged and its base branch, fix/cluster-replan-after-stop, was deleted. Same branch, now targeting dev.

$ darkbloom waitlist
Clusters (cluster): not joined
  Serve one model with two to four of your Macs.
Darkbloom Sandbox (sandbox): #3 in line (joined Oct 29, 2026)
  Run Darkbloom Sandbox CI jobs on your Mac.
Join one: darkbloom waitlist <name>

$ darkbloom waitlist cluster                       # puts the account on the waitlist
You're on the Clusters waitlist: #4 in line (joined Nov 3, 2026).
  Darkbloom reviews accounts in the order they joined and approves them by hand.
  Check again: darkbloom waitlist cluster

$ darkbloom waitlist cluster                       # once Darkbloom approves the account
Your account is approved for Clusters since Nov 4, 2026.
  Start: darkbloom cluster

$ darkbloom waitlist gpu                           # exit 1, nothing sent
Unknown waitlist 'gpu'. The waitlists are cluster (Clusters) and sandbox (Darkbloom Sandbox).
  See where you stand on each: darkbloom waitlist

$ darkbloom sandbox setup                          # an account that never joined
Darkbloom Sandbox is open to the accounts Darkbloom approves from its waitlist.
Join the Darkbloom Sandbox waitlist now? [y/N]: y
You're on the Darkbloom Sandbox waitlist: #1 in line (joined Nov 3, 2026).
  Nothing was installed. Run `darkbloom sandbox setup` again once Darkbloom approves your account.

Linked issue

None.

Test plan

  • Parse: xcrun swiftc -parse passes on every changed Swift file.
  • Type-check harness (Swift 6, warnings as errors, swift-argument-parser 1.4.0 as pinned): the real Waitlist/*.swift sources and the real SandboxSetupCommand.swift gate compile against stand-ins for the ProviderCore and darkbloom symbols they use.
    • 66/66 command checks: help text, parsing, name matching, decoding, every sentence, and whole command runs against an in-process copy of CoordinatorStub. The harness has no stand-in for the hardware detector, so its build also shows nothing reads this Mac's chip or memory.
    • 13/13 gate checks on requireApproval: 404, 401, unreachable, waitlisted, revoked, approved, and a join that posts {} with the login token.
    • The real FeatureWaitlistTests.swift runs in the harness: 23/23, including a refused join after the list answered and a revoked account with --json.
  • Merge with dev c41b40b76: clean.
  • Docs and changelog: make changelog-check (29 fragments) and python3 scripts/docs-impact-check.py --base upstream/dev pass. ./scripts/docs-check.sh passes except for three existing links into the libs/mlx-swift-lm submodule, which is not checked out locally.
  • Not run locally: swift build and the DarkbloomCLITests suite (they compile MLX). CI on this PR is their full compile and run, including SandboxSetupTests, which passes waitlist: .approved.

Components touched

  • provider-swift (Swift CLI)
  • native runtime / MLX
  • landing (Next.js)
  • enclave (Swift)
  • CI / provider release
  • docs

Protocol / interface changes

  • No protocol/interface changes
  • Yes — described above and matching side updated
    • CLI: darkbloom waitlist [<name>] [--json] [--config <path>]. Without a name it lists every waitlist; with one it puts the account on that waitlist (POST with {}; running it again keeps the place) and shows where it stands. A revoked account exits 1. A name matches a catalog id ignoring case, or the id plus s or es; an exact id wins, and a plural two ids share matches neither. status --json prints the coordinator's answer.
    • HTTP: GET /v1/waitlists (every waitlist with the account's place), GET and POST /v1/waitlists/{feature}, with the darkbloom login token. The matching side is Layr-Labs/darkbloom-platform#627.
    • Limits: calls go only to an https coordinator or to this Mac's loopback. They follow no redirects, end after 10 s in all, and refuse answers over 64 KiB.
    • Terminal safety: the coordinator's text (titles, summaries, start commands, ids, refusals) prints with control, format and line-separator characters replaced by U+FFFD; --json escapes them.
    • Deploy order: a coordinator without the routes answers 404. The list then says waitlists are not available, and sandbox setup goes on as before. This can ship before the coordinator deploy.
    • Not changed: WebSocket messages, config keys, release artifacts and ProviderCore.version. No version bump or migration note is needed.

Documentation impact

  • Canonical documentation updated:
    • docs/provider/cli-reference.md: the darkbloom waitlist section (list, joining per account, name matching, terminal safety), its subcommand row, and sandbox Setup step 1.
    • docs/provider/sandboxes.md: the waitlist as step 1, and troubleshooting.
    • docs/provider/two-mac-cluster.md: the cluster waitlist.
  • No documentation needed — reason:

Changelog

  • Added this PR's unique changelog.d/feature-waitlists.md fragment and ran make changelog-check.
  • No user-visible change, or an explicitly authorized release/history change.

Notes for reviewers

  • Base: dev c41b40b76, checked again just before this push. A merge into dev runs release-dev-branch.yml.
  • Where the gate applies:
    • Only a first setup is gated. A setup that continues, repairs or updates an installed add-on does not ask.
    • Setup goes on when the coordinator has no sandbox waitlist (404).
    • Setup stops with exit 1 when the account is waitlisted or revoked, when this Mac is not logged in, or when the coordinator gives no usable answer.
  • Clusters only record the request. darkbloom cluster does not check the cluster waitlist. Neither this PR nor the platform PR enforces approval in the coordinator (cluster pair formation, sandbox host binding).
  • Calls: darkbloom waitlist reads GET /v1/waitlists; darkbloom waitlist <name> reads the list to resolve the name, then posts {}. Nothing about the Mac is read or sent. The setup gate still makes only GET /v1/waitlists/sandbox, so a coordinator without the routes lets it continue.
  • Start command: a leading darkbloom becomes the installed CLI's name, so DevNet builds show darkbloom-dev cluster.
  • AI-assisted: written with Claude Code; not yet reviewed by a human.

Before And After

Before

flowchart LR
  subgraph Behavior
    S1[darkbloom sandbox setup] --> C1[Check this Mac and plan] --> I1[Install add-on]
    K1[darkbloom cluster] --> G1[Guided setup]
  end
Loading

After

flowchart LR
  subgraph Behavior
    L2["darkbloom waitlist"] -->|login token| R1["GET /v1/waitlists"] --> P1[every waitlist and its status]
    W2["darkbloom waitlist cluster / sandbox"] --> R1
    W2 -->|"{}"| R2["POST /v1/waitlists/{feature}"]
    S2[darkbloom sandbox setup] --> A2{sandbox approved?}
    A2 -->|yes, or coordinator 404| C2[Check this Mac and plan] --> I2[Install add-on]
    A2 -->|not joined| J2["offer to join (--yes joins)"] --> X2[stop, exit 1]
    A2 -->|waitlisted, revoked or no login| X2
    K2[darkbloom cluster] --> G2[Guided setup, unchanged]
  end
  subgraph Code
    WC["Waitlist (name, action)"] --> FA["FeatureWaitlistAccess.live()"] --> FC[FeatureWaitlistClient] --> R1
    WC --> FV["FeatureWaitlistView (printable)"]
    F2["SandboxSetupFlow.run: .fresh"] --> Q2["requireApproval (sandbox)"] --> FA
  end
Loading

Refactor Pass

  • Account-only pass: no bugs found; a stale comment fixed, tests added for a refused join after the list answered and for a revoked account with --json.

  • Review findings, fixed:

    • The coordinator's text reached the terminal raw, including C1 controls and bidirectional overrides that JSONEncoder leaves in --json. It is now sanitized for the terminal and escaped in JSON.
    • A plural two ids share (such as boxes for box and boxe) silently picked the first; it now matches neither.
    • The setup gate's error line used the built-in "Darkbloom Sandbox" even after the coordinator had answered with its own title.
    • The start command kept trailing newlines; the <name> help did not say it takes the id; waitlist join --macs 3 gave a misleading message.
  • Earlier pass (kept): the IPv6 loopback http://[::1] is accepted, and every call ends after 10 s in all.

  • Final focused validation after the pass: the parse check, the harness (72 + 11 checks and 23 tests), and the docs and changelog checks, as listed under Test plan.

🤖 Generated with Claude Code

jonathan308 and others added 3 commits October 29, 2026 21:14
…waits for approval

`darkbloom cluster waitlist [join --macs N]` and `darkbloom sandbox waitlist
[join]` join the waitlist Darkbloom approves accounts from and show the
account's status and place, with the `darkbloom login` token, against the
coordinator of provider.toml (HTTPS or loopback only, no redirects).

A first `darkbloom sandbox setup` now requires an approved sandbox entry
before it checks or installs anything; it offers to join (`--yes` joins) and
stops while the account waits. A coordinator without waitlists (404) lets
setup go on. The cluster commands are unchanged apart from the new
`waitlist` subcommand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ch call

- The commands are `darkbloom waitlist clusters [join --macs N | status]`
  and `darkbloom waitlist sandbox [join | status]` under one top-level
  `waitlist` group. `ClusterCommand.swift` is back to its parent's bytes and
  the sandbox group lists no waitlist; `sandbox setup` points at
  `darkbloom waitlist sandbox join`.
- A waitlist call ends after 10 seconds in all, not only after 10 idle
  seconds, and says "no answer within 10 seconds".
- The IPv6 loopback `http://[::1]` is accepted: URLComponents keeps the
  brackets, so the old `::1` entry could never match.
- Refactor pass: the view owns the join line the setup gate prints, the
  decoder is private, comments say what a 401 means, and the docs describe
  the options, the setup step and the timeout as the code does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dev reworked darkbloom sandbox setup into check, download, plan, confirm, install and summarize; a fresh setup still asks the waitlist first.
@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference Error Error Nov 3, 2026 8:29pm UTC
d-inference-console-ui-dev Error Error Nov 3, 2026 8:29pm UTC
d-inference-landing Ready Ready Preview Nov 3, 2026 8:29pm UTC
darkbloom-status Ready Ready Preview Nov 3, 2026 8:29pm UTC
eigen-homepages-darkbloom Ready Ready Preview Nov 3, 2026 8:29pm UTC

Request Review

jonathan308 and others added 2 commits November 3, 2026 09:34
…ator offers

The coordinator's catalog is now the only list of waitlists, so the CLI
discovers them instead of knowing clusters and Darkbloom Sandbox by name:

- `darkbloom waitlist` lists every waitlist (GET /v1/waitlists) with the
  account's status, and `darkbloom waitlist <name> [status|join]` works for any
  of them. A name matches a catalog id ignoring case, or the id plus "s" or
  "es" (`clusters`, `sandbox` and `sandboxes` keep working); a plural two ids
  share matches neither. An unknown name lists the waitlists and exits 1.
- Sentences take the coordinator's title and start command. A join sends this
  Mac's chip and memory only to a waitlist with a Mac-count range, and
  `--macs` defaults to its minimum and must lie inside it (exit 64 otherwise).
- The coordinator's text is made safe for the terminal: control, format and
  line-separator characters print as U+FFFD, and `--json` escapes them.
- `darkbloom sandbox setup` still gates a first setup on the `sandbox`
  waitlist exactly as before, using the coordinator's title when it has one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jonathan308 jonathan308 changed the title feat(provider): darkbloom waitlist clusters and sandbox; sandbox setup waits for approval feat(provider): darkbloom waitlist for every waitlist the coordinator offers; sandbox setup waits for approval Nov 3, 2026
jonathan308 and others added 2 commits November 3, 2026 12:22
…uster` joins it

The waitlist is for the user account, not for a Mac:

- `darkbloom waitlist <name>` (such as `cluster` or `sandbox`) puts the
  account on that waitlist and prints where it stands, with the start command
  once approved. Running it again keeps the place; an approved or revoked
  entry stays as it is. `darkbloom waitlist` still lists every waitlist.
- The `join`/`status` actions and `--macs` are gone; nothing reads or sends
  this Mac's chip, memory or Mac count, and a join posts `{}`.
- `darkbloom sandbox setup` keeps its gate on the `sandbox` waitlist and its
  offer to join, now with `{}`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jonathan308 jonathan308 changed the title feat(provider): darkbloom waitlist for every waitlist the coordinator offers; sandbox setup waits for approval feat(provider): darkbloom waitlist cluster / sandbox, per account; sandbox setup waits for approval Nov 3, 2026
jonathan308 added a commit that referenced this pull request Nov 6, 2026
…approved account

The sandbox setup tests that master added after #1742's base built
SandboxSetupFlow without a waitlist, so the gate asked the stub coordinator
(404) and printed its line. They now pass `waitlist: .approved`, as #1742's
own tests do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Nov 6, 2026
…up need an approval (#1850)

* feat(provider): waitlists for 0.10.10; a new cluster pair and a new sandbox setup need an approval

Ports d-inference#1742 (feat/cluster-waitlist d7f420e, its net diff over
dev c41b40b) onto master 0.10.9, and adds the cluster gate:

- `darkbloom waitlist [cluster|sandbox]`: list the coordinator's waitlists,
  or join one; the account joins, nothing about the Mac is sent.
- `FeatureWaitlistGate`: one failure policy for both gates. Approved: go on.
  404 (a coordinator without the routes): go on after one line. Not joined:
  offer to join. Waitlisted, revoked, 401, 403 (new `refused` problem) or no
  usable answer: say why (and to retry when unreachable), change nothing,
  exit 1.
- A first `darkbloom sandbox setup` uses the gate (feature `sandbox`).
- `darkbloom cluster` and `cluster local` on a Mac that holds no pairing use
  the gate (feature `cluster`); a Mac that holds a pairing, or one it can't
  read, is never asked and makes no waitlist call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(provider): master's work-disk and rerun sandbox tests run as an approved account

The sandbox setup tests that master added after #1742's base built
SandboxSetupFlow without a waitlist, so the gate asked the stub coordinator
(404) and printed its line. They now pass `waitlist: .approved`, as #1742's
own tests do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(provider): `darkbloom cluster local` is never gated by the cluster waitlist

The cluster waitlist gates clustering through Darkbloom. `cluster local`
serves on the owner's own Macs and, as its help says, never contacts the
coordinator, so it makes no waitlist call and works offline and for any
account. Every stop of the `darkbloom cluster` gate now ends with
"Serving on your own Macs only needs no approval: darkbloom cluster local".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: jonathan308 <5055076+jonathan308@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@jonathan308 jonathan308 mentioned this pull request Nov 6, 2026
15 of 16 tasks
@jonathan308

Copy link
Copy Markdown
Collaborator Author

Superseded by #1850 (the reviewed waitlist, released in provider 0.10.10) and #1855 (syncs master's 0.10.10 into dev, so 0.10.11 keeps it). Leaving this open for the owner to close.

@jonathan308

Copy link
Copy Markdown
Collaborator Author

Superseded: the waitlist shipped in provider 0.10.10 via #1850 (master), and #1855 brings it into dev.

@jonathan308 jonathan308 closed this Nov 6, 2026

This branch had an error being deployed

2 failed and 3 active deployments
Preview – d-inference-landing — d7f420e9 Deployed Nov 3, 2026 by vercel[bot]
Preview – eigen-homepages-darkbloom — d7f420e9 Deployed Nov 3, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — d7f420e9 Deployed Nov 3, 2026 by vercel[bot]
Preview – d-inference — d7f420e9 Deployed Nov 3, 2026 by vercel[bot]
Preview – darkbloom-status — d7f420e9 Deployed Nov 3, 2026 by vercel[bot]
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