Remove pre-1.0 bridge governance scaffolding

This commit is contained in:
npc0-hue
2026-08-21 09:46:25 +08:00
parent da6c8d607e
commit b5a366e30d
42 changed files with 520 additions and 1066 deletions
-14
View File
@@ -284,16 +284,6 @@ func (svc *CoreService) queueGameClientBridgeCommand(requesterID string, request
if !request.ExpiresAt.After(stamp) {
return domain.GameClientBridgeCommand{}, validationError("bridge command expiresAt must be in the future")
}
approvalState := domain.GameClientBridgeApprovalNotRequired
if declaration.ApprovalLevel == domain.GameClientBridgeApprovalLevelOperator {
approvalState = domain.GameClientBridgeApprovalApproved
}
if declaration.ApprovalLevel == domain.GameClientBridgeApprovalLevelPlatformAdmin {
approvalState = domain.GameClientBridgeApprovalPending
if requester, requesterErr := svc.store.Users().Get(requesterID); requesterErr == nil && isPlatformAdmin(requester) {
approvalState = domain.GameClientBridgeApprovalApproved
}
}
svc.bridgeSeq++
command := domain.GameClientBridgeCommand{
ID: fmt.Sprintf("bridge-command-%d-%d", stamp.UnixNano(), svc.bridgeSeq),
@@ -305,7 +295,6 @@ func (svc *CoreService) queueGameClientBridgeCommand(requesterID string, request
IdempotencyKey: request.IdempotencyKey,
Priority: request.Priority,
State: domain.GameClientBridgeCommandPending,
ApprovalState: approvalState,
RequesterID: requesterID,
ExpiresAt: request.ExpiresAt,
CreatedAt: stamp,
@@ -351,9 +340,6 @@ func (svc *CoreService) claimGameClientBridgeCommands(component gameClientBridge
if command.RunJobID != "" {
continue
}
if command.ApprovalState != domain.GameClientBridgeApprovalNotRequired && command.ApprovalState != domain.GameClientBridgeApprovalApproved {
continue
}
fencingToken := command.Claim.FencingToken + 1
command.State = domain.GameClientBridgeCommandClaimed
command.Claim = domain.GameClientBridgeClaim{SessionID: component.Session.ID, InstallationID: component.Installation.ID, DeploymentGeneration: component.Session.DeploymentGeneration, FencingToken: fencingToken, LeaseExpiresAt: gameClientBridgeClaimLeaseExpiry(stamp, command.ExpiresAt), ClaimedAt: stamp}