Skip to content

fix(collab): keep surviving co-editor admitted during roomKey rotation - #30

Merged
nadeem-fileverse merged 1 commit into
mainfrom
nk/collab-rotation-grace-survivor-kick
Jul 27, 2026
Merged

fix(collab): keep surviving co-editor admitted during roomKey rotation#30
nadeem-fileverse merged 1 commit into
mainfrom
nk/collab-rotation-grace-survivor-kick

Conversation

@nadeem-fileverse

Copy link
Copy Markdown
Contributor

The editbound cleanup (#29) swapped the live gp-actor edit re-check from a
per-actor-handle check to a doc-wide minEditEpoch floor. On removal the client
evicts the removed actor with the bumped gateEpoch, stamping the floor doc-wide
before the make-before-break rotation re-issues survivors a fresh-epoch editUcan
at cutover. In the gap every surviving co-editor (admitted at the old epoch)
fails isStillAdmitted and is disconnected, so it misses the one-shot
/session/cutover and is stranded with "Session not found" until a full refresh.

isStillAdmitted now tolerates a below-floor gp-actor while a make-before-break
rotation for the doc is in flight (rotationCoordinator.isActive). JOIN admission
(resolveEditAdmission) stays strict, so the removed actor still cannot rejoin.

Unit-verified (socket-handlers.isStillAdmitted.rotationGrace.test.ts); not yet
E2E-verified. Known residual windows (evict->begin gap, post-cutover drain, and
the doc-wide grace briefly re-admitting an evict-failed actor) are tracked for a
follow-up hardening (per-doc evicted-handle denylist).

The editbound cleanup (#29) swapped the live gp-actor edit re-check from a
per-actor-handle check to a doc-wide minEditEpoch floor. On removal the client
evicts the removed actor with the bumped gateEpoch, stamping the floor doc-wide
before the make-before-break rotation re-issues survivors a fresh-epoch editUcan
at cutover. In the gap every surviving co-editor (admitted at the old epoch)
fails isStillAdmitted and is disconnected, so it misses the one-shot
/session/cutover and is stranded with "Session not found" until a full refresh.

isStillAdmitted now tolerates a below-floor gp-actor while a make-before-break
rotation for the doc is in flight (rotationCoordinator.isActive). JOIN admission
(resolveEditAdmission) stays strict, so the removed actor still cannot rejoin.

Unit-verified (socket-handlers.isStillAdmitted.rotationGrace.test.ts); not yet
E2E-verified. Known residual windows (evict->begin gap, post-cutover drain, and
the doc-wide grace briefly re-admitting an evict-failed actor) are tracked for a
follow-up hardening (per-doc evicted-handle denylist).
@nadeem-fileverse
nadeem-fileverse merged commit 4a41f30 into main Jul 27, 2026
1 check passed
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