Skip to main content
← Back to list
01Issue
FeatureShippedSwamp Club
Assigneesstack72

Relationships

#968 Docs: update enrollment token references for fleet tokens (--max-enrollments)

Opened by stack72 · 7/4/2026· Shipped 7/4/2026

Summary

Phase 2 PR1 (#1753) added fleet tokens (--max-enrollments, bindings list, fleet worker naming). Follow-up #1754 refined the token list display. Three documentation pages need updates to reflect the new behavior.

Changes needed

1. `content/manual/reference/remote-execution/enrollment-tokens.md`

Opening paragraph (lines 8-12): Replace "Each token is single-use: once bound to a machine, no other machine can use it" with language that explains the default is single-machine but `--max-enrollments` allows multiple machines to enroll on one token.

Machine binding section (lines 40-52): The statement "Any other machine presenting the same token is rejected" is only true for single-enrollment tokens. Add:

  • Fleet tokens (`--max-enrollments N` or `unlimited`) allow multiple machines to bind to one token
  • Each machine gets a distinct worker name: `-` (4-char hex hash of machine ID)
  • A `fleet=` label is auto-injected at enrollment
  • The allowance is a hard cap — once exhausted, new machines are rejected with "enrollment allowance exhausted"

Restart scenarios table (line 89): The "Second machine (different id) → Rejected" row needs a note: only applies to single-enrollment tokens (the default). For fleet tokens, a second machine appends a new binding.

2. `content/manual/reference/remote-execution/worker-commands.md`

`worker token create` section (lines 36-73):

Update the command synopsis: ``` swamp worker token create --duration [--vault ] [--max-enrollments ] ```

Add to the flags table:

Flag Required Description Default
`--max-enrollments ` No Maximum machines this token can enroll (positive integer or `"unlimited"`). Fleet tokens name workers as `-` and auto-inject a `fleet=` label. `1`

Add a fleet example: ``` $ swamp worker token create gpu-fleet --duration 7d --max-enrollments 10 ```

`worker token list` section (lines 76-127):

Update the table output to show the hybrid display from #1754:

  • Single-enrollment tokens show the bound machine ID (e.g. `machine-42`) — same info as the old `BOUND MACHINE` column
  • Fleet tokens show `used / allowance` (e.g. `3 / 10`, `8 / unlimited`)

Update column header from `BOUND MACHINE` to `ENROLLMENTS`: ``` NAME STATE EXPIRES ENROLLMENTS ci-runner enrolled 2026-06-16T10:34:17.833Z machine-42 gpu-fleet enrolled 2026-07-05T00:00:00.000Z 3 / 10 ```

Update JSON example to show `maxEnrollments`, `bindingCount`, `bindings` instead of the old `boundMachineId` field: ```json [ { "name": "ci-runner", "state": "enrolled", "effectiveState": "enrolled", "createdAt": "2026-06-15T10:34:17.833Z", "expiresAt": "2026-06-16T10:34:17.833Z", "maxEnrollments": 1, "bindingCount": 1, "bindings": [{"machineId": "machine-42", "enrolledAt": "2026-06-15T10:34:30.000Z"}], "vaultName": "sandbox-vault", "secretKey": "worker-token-ci-runner" } ] ```

3. `content/manual/reference/remote-execution/security.md`

Line 21-22: Update "It is single-use: once bound to a machine identity, no other machine can present it" to reflect that fleet tokens allow multiple machines. Suggest: "By default, a token binds to a single machine identity. Fleet tokens (`--max-enrollments`) extend binding to multiple machines, each tracked independently."

Files verified as needing NO changes

  • `tutorials/remote-execution.md` — uses single token with `target:` placement; works identically
  • `explanation/remote-execution.md` — no single-machine token language
  • `how-to/remote-execution.md` — deployment examples still valid (fleet tokens are additive)
  • `reference/swamp-serve/serve-flags.md` — no token content

Context

Ship alongside or shortly after #1753 and #1754 merge. The behavior is backward-compatible (default `--max-enrollments 1` is identical to pre-upgrade), but users who discover fleet tokens need accurate reference documentation.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 3 MOREPR_MERGED+ 1 MORENOTIFICATION_SKIPPED

Shipped

7/4/2026, 9:46:24 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack727/4/2026, 9:23:26 PM

Sign in to post a ripple.