Relationships
#4454 Team mode: an admin can reveal a rotated token through serve, and lease, lock, grant and run-attribution answers are clear for members (F29, F9, F10, F8, F3, F27, F4 from #4374)
Opened by stack72 · 11/5/2026· Shipped 11/6/2026
Found by the team-mode dogfood on real GCS (swamp-club#4374), runs 2 and 3, release 20261105.030003.0. Code references are at 363a1dad. This is group 3 of the dogfood fixes: what a team admin and members see when they manage tokens, locks and runs through serve. One PR. F29 is needed for dogfood run 4, so it goes first (target: Mon 9 Nov).
Setup the findings come from: two serve nodes behind a load balancer, managedConfig on, the v3 datastore claimed by serve, and members with their own tokens and no storage credentials.
1. F29: an admin cannot get a minted or rotated token's secret in team mode (needed for run 4)
swamp serve token mintandrotateover--serverreturn onlyvaultRef.swamp serve token revealhas no--server.- Run locally on a serve node,
revealis refused: "This v3 datastore is claimed by swamp serve … writes go through serve" (src/domain/datastore_v3/datastore_owner.ts~108). - So a rotated token cannot be handed to its member without stopping serve.
- Fix direction: reveal through serve, for admins only, under the same rules as a local reveal (the same audit, the same refusal for a token the caller may not reveal). Keep the secret out of logs and spans.
- Run 4 check:
t03mints and rotates a token over--server, reveals it, and the member authenticates with it.
2. F9: a lease refusal is slow and names no holder
- When another member holds a model lease, the refusal (
lock_timeout, exit 75) arrives only after about 60 s and doesn't say who holds it. - Fix direction: say who holds the lease (principal, and the run if known) and until when. If serve reports the lease as held by another principal, refuse promptly, without waiting out the full timeout. Keep the wait for the case where waiting can help.
3. F10: swamp datastore lock release --behavior needs type/id
- Other
--behavioroptions accept a behavior's name. This one only accepts the lock key (type/<id>). - Fix direction: accept a name too, resolved the same way the other commands resolve it. This must not open or reset the checkout's copy (see the force-release fix in #4431, which builds the serve client from the serve settings for an id).
4. F8: a missing grant reports a conflict
- An edit by a member without the grant, made without a fresh
get, reports a stale-base conflict instead offorbidden. After aget, it isforbidden. - Fix direction: decide the grant before the stale-base check, so a caller without the grant always gets
forbidden, and learns nothing about the current base.
5. F3: a missing-extension warning on every member command
- Members are warned on every command about an extension their own work doesn't use.
- Fix direction: warn only when a command needs that extension.
6. "Initiated by" shows the machine's login
- Run records and history show the OS login of the machine that ran the command, not the member whose token made the request.
- Fix direction: for work through serve, record and show the authenticated principal. Keep the machine login as separate detail if it is still useful.
7. Text fixes
- F27: the
datastore_offline_queuednotice says the next command that reaches serve sends the queued work. Only a writing command does. Fix the wording. - F4:
team-mode.mddescribes the step-start cost from before #4319. Update it.
Must not regress
- Revocation refused on the next request on both nodes, and after a takeover.
- Admin force-release, explicit leases, and
forbiddenafter aget. - No token secret in any log, span or error.
Done when
Each item has an in-repo test, red on current main. Run 4's t02/t03 (tokens) and the lease checks pass.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.