Skip to content

feat(service): seal a workspace's pending invitations for following over Neon Realtime - #3948

Merged
vespin-agent[bot] merged 1 commit into
mainfrom
luke/live-invitations-service
Oct 21, 2026
Merged

vespin-agent[bot] merged 1 commit into
mainfrom
luke/live-invitations-service

Conversation

@charleslpan

@charleslpan charleslpan commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

The service side of a workspace's live pending invitations. Stacked on #3942.

  • New live procedure live.workspaceInvitations:
    • an owner or an admin gets one sealed statement plus the service's origin for accept links
    • a plain member gets not-permitted, and an outsider not-found
  • Statement: reads the plugin's pending invitation rows and gates on the reader's managing role.
  • Expiry filter on the desktop: expiresAt > now moves to workspaceInvitationsOfLiveRows, so the statement stays deterministic.

Tests

  • Parity against Better Auth's real plugin over PGlite: canceled and expired invitations, an owner and an admin, and a member and an outsider who get nothing.
  • Procedure test.
  • Immutability check.

Made with Luke

@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
luke-web Ready Ready Preview Oct 21, 2026 7:35am UTC

Request Review

@vespin-agent
vespin-agent Bot force-pushed the luke/live-members-follow branch from ec0dec9 to 35ae94c Compare October 20, 2026 02:34
@vespin-agent
vespin-agent Bot force-pushed the luke/live-invitations-service branch from f422961 to 3d08712 Compare October 20, 2026 02:34
@vespin-agent
vespin-agent Bot force-pushed the luke/live-members-follow branch from 35ae94c to b03efd3 Compare October 20, 2026 03:26
@vespin-agent
vespin-agent Bot force-pushed the luke/live-invitations-service branch from 3d08712 to cfec13f Compare October 20, 2026 03:26
@vespin-agent
vespin-agent Bot force-pushed the luke/live-invitations-service branch from cfec13f to 1a53038 Compare October 21, 2026 00:11
@vespin-agent
vespin-agent Bot force-pushed the luke/live-members-follow branch from b03efd3 to fcc307a Compare October 21, 2026 00:11
@vespin-agent
vespin-agent Bot force-pushed the luke/live-invitations-service branch from 1a53038 to 2d0792e Compare October 21, 2026 00:28
@vespin-agent
vespin-agent Bot force-pushed the luke/live-members-follow branch from fcc307a to 1103b1a Compare October 21, 2026 00:29
@vespin-agent
vespin-agent Bot force-pushed the luke/live-members-follow branch from 1103b1a to 9633dff Compare October 21, 2026 00:45
@vespin-agent
vespin-agent Bot force-pushed the luke/live-invitations-service branch from 2d0792e to f753020 Compare October 21, 2026 00:45
@vespin-agent
vespin-agent Bot force-pushed the luke/live-members-follow branch from 9633dff to 09966fa Compare October 21, 2026 01:05
@vespin-agent
vespin-agent Bot force-pushed the luke/live-invitations-service branch from f753020 to d7d6053 Compare October 21, 2026 01:05
@vespin-agent
vespin-agent Bot force-pushed the luke/live-members-follow branch from 09966fa to 25bffc2 Compare October 21, 2026 01:17
@vespin-agent
vespin-agent Bot force-pushed the luke/live-invitations-service branch from d7d6053 to 6536c67 Compare October 21, 2026 01:17
@vespin-agent
vespin-agent Bot force-pushed the luke/live-members-follow branch from 25bffc2 to ddd1aff Compare October 21, 2026 01:32
@vespin-agent
vespin-agent Bot force-pushed the luke/live-invitations-service branch from 6536c67 to 817f0c2 Compare October 21, 2026 01:32
@vespin-agent
vespin-agent Bot force-pushed the luke/live-members-follow branch from ddd1aff to 1efc79d Compare October 21, 2026 06:27
@vespin-agent
vespin-agent Bot force-pushed the luke/live-invitations-service branch from 817f0c2 to 2868d30 Compare October 21, 2026 06:27
@vespin-agent
vespin-agent Bot force-pushed the luke/live-members-follow branch from 1efc79d to d237fd8 Compare October 21, 2026 06:44
@vespin-agent
vespin-agent Bot force-pushed the luke/live-invitations-service branch from 2868d30 to c29307d Compare October 21, 2026 06:44
@vespin-agent
vespin-agent Bot force-pushed the luke/live-invitations-service branch from c29307d to 7e0ff65 Compare October 21, 2026 07:01
@vespin-agent
vespin-agent Bot force-pushed the luke/live-members-follow branch from afcc83f to 181af0f Compare October 21, 2026 07:09
@vespin-agent
vespin-agent Bot force-pushed the luke/live-invitations-service branch from 7e0ff65 to f7fe51b Compare October 21, 2026 07:09
Base automatically changed from luke/live-members-follow to main October 21, 2026 07:23
…wing over Neon Realtime

The live procedure `workspaceInvitations` (GET
/api/live/workspace-invitations?workspaceId=) seals one workspace's pending
invitations for an owner or an admin of it, with the service's own origin
each accept link is built on: not found for a workspace the account is not
in, not permitted for one it neither owns nor administers, as the held read
answers; or answers its rows inline where the reader polls or Realtime
cannot seal it. The statement reads the plugin's own invitation rows still
pending, holds the reader's managing role, so a reader demoted or gone
stops reading them, and calls only immutable functions. The held read's
expiry filter (expiresAt > now) moves to the desktop
(workspaceInvitationsOfLiveRows), so the statement stays deterministic.

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
@vespin-agent
vespin-agent Bot force-pushed the luke/live-invitations-service branch from f7fe51b to 11209ae Compare October 21, 2026 07:31
@vespin-agent
vespin-agent Bot marked this pull request as ready for review October 21, 2026 07:39
@vespin-agent
vespin-agent Bot added this pull request to the merge queue Oct 21, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

Merged via the queue into main with commit 797c35b Oct 21, 2026
13 checks passed
@vespin-agent
vespin-agent Bot deleted the luke/live-invitations-service branch October 21, 2026 07:45

This branch was successfully deployed

1 active deployment
Preview — 11209ae1 Deployed Oct 21, 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