fix(cloud): track workspace membership provenance (#2406)

* fix(cloud): converge legacy revision-zero members

* fix(cloud): track workspace membership provenance

* test(persistence): track current migration head

---------

Co-authored-by: Chan <dadachann@users.noreply.github.com>
This commit is contained in:
Hyu
2026-08-07 11:26:06 +08:00
committed by GitHub
parent ddb6dbf593
commit 4bd899e77b
10 changed files with 292 additions and 27 deletions
+3
View File
@@ -11,6 +11,7 @@ from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker
from ..entity.persistence.workspace import (
MembershipRole,
MembershipSource,
MembershipStatus,
Workspace,
WorkspaceExecutionSource,
@@ -451,6 +452,7 @@ class WorkspaceService:
account_uuid=account_uuid,
role=MembershipRole.OWNER.value,
status=MembershipStatus.ACTIVE.value,
source=MembershipSource.LOCAL.value,
joined_at=joined_at,
projection_revision=0,
)
@@ -458,6 +460,7 @@ class WorkspaceService:
else:
membership.role = MembershipRole.OWNER.value
membership.status = MembershipStatus.ACTIVE.value
membership.source = MembershipSource.LOCAL.value
membership.joined_at = membership.joined_at or joined_at
if workspace.created_by_account_uuid is None: