Skip to content

feat(share): member pause, resume, invite, rotate and renew - #75

Merged
tieubao merged 6 commits into
mainfrom
feat/members-lifecycle
Nov 15, 2026
Merged

tieubao merged 6 commits into
mainfrom
feat/members-lifecycle

Conversation

@tieubao

@tieubao tieubao commented Nov 15, 2026

Copy link
Copy Markdown
Member

What

The tenant admin's member lifecycle verbs: share member pause, resume, invite, rotate and renew, plus the member's token-expiry warnings. Also fixes the CC-14 (setup-first) lease-read flake.

Spec tasks done (SPEC-009): TASK-3a (pause, resume), TASK-3b (member invite), TASK-3c (rotate, ending invited with prev_status kept), TASK-3d (renew and expiry warnings).

  • pause and resume move the member's suffix in PAUSED through one carried deploy; a cloud member is refused member_cloud.
  • invite replaces the token and the code; rotate also replaces the tunnel and VPC Service under the same binding. A re-join restores the status rotate started from, so a paused member stays paused.
  • renew moves the token's expires_on in place (same id, same policies) and dies token_unreachable, naming the expiry and rotate (invite for cloud), when the current minter cannot find the token.
  • Every token, tunnel and VPC Service is found by name. A forged rotating record cannot make rotate keep the live tunnel.
  • A join loses to a rotate or invite that lands after its redeem (CC-03).
  • The member takes its key expiry from its record (renew needs no re-join); member ls and the member's share status warn within 14 days; state.token reads expiring with expires_on.
  • CC-14 flake: the dry bucket GET was not atomic; a lease release between its check and its read surfaced as "needs the admin S3 pair". Proven with a forced race (SHARE_R2_DRY_VANISH).

Proof

docs/verification/members-lifecycle.md: the new section (64 checks) green, five negative controls red then green, one full suite under macOS bash 3.2 (1892 checks, PASS), the review and advisor findings with their fixes, and ## Rollback. Build notes: docs/implementation-notes/multi-member.md P41 to P52.

Not attempted

  • TASK-3e (adopt), TASK-3f (WebSocket through a binding) and TASK-4a (min_cli): SG-14.
  • README, docs/how-it-works.md, docs/setup.md still say these verbs are not built: owed to SG-11 and SG-17.
  • No live run: dry seams only (live legs are SG-17 and SG-12).
  • A forged mode: cloud record still blocks pause and rotate (same class as a forged status; notes Q5).

A lease read racing a lease release found lock/admin, then failed to read
it, and died "needs the admin S3 pair" (the CC-14 setup-first flake). The
dry bucket now answers 404 for an object deleted under a GET, as R2 does,
and leaves an object deleted under a LIST out of the listing. An If-Match
on a vanished object answers 412. SHARE_R2_DRY_VANISH forces the race.
pause and resume move the member's suffix in PAUSED through one carried
deploy. invite replaces the token and the code; rotate replaces the
tunnel and VPC Service under the same binding and ends invited with
prev_status kept, so a re-join restores paused or active. renew moves the
token's expires_on in place and dies token_unreachable when the current
minter cannot find the token. Every object is found by its name.

A join loses to a rotate or invite that lands after its redeem, and its
last step refuses a record the admin moved. The member takes its key
expiry from the record, and status and member ls warn within 14 days.
A rotate keeps the record's rotation only when this machine's own dead
rotate journal vouches for it; otherwise it takes the next one above every
name on the account, so a forged rotating record cannot point it at the
live tunnel. An invite whose tunnel was deleted outside share makes it
again under its name instead of refusing toward rotate, which refuses it
back. renew sends the token back active.
rotate trusts a dead journal only for the same member and caps the
rotation at 999. invite from left keeps a member paused when the deploy
still pauses it. sync --rebind binds only the newest service of a suffix,
skips a suffix mid-rotate, and restores PAUSED from an invited record that
was paused. member ls reads token expiry from the minter's own list.
DP-rotate rows now re-join and assert the status rotate started from.
@tieubao
tieubao merged commit 8e7cc0a into main Nov 15, 2026
8 checks passed
@tieubao
tieubao deleted the feat/members-lifecycle branch November 15, 2026 14:17
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