{
  "schema": "lattice.agents/api/v1",
  "surface": "tenantadmin",
  "packages": [
    "Orleans.Lattice.Api.Abstractions",
    "Orleans.Lattice.Api.TenantAdmin",
    "Orleans.Lattice.Api.TenantAdmin.Grpc"
  ],
  "sources": [
    "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAccessAdmin.cs",
    "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAdmin.cs",
    "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs",
    "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantGrantAdmin.cs",
    "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs",
    "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantQuotaUsage.cs",
    "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantRegionAdmin.cs",
    "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantSelfService.cs",
    "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs",
    "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAuditLog.cs"
  ],
  "in_process": {
    "interface": "ILatticeTenantAdmin, ILatticeTenantRegionAdmin, ILatticeTenantAccessAdmin, ILatticeTenantGrantAdmin, ILatticeTenantSelfService, ILatticeTenantQuotaUsage, ILatticeTenantDirectoryAdmin, ILatticeTenantPolicyAdmin",
    "registration": "AddLatticeTenantAdminApi",
    "source": "src/lattice.api.tenantadmin/LatticeApiTenantAdminServiceCollectionExtensions.cs"
  },
  "grpc": {
    "service": "orleans.lattice.api.tenantadmin",
    "methods_source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
    "marshalling": "Unary RPCs use Orleans serializers through LatticeTenantAdminGrpcMarshallers.",
    "metadata": [
      {
        "name": "authorization",
        "purpose": "Carries the caller credential token; the default bridge strips the Bearer scheme and stamps LatticeCredentialContext.",
        "source": "src/lattice.api.tenantadmin.grpc/HeaderLatticeTenantAdminApiCredentialBridge.cs"
      },
      {
        "name": "lattice-active-tenant",
        "purpose": "Carries the caller asserted active tenant and is stamped through LatticeActiveTenantAssertion.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcOptions.cs"
      }
    ],
    "auth": {
      "interceptor": "LatticeTenantAdminApiGrpcAuthInterceptor",
      "authorizer": "ILatticeTenantAdminApiAuthorizer",
      "decision": "RequireAuthorization defaults true; DenyTenantAdminApiAuthorizer denies until opt-in; GetAuthScheme and self-service methods are exempt and defer to facade scoping.",
      "source": "src/lattice.api.tenantadmin.grpc/Security/LatticeTenantAdminApiGrpcAuthInterceptor.cs"
    }
  },
  "availability": {
    "in_process": [
      {
        "registration": "AddLatticeTenantAdminApi",
        "package": "Orleans.Lattice.Api.TenantAdmin",
        "provides": [
          "ILatticeTenantAdmin",
          "ILatticeTenantRegionAdmin",
          "ILatticeTenantAccessAdmin",
          "ILatticeTenantGrantAdmin",
          "ILatticeTenantSelfService",
          "ILatticeTenantQuotaUsage",
          "ILatticeTenantDirectoryAdmin",
          "ILatticeTenantPolicyAdmin"
        ],
        "source": "src/lattice.api.tenantadmin/LatticeApiTenantAdminServiceCollectionExtensions.cs#LatticeApiTenantAdminServiceCollectionExtensions.AddLatticeTenantAdminApi"
      },
      {
        "registration": "AddLatticeTenantScopedTreeAdminApi",
        "package": "Orleans.Lattice.Api.TenantAdmin",
        "provides": [
          "ILatticeTenantScopedTreeAdmin"
        ],
        "source": "src/lattice.api.tenantadmin/LatticeApiTenantScopedTreeAdminServiceCollectionExtensions.cs#LatticeApiTenantScopedTreeAdminServiceCollectionExtensions.AddLatticeTenantScopedTreeAdminApi"
      }
    ],
    "requires": [
      {
        "name": "AddLatticeTenancy",
        "kind": "registration",
        "reason": "The tenant-admin facade operates on the tenancy engine tenant registry and fails fast when AddLatticeTenancy has not registered it.",
        "source": "src/lattice.api.tenantadmin/LatticeApiTenantAdminServiceCollectionExtensions.cs#LatticeApiTenantAdminServiceCollectionExtensions.AddLatticeTenantAdminApi"
      },
      {
        "name": "AddLattice",
        "kind": "registration",
        "reason": "Tenancy requires the core registration before AddLatticeTenancy.",
        "source": "src/lattice.tenancy/LatticeTenancyServiceCollectionExtensions.cs"
      },
      {
        "name": "AddLatticeMembership",
        "kind": "registration",
        "reason": "Tenancy requires authenticated subject and group resolution before AddLatticeTenancy.",
        "source": "src/lattice.tenancy/LatticeTenancyServiceCollectionExtensions.cs"
      },
      {
        "name": "AddLatticeAuth",
        "kind": "registration",
        "reason": "Tenancy requires the real authorization gate before AddLatticeTenancy.",
        "source": "src/lattice.tenancy/LatticeTenancyServiceCollectionExtensions.cs"
      },
      {
        "name": "AddLatticeTreeAdminApi",
        "kind": "registration",
        "reason": "The tenant-scoped tree-admin facade composes ILatticeTreeAdmin, so AddLatticeTenantScopedTreeAdminApi fails fast with InvalidOperationException when AddLatticeTreeAdminApi has not been called first.",
        "source": "src/lattice.api.tenantadmin/LatticeApiTenantScopedTreeAdminServiceCollectionExtensions.cs#LatticeApiTenantScopedTreeAdminServiceCollectionExtensions.AddLatticeTenantScopedTreeAdminApi"
      },
      {
        "name": "AddLatticeSchemaEnforcement",
        "kind": "registration",
        "reason": "The tenant-scoped tree-admin facade composes ILatticeSchemaAdmin, so AddLatticeTenantScopedTreeAdminApi fails fast with InvalidOperationException when AddLatticeSchemaEnforcement has not been called first.",
        "source": "src/lattice.api.tenantadmin/LatticeApiTenantScopedTreeAdminServiceCollectionExtensions.cs#LatticeApiTenantScopedTreeAdminServiceCollectionExtensions.AddLatticeTenantScopedTreeAdminApi"
      }
    ],
    "grpc_server": [
      {
        "registration": "AddLatticeTenantAdminApiGrpc",
        "package": "Orleans.Lattice.Api.TenantAdmin.Grpc",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcServiceCollectionExtensions.cs#LatticeTenantAdminApiGrpcServiceCollectionExtensions.AddLatticeTenantAdminApiGrpc"
      },
      {
        "registration": "MapLatticeTenantAdminApiGrpc",
        "package": "Orleans.Lattice.Api.TenantAdmin.Grpc",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcServiceCollectionExtensions.cs#LatticeTenantAdminApiGrpcServiceCollectionExtensions.MapLatticeTenantAdminApiGrpc"
      }
    ],
    "grpc_client": [],
    "absent": null
  },
  "types": {
    "AuthSchemeAdvertisement": {
      "kind": "record",
      "fields": [
        {
          "name": "Schemes",
          "type": "IReadOnlyList<AuthSchemeDescriptor>",
          "required": false
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/AuthSchemeAdvertisement.cs"
    },
    "AuthSchemeAdvertisementRequest": {
      "kind": "record",
      "fields": [],
      "source": "src/lattice.api.tenantadmin.grpc/Model/AuthSchemeAdvertisementRequest.cs"
    },
    "AuthSchemeDescriptor": {
      "kind": "record",
      "fields": [
        {
          "name": "SchemeId",
          "type": "string",
          "required": true
        },
        {
          "name": "DisplayName",
          "type": "string",
          "required": true
        },
        {
          "name": "Parameters",
          "type": "IReadOnlyDictionary<string, string>",
          "required": false
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/AuthSchemeDescriptor.cs"
    },
    "TenantAccessConfinementRule": {
      "kind": "enum",
      "values": [
        "GroupNesting",
        "ForeignTenantGroup",
        "RuleTree",
        "RuleOperations",
        "ReservedRuleId"
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantAccessConfinementRule.cs#TenantAccessConfinementRule"
    },
    "TenantAccessPageRequest": {
      "kind": "record",
      "fields": [
        {
          "name": "PageSize",
          "type": "int",
          "required": false
        },
        {
          "name": "PageToken",
          "type": "string?",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantAccessPageRequest.cs"
    },
    "TenantAccessPosture": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "Enabled",
          "type": "bool",
          "required": false
        },
        {
          "name": "CallerIsTenantAdmin",
          "type": "bool",
          "required": false
        },
        {
          "name": "CallerIsPlatformOperator",
          "type": "bool",
          "required": false
        },
        {
          "name": "Groups",
          "type": "TenantQuotaDimensionUsage",
          "required": false
        },
        {
          "name": "MembershipEdges",
          "type": "TenantQuotaDimensionUsage",
          "required": false
        },
        {
          "name": "MemberSubjects",
          "type": "TenantQuotaDimensionUsage",
          "required": false
        },
        {
          "name": "TenantRules",
          "type": "TenantQuotaDimensionUsage",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantAccessPosture.cs"
    },
    "TenantAdminAccessListRequest": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "Page",
          "type": "TenantAccessPageRequest",
          "required": true
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminAccessListRequest.cs"
    },
    "TenantAdminCreateRequest": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "AdminSubjects",
          "type": "IReadOnlyList<string>",
          "required": false
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminCreateRequest.cs"
    },
    "TenantAdminEffectivePermissionsRequest": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "SubjectId",
          "type": "string",
          "required": true
        },
        {
          "name": "TreeName",
          "type": "string?",
          "required": false
        },
        {
          "name": "SubjectKind",
          "type": "TenantSubjectKind",
          "required": false
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminEffectivePermissionsRequest.cs"
    },
    "TenantAdminExplainRequest": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "SubjectId",
          "type": "string",
          "required": true
        },
        {
          "name": "TreeName",
          "type": "string",
          "required": true
        },
        {
          "name": "Key",
          "type": "string?",
          "required": false
        },
        {
          "name": "Operation",
          "type": "LatticeOperation",
          "required": false
        },
        {
          "name": "SubjectKind",
          "type": "TenantSubjectKind",
          "required": false
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminExplainRequest.cs"
    },
    "TenantAdminGrantOfferRequest": {
      "kind": "record",
      "fields": [
        {
          "name": "GranterTenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "GranteeTenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "Scope",
          "type": "string",
          "required": true
        },
        {
          "name": "Operations",
          "type": "TenantGrantAccess",
          "required": true
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminGrantOfferRequest.cs"
    },
    "TenantAdminGrantRequest": {
      "kind": "record",
      "fields": [
        {
          "name": "GranterTenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "GranteeTenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "Scope",
          "type": "string",
          "required": true
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminGrantRequest.cs"
    },
    "TenantAdminGroupLookup": {
      "kind": "record",
      "fields": [
        {
          "name": "Group",
          "type": "TenantGroupDescriptor?",
          "required": false
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminGroupLookup.cs"
    },
    "TenantAdminGroupMemberList": {
      "kind": "record",
      "fields": [
        {
          "name": "Members",
          "type": "IReadOnlyList<TenantGroupMember>",
          "required": false
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminGroupMemberList.cs"
    },
    "TenantAdminGroupMemberRequest": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "GroupName",
          "type": "string",
          "required": true
        },
        {
          "name": "MemberId",
          "type": "string",
          "required": true
        },
        {
          "name": "MemberKind",
          "type": "TenantSubjectKind",
          "required": false
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminGroupMemberRequest.cs"
    },
    "TenantAdminGroupRequest": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "GroupName",
          "type": "string",
          "required": true
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminGroupRequest.cs"
    },
    "TenantAdminGroupUpsertRequest": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "Group",
          "type": "TenantGroupDescriptor",
          "required": true
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminGroupUpsertRequest.cs"
    },
    "TenantAdminMemberRequest": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "SubjectId",
          "type": "string",
          "required": true
        },
        {
          "name": "SubjectKind",
          "type": "TenantSubjectKind",
          "required": false
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminMemberRequest.cs"
    },
    "TenantAdminRegionSetRequest": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "Regions",
          "type": "IReadOnlyList<string>",
          "required": false
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminRegionSetRequest.cs"
    },
    "TenantAdminRuleLookup": {
      "kind": "record",
      "fields": [
        {
          "name": "Rule",
          "type": "TenantRuleView?",
          "required": false
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminRuleLookup.cs"
    },
    "TenantAdminRulePutRequest": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "Rule",
          "type": "TenantRuleDraft",
          "required": true
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminRulePutRequest.cs"
    },
    "TenantAdminRuleRemoval": {
      "kind": "record",
      "fields": [
        {
          "name": "Removed",
          "type": "bool",
          "required": false
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminRuleRemoval.cs"
    },
    "TenantAdminRuleRequest": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "RuleId",
          "type": "string",
          "required": true
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminRuleRequest.cs"
    },
    "TenantAdminSetQuotasRequest": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "Quotas",
          "type": "TenantQuotasDescriptor",
          "required": true
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminSetQuotasRequest.cs"
    },
    "TenantAdminSubjectRequest": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "SubjectId",
          "type": "string",
          "required": true
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminSubjectRequest.cs"
    },
    "TenantAdminTenantRequest": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminTenantRequest.cs"
    },
    "TenantCreationResult": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "Status",
          "type": "TenantLifecycleStatus",
          "required": true
        },
        {
          "name": "AdminSubjects",
          "type": "IReadOnlyList<string>",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantCreationResult.cs"
    },
    "TenantDeletionResult": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "CascadedTreeCount",
          "type": "int",
          "required": true
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantDeletionResult.cs"
    },
    "TenantDescriptor": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "Status",
          "type": "TenantLifecycleStatus",
          "required": true
        },
        {
          "name": "IsDefault",
          "type": "bool",
          "required": true
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantDescriptor.cs"
    },
    "TenantEffectivePermissions": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "SubjectId",
          "type": "string",
          "required": true
        },
        {
          "name": "SubjectKind",
          "type": "TenantSubjectKind",
          "required": false
        },
        {
          "name": "TreeName",
          "type": "string?",
          "required": false
        },
        {
          "name": "Rules",
          "type": "IReadOnlyList<TenantRuleView>",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantEffectivePermissions.cs"
    },
    "TenantExplanation": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "SubjectId",
          "type": "string",
          "required": true
        },
        {
          "name": "SubjectKind",
          "type": "TenantSubjectKind",
          "required": false
        },
        {
          "name": "TreeName",
          "type": "string",
          "required": true
        },
        {
          "name": "Key",
          "type": "string?",
          "required": false
        },
        {
          "name": "Operation",
          "type": "LatticeOperation",
          "required": false
        },
        {
          "name": "Allowed",
          "type": "bool",
          "required": false
        },
        {
          "name": "Filtered",
          "type": "bool",
          "required": false
        },
        {
          "name": "Reason",
          "type": "string?",
          "required": false
        },
        {
          "name": "DecidingLayer",
          "type": "TenantRuleLayer?",
          "required": false
        },
        {
          "name": "DecidingRule",
          "type": "TenantRuleView?",
          "required": false
        },
        {
          "name": "DefaultEffect",
          "type": "LatticeEffect",
          "required": false
        },
        {
          "name": "MatchedRules",
          "type": "IReadOnlyList<TenantRuleView>",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantExplanation.cs"
    },
    "TenantGrantChangeResult": {
      "kind": "record",
      "fields": [
        {
          "name": "Grant",
          "type": "TenantGrantDescriptor",
          "required": true
        },
        {
          "name": "Changed",
          "type": "bool",
          "required": true
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantGrantChangeResult.cs"
    },
    "TenantGrantDescriptor": {
      "kind": "record",
      "fields": [
        {
          "name": "GranterTenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "GranteeTenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "Scope",
          "type": "string",
          "required": true
        },
        {
          "name": "Operations",
          "type": "TenantGrantAccess",
          "required": true
        },
        {
          "name": "State",
          "type": "TenantGrantLifecycleState",
          "required": true
        },
        {
          "name": "GrantId",
          "type": "string",
          "required": true
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantGrantDescriptor.cs"
    },
    "TenantGrantReport": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "Issued",
          "type": "IReadOnlyList<TenantGrantDescriptor>",
          "required": false
        },
        {
          "name": "Received",
          "type": "IReadOnlyList<TenantGrantDescriptor>",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantGrantReport.cs"
    },
    "TenantGroupDescriptor": {
      "kind": "record",
      "fields": [
        {
          "name": "Name",
          "type": "string",
          "required": true
        },
        {
          "name": "DisplayName",
          "type": "string?",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantGroupDescriptor.cs"
    },
    "TenantGroupMember": {
      "kind": "record",
      "fields": [
        {
          "name": "MemberId",
          "type": "string",
          "required": true
        },
        {
          "name": "Kind",
          "type": "TenantSubjectKind",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantGroupMember.cs"
    },
    "TenantGroupPage": {
      "kind": "record",
      "fields": [
        {
          "name": "Entries",
          "type": "IReadOnlyList<TenantGroupDescriptor>",
          "required": false
        },
        {
          "name": "NextPageToken",
          "type": "string?",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantGroupPage.cs"
    },
    "TenantGroupRemovalResult": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "GroupName",
          "type": "string",
          "required": true
        },
        {
          "name": "Removed",
          "type": "bool",
          "required": false
        },
        {
          "name": "EdgesRemoved",
          "type": "int",
          "required": false
        },
        {
          "name": "RemovedFromMemberSet",
          "type": "bool",
          "required": false
        },
        {
          "name": "RemovedFromAdminSet",
          "type": "bool",
          "required": false
        },
        {
          "name": "RemovedRuleIds",
          "type": "IReadOnlyList<string>",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantGroupRemovalResult.cs"
    },
    "TenantMemberEntry": {
      "kind": "record",
      "fields": [
        {
          "name": "SubjectId",
          "type": "string",
          "required": true
        },
        {
          "name": "Kind",
          "type": "TenantSubjectKind",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantMemberEntry.cs"
    },
    "TenantMemberPage": {
      "kind": "record",
      "fields": [
        {
          "name": "Entries",
          "type": "IReadOnlyList<TenantMemberEntry>",
          "required": false
        },
        {
          "name": "NextPageToken",
          "type": "string?",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantMemberPage.cs"
    },
    "TenantMembershipChangeResult": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "GroupName",
          "type": "string?",
          "required": false
        },
        {
          "name": "SubjectId",
          "type": "string",
          "required": true
        },
        {
          "name": "SubjectKind",
          "type": "TenantSubjectKind",
          "required": false
        },
        {
          "name": "Changed",
          "type": "bool",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantMembershipChangeResult.cs"
    },
    "TenantQuotaEnforcementScope": {
      "kind": "enum",
      "values": [
        "GlobalConverged",
        "PerCluster"
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantQuotaEnforcementScope.cs#TenantQuotaEnforcementScope"
    },
    "TenantQuotaUsageReport": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "EnforcementScope",
          "type": "TenantQuotaEnforcementScope",
          "required": true
        },
        {
          "name": "HasUsage",
          "type": "bool",
          "required": true
        },
        {
          "name": "Quotas",
          "type": "TenantQuotasDescriptor",
          "required": true
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantQuotaUsageReport.cs"
    },
    "TenantQuotasDescriptor": {
      "kind": "struct",
      "fields": [
        {
          "name": "MaxBytes",
          "type": "long?",
          "required": false
        },
        {
          "name": "MaxKeys",
          "type": "long?",
          "required": false
        },
        {
          "name": "MaxMemoryBytes",
          "type": "long?",
          "required": false
        },
        {
          "name": "MaxTreeCount",
          "type": "long?",
          "required": false
        },
        {
          "name": "MaxOpsPerSecond",
          "type": "long?",
          "required": false
        },
        {
          "name": "BurstPercent",
          "type": "int",
          "required": true
        },
        {
          "name": "MaxGroups",
          "type": "long?",
          "required": false,
          "notes": "Delegated tenant access cap; null means the built-in default, never unbounded."
        },
        {
          "name": "MaxMembershipEdges",
          "type": "long?",
          "required": false,
          "notes": "Delegated tenant access cap; null means the built-in default, never unbounded."
        },
        {
          "name": "MaxMemberSubjects",
          "type": "long?",
          "required": false,
          "notes": "Delegated tenant access cap; null means the built-in default, never unbounded."
        },
        {
          "name": "MaxTenantRules",
          "type": "long?",
          "required": false,
          "notes": "Delegated tenant access cap; null means the built-in default, never unbounded."
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantQuotasDescriptor.cs"
    },
    "TenantRegionStatusReport": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "Regions",
          "type": "IReadOnlyList<TenantRegionStatusDescriptor>",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantRegionStatusReport.cs"
    },
    "TenantResidencyChangeResult": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "AddedRegions",
          "type": "IReadOnlyList<string>",
          "required": false
        },
        {
          "name": "RemovedRegions",
          "type": "IReadOnlyList<string>",
          "required": false
        },
        {
          "name": "Regions",
          "type": "IReadOnlyList<TenantRegionStatusDescriptor>",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantResidencyChangeResult.cs"
    },
    "TenantRuleDraft": {
      "kind": "record",
      "fields": [
        {
          "name": "RuleId",
          "type": "string",
          "required": true
        },
        {
          "name": "SubjectId",
          "type": "string",
          "required": true
        },
        {
          "name": "SubjectKind",
          "type": "TenantSubjectKind",
          "required": false
        },
        {
          "name": "ScopeKind",
          "type": "TenantRuleScopeKind",
          "required": false
        },
        {
          "name": "TreeName",
          "type": "string?",
          "required": false
        },
        {
          "name": "KeyOrPrefix",
          "type": "string?",
          "required": false
        },
        {
          "name": "Operations",
          "type": "LatticeOperation",
          "required": false
        },
        {
          "name": "Effect",
          "type": "LatticeEffect",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantRuleDraft.cs"
    },
    "TenantRuleLayer": {
      "kind": "enum",
      "values": [
        "Platform",
        "Tenant"
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantRuleLayer.cs#TenantRuleLayer"
    },
    "TenantRuleOrigin": {
      "kind": "enum",
      "values": [
        "PlatformTree",
        "PlatformWide",
        "AppRole",
        "Tenant"
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantRuleOrigin.cs#TenantRuleOrigin"
    },
    "TenantRulePage": {
      "kind": "record",
      "fields": [
        {
          "name": "Entries",
          "type": "IReadOnlyList<TenantRuleView>",
          "required": false
        },
        {
          "name": "NextPageToken",
          "type": "string?",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantRulePage.cs"
    },
    "TenantRuleScopeKind": {
      "kind": "enum",
      "values": [
        "Tree",
        "Key",
        "Prefix",
        "TenantWide"
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantRuleScopeKind.cs#TenantRuleScopeKind"
    },
    "TenantRuleView": {
      "kind": "record",
      "fields": [
        {
          "name": "RuleId",
          "type": "string",
          "required": true
        },
        {
          "name": "Layer",
          "type": "TenantRuleLayer",
          "required": false
        },
        {
          "name": "Origin",
          "type": "TenantRuleOrigin",
          "required": false
        },
        {
          "name": "Editable",
          "type": "bool",
          "required": false
        },
        {
          "name": "SubjectId",
          "type": "string?",
          "required": false
        },
        {
          "name": "SubjectKind",
          "type": "TenantSubjectKind",
          "required": false
        },
        {
          "name": "ScopeKind",
          "type": "TenantRuleScopeKind",
          "required": false
        },
        {
          "name": "TreeName",
          "type": "string?",
          "required": false
        },
        {
          "name": "KeyOrPrefix",
          "type": "string?",
          "required": false
        },
        {
          "name": "Operations",
          "type": "LatticeOperation",
          "required": false
        },
        {
          "name": "Effect",
          "type": "LatticeEffect",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantRuleView.cs"
    },
    "TenantSelfCurrentRequest": {
      "kind": "record",
      "fields": [],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantSelfCurrentRequest.cs"
    },
    "TenantSelfDescriptorList": {
      "kind": "record",
      "fields": [
        {
          "name": "Tenants",
          "type": "IReadOnlyList<TenantDescriptor>",
          "required": false
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantSelfDescriptorList.cs"
    },
    "TenantSelfListRequest": {
      "kind": "record",
      "fields": [],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantSelfListRequest.cs"
    },
    "TenantStatusChangeResult": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "PreviousStatus",
          "type": "TenantLifecycleStatus",
          "required": true
        },
        {
          "name": "NewStatus",
          "type": "TenantLifecycleStatus",
          "required": true
        },
        {
          "name": "Changed",
          "type": "bool",
          "required": true
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantStatusChangeResult.cs"
    },
    "TenantStatusReport": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "Status",
          "type": "TenantLifecycleStatus",
          "required": true
        },
        {
          "name": "IsDefault",
          "type": "bool",
          "required": true
        },
        {
          "name": "Regions",
          "type": "IReadOnlyList<TenantRegionStatusDescriptor>",
          "required": false
        },
        {
          "name": "Quotas",
          "type": "TenantQuotasDescriptor",
          "required": true
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantStatusReport.cs"
    },
    "TenantSubjectKind": {
      "kind": "enum",
      "values": [
        "User",
        "TenantGroup",
        "ClusterGroup"
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantSubjectKind.cs#TenantSubjectKind"
    },
    "TenantSubjectResolution": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "SubjectId",
          "type": "string",
          "required": true
        },
        {
          "name": "SubjectKind",
          "type": "TenantSubjectKind",
          "required": false
        },
        {
          "name": "IsAdmin",
          "type": "bool",
          "required": false
        },
        {
          "name": "IsMember",
          "type": "bool",
          "required": false
        },
        {
          "name": "AdminEntries",
          "type": "IReadOnlyList<TenantMemberEntry>",
          "required": false
        },
        {
          "name": "MemberEntries",
          "type": "IReadOnlyList<TenantMemberEntry>",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantSubjectResolution.cs"
    },
    "TenantRegionBackfillProgress": {
      "kind": "record",
      "fields": [
        {
          "name": "Phase",
          "type": "string",
          "required": true
        },
        {
          "name": "StallReason",
          "type": "string?",
          "required": false
        },
        {
          "name": "Trees",
          "type": "IReadOnlyList<TenantRegionBackfillTreeProgress>",
          "required": true
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantRegionBackfillProgress.cs"
    },
    "TenantRegionBackfillTreeProgress": {
      "kind": "record",
      "fields": [
        {
          "name": "TreeId",
          "type": "string",
          "required": true
        },
        {
          "name": "Phase",
          "type": "string",
          "required": true
        },
        {
          "name": "EntriesApplied",
          "type": "long",
          "required": false
        },
        {
          "name": "SourceClusterId",
          "type": "string?",
          "required": false
        },
        {
          "name": "ReadFenced",
          "type": "bool",
          "required": false
        },
        {
          "name": "PendingDeadLetters",
          "type": "int",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantRegionBackfillTreeProgress.cs"
    },
    "TenantRegionStatusDescriptor": {
      "kind": "record",
      "fields": [
        {
          "name": "RegionId",
          "type": "string",
          "required": true
        },
        {
          "name": "Status",
          "type": "TenantRegionLifecycleStatus",
          "required": false
        },
        {
          "name": "IsAllowed",
          "type": "bool",
          "required": false
        },
        {
          "name": "BackfillProgress",
          "type": "TenantRegionBackfillProgress?",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/TenantAdmin/Model/TenantRegionStatusDescriptor.cs"
    },
    "TenantAdminAuditListRequest": {
      "kind": "record",
      "fields": [
        {
          "name": "TenantId",
          "type": "string",
          "required": true
        },
        {
          "name": "Query",
          "type": "AdminAuditQuery",
          "required": true
        }
      ],
      "source": "src/lattice.api.tenantadmin.grpc/Model/TenantAdminAuditListRequest.cs"
    },
    "AdminAuditQuery": {
      "kind": "record",
      "fields": [
        {
          "name": "PageSize",
          "type": "int",
          "required": false
        },
        {
          "name": "PageToken",
          "type": "string?",
          "required": false
        },
        {
          "name": "Scope",
          "type": "string?",
          "required": false
        },
        {
          "name": "From",
          "type": "DateTimeOffset?",
          "required": false
        },
        {
          "name": "To",
          "type": "DateTimeOffset?",
          "required": false
        },
        {
          "name": "Actor",
          "type": "string?",
          "required": false
        },
        {
          "name": "Action",
          "type": "LatticeAdminAuditAction?",
          "required": false
        },
        {
          "name": "Outcome",
          "type": "LatticeAdminAuditOutcome?",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/Auth/Model/AdminAuditQuery.cs"
    },
    "AdminAuditPage": {
      "kind": "record",
      "fields": [
        {
          "name": "Records",
          "type": "IReadOnlyList<LatticeAdminAuditRecord>",
          "required": false
        },
        {
          "name": "NextPageToken",
          "type": "string?",
          "required": false
        }
      ],
      "source": "src/lattice.api.abstractions/Auth/Model/AdminAuditPage.cs"
    }
  },
  "operations": [
    {
      "id": "add-tenant-admin-subject",
      "in_process": "ILatticeTenantAccessAdmin.AddAdminSubjectAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/AddTenantAdminSubject",
      "transport_scope": "both",
      "request": "TenantAdminSubjectRequest",
      "response": "TenantAdminSubjectChangeResult",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "Invalid tenant id or subject id."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither platform operator nor target tenant admin."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Reserved default tenant target."
        },
        {
          "error_id": "unimplemented",
          "condition": "Tenant access-administration facade is not registered."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "No facade retry policy is defined; configure retries on the caller or CallInvoker.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Adding an existing admin subject reports Changed false.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAccessAdmin.cs"
      },
      "concurrency": {
        "rule": "Admin-subject mutations are stamped through the tenant record CRDT merge.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAccessAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAccessAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "add-tenant-group-member",
      "in_process": "ILatticeTenantDirectoryAdmin.AddGroupMemberAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/AddTenantGroupMember",
      "transport_scope": "both",
      "request": "TenantAdminGroupMemberRequest",
      "response": "TenantMembershipChangeResult",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "Malformed tenant id, name or subject id, or a confinement violation (TenantAccessConfinementException: foreign tenant group, group nesting, rule tree, rule operations, reserved rule id)."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither a platform operator nor an admin of the target tenant (group-aware while delegated tenant access administration is enabled)."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Delegated tenant access administration is disabled, the target is the reserved default tenant, or (removals) the last admin entry would be removed."
        },
        {
          "error_id": "quota-exceeded",
          "condition": "A D13 delegated-access cap (MaxGroups, MaxMembershipEdges, MaxMemberSubjects or MaxTenantRules) would be exceeded; carried as ResourceExhausted with lattice-quota-dimension, -current and -limit trailers."
        },
        {
          "error_id": "unimplemented",
          "condition": "The tenant directory or tenant policy facade is not registered on the host."
        }
      ],
      "retry": {
        "safe": false,
        "policy": "No facade retry policy is defined; configure retries on the caller or CallInvoker.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Adding an existing member reports Changed false.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs"
      },
      "concurrency": {
        "rule": "Directory writes run under system origin through the membership store and the tenant record CRDT merge; D13 caps use verify-and-compensate.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "add-tenant-member",
      "in_process": "ILatticeTenantDirectoryAdmin.AddMemberAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/AddTenantMember",
      "transport_scope": "both",
      "request": "TenantAdminMemberRequest",
      "response": "TenantMembershipChangeResult",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "Malformed tenant id, name or subject id, or a confinement violation (TenantAccessConfinementException: foreign tenant group, group nesting, rule tree, rule operations, reserved rule id)."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither a platform operator nor an admin of the target tenant (group-aware while delegated tenant access administration is enabled)."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Delegated tenant access administration is disabled, the target is the reserved default tenant, or (removals) the last admin entry would be removed."
        },
        {
          "error_id": "quota-exceeded",
          "condition": "A D13 delegated-access cap (MaxGroups, MaxMembershipEdges, MaxMemberSubjects or MaxTenantRules) would be exceeded; carried as ResourceExhausted with lattice-quota-dimension, -current and -limit trailers."
        },
        {
          "error_id": "unimplemented",
          "condition": "The tenant directory or tenant policy facade is not registered on the host."
        }
      ],
      "retry": {
        "safe": false,
        "policy": "No facade retry policy is defined; configure retries on the caller or CallInvoker.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Adding an existing member-set entry reports Changed false.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs"
      },
      "concurrency": {
        "rule": "Directory writes run under system origin through the membership store and the tenant record CRDT merge; D13 caps use verify-and-compensate.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "advance-tenant-region",
      "in_process": "ILatticeTenantRegionAdmin.AdvanceRegionAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/AdvanceTenantRegion",
      "transport_scope": "both",
      "request": "TenantAdminRegionSetRequest",
      "response": "TenantRegionStatusReport",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "Tenant or region id is invalid, or acknowledgeDataInPlace is false."
        },
        {
          "error_id": "not-found",
          "condition": "Tenant does not exist."
        },
        {
          "error_id": "failed-precondition",
          "condition": "The region cannot make a legal one-step lifecycle transition."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is not a platform operator."
        },
        {
          "error_id": "unimplemented",
          "condition": "Region-residency facade is not registered."
        }
      ],
      "retry": {
        "safe": false,
        "policy": "Read the current region status before retrying; a repeated call may advance another legal lifecycle step.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": false,
        "basis": "Each call advances one lifecycle step, so repeating a successful call may advance the region again.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantRegionAdmin.cs"
      },
      "concurrency": {
        "rule": "Platform-operator-only and requires acknowledgement that data is already in place; it bypasses verified backfill. Normal region enablement backfills automatically.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantRegionAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantRegionAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "approve-cross-tenant-grant",
      "in_process": "ILatticeTenantGrantAdmin.ApproveGrantAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/ApproveCrossTenantGrant",
      "transport_scope": "both",
      "request": "TenantAdminGrantRequest",
      "response": "TenantGrantChangeResult",
      "errors": [
        {
          "error_id": "not-found",
          "condition": "No such grant was offered."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Grant is not pending."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is not platform operator and not an admin of the grantee tenant."
        },
        {
          "error_id": "unimplemented",
          "condition": "Cross-tenant grant facade is not registered."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "No facade retry policy is defined; repeated approval of an active grant is idempotent.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Idempotent on an already-active grant.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantGrantAdmin.cs"
      },
      "concurrency": {
        "rule": "Concurrent grant transitions converge on the more restrictive outcome.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantGrantAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantGrantAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "authorize-allowed-regions",
      "in_process": "ILatticeTenantRegionAdmin.AuthorizeAllowedRegionsAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/AuthorizeAllowedRegions",
      "transport_scope": "both",
      "request": "TenantAdminRegionSetRequest",
      "response": "TenantRegionAuthorizationResult",
      "errors": [
        {
          "error_id": "failed-precondition",
          "condition": "A revoked region is still resident."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is not a platform operator."
        },
        {
          "error_id": "unimplemented",
          "condition": "Region-residency facade is not registered."
        }
      ],
      "retry": {
        "safe": false,
        "policy": "Retry only when resubmitting the same complete allowed-region set.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": "conditional",
        "basis": "The call sets the allowed set to exactly the supplied regions.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantRegionAdmin.cs"
      },
      "concurrency": {
        "rule": "Residency must stay a subset of the allowed set; revoking a resident region is refused.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantRegionAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantRegionAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "create-tenant",
      "in_process": "ILatticeTenantAdmin.CreateTenantAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/CreateTenant",
      "transport_scope": "both",
      "request": "TenantAdminCreateRequest",
      "response": "TenantCreationResult",
      "errors": [
        {
          "error_id": "already-exists",
          "condition": "Tenant id is already registered."
        },
        {
          "error_id": "cancelled",
          "condition": "The call was cancelled."
        },
        {
          "error_id": "internal",
          "condition": "A tenant-registry write exhausted its bounded optimistic-concurrency retry budget (TenantRegistryConcurrencyException), or another unhandled failure occurred."
        },
        {
          "error_id": "invalid-argument",
          "condition": "Invalid tenant id or admin subject."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is not authorized to administer tenants."
        }
      ],
      "retry": {
        "safe": false,
        "policy": "Create is not an idempotent upsert; retry can observe AlreadyExists after a successful first attempt.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": false,
        "basis": "Create fails with TenantAlreadyExistsException when the tenant is already registered.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAdmin.cs"
      },
      "concurrency": {
        "rule": "The facade refuses a duplicate tenant id rather than resetting an existing definition.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs",
        "src/lattice.tenancy/TenantRegistryConcurrencyException.cs#TenantRegistryConcurrencyException"
      ]
    },
    {
      "id": "delete-tenant",
      "in_process": "ILatticeTenantAdmin.DeleteTenantAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/DeleteTenant",
      "transport_scope": "both",
      "request": "TenantAdminTenantRequest",
      "response": "TenantDeletionResult",
      "errors": [
        {
          "error_id": "cancelled",
          "condition": "The call was cancelled."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Tenant id is the reserved default tenant."
        },
        {
          "error_id": "internal",
          "condition": "A tenant-registry write exhausted its bounded optimistic-concurrency retry budget (TenantRegistryConcurrencyException), or another unhandled failure occurred."
        },
        {
          "error_id": "not-found",
          "condition": "Tenant id is not registered."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is not authorized to administer tenants."
        }
      ],
      "retry": {
        "safe": false,
        "policy": "Retry after a successful delete observes NotFound.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": false,
        "basis": "Delete fails closed with TenantNotFoundException when the tenant is absent.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAdmin.cs"
      },
      "concurrency": {
        "rule": "Deletes cascade tenant-owned tree soft deletes before removing the registry record.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs",
        "src/lattice.tenancy/TenantRegistryConcurrencyException.cs#TenantRegistryConcurrencyException"
      ]
    },
    {
      "id": "explain-tenant-access",
      "in_process": "ILatticeTenantPolicyAdmin.ExplainAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/ExplainTenantAccess",
      "transport_scope": "both",
      "request": "TenantAdminExplainRequest",
      "response": "TenantExplanation",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "Malformed tenant id, name or subject id, or a confinement violation (TenantAccessConfinementException: foreign tenant group, group nesting, rule tree, rule operations, reserved rule id)."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither a platform operator nor an admin of the target tenant (group-aware while delegated tenant access administration is enabled)."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Delegated tenant access administration is disabled, the target is the reserved default tenant, or (removals) the last admin entry would be removed."
        },
        {
          "error_id": "unimplemented",
          "condition": "The tenant directory or tenant policy facade is not registered on the host."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only tenant-tier operation.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Read-only layer-aware explanation.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs"
      },
      "concurrency": {
        "rule": "Rule writes run under system origin through the policy store; MaxTenantRules uses verify-and-compensate.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "get-auth-scheme",
      "in_process": null,
      "grpc_method": "/orleans.lattice.api.tenantadmin/GetAuthScheme",
      "transport_scope": "grpc_only",
      "request": "AuthSchemeAdvertisementRequest",
      "response": "AuthSchemeAdvertisement",
      "errors": [],
      "retry": {
        "safe": true,
        "policy": "Unauthenticated read-only advertisement.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Reads configured public auth-scheme advertisement.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      },
      "concurrency": {
        "rule": "No state mutation.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      },
      "sources": [
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs"
      ],
      "transport_scope_source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs#GetAuthScheme"
    },
    {
      "id": "get-current-tenant",
      "in_process": "ILatticeTenantSelfService.GetCurrentTenantAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/GetCurrentTenant",
      "transport_scope": "both",
      "request": "TenantSelfCurrentRequest",
      "response": "TenantDescriptor",
      "errors": [
        {
          "error_id": "permission-denied",
          "condition": "Active tenant assertion is not valid for the caller."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only self-service operation.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantSelfServiceApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Read-only current tenant resolution.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantSelfService.cs"
      },
      "concurrency": {
        "rule": "No state mutation.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantSelfService.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantSelfService.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "get-tenant",
      "in_process": "ILatticeTenantSelfService.GetTenantAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/GetTenant",
      "transport_scope": "both",
      "request": "TenantAdminTenantRequest",
      "response": "TenantStatusReport",
      "errors": [
        {
          "error_id": "not-found",
          "condition": "Tenant does not exist or caller is not authorized to see it."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only self-service operation.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantSelfServiceApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Read-only tenant status report.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantSelfService.cs"
      },
      "concurrency": {
        "rule": "Absent and unauthorized tenants are deliberately indistinguishable; accessibility is evaluated with the caller resolved groups.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantSelfService.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantSelfService.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "get-tenant-access-posture",
      "in_process": "ILatticeTenantPolicyAdmin.GetPostureAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/GetTenantAccessPosture",
      "transport_scope": "both",
      "request": "TenantAdminTenantRequest",
      "response": "TenantAccessPosture",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "Malformed tenant id, name or subject id, or a confinement violation (TenantAccessConfinementException: foreign tenant group, group nesting, rule tree, rule operations, reserved rule id)."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither a platform operator nor an admin of the target tenant (group-aware while delegated tenant access administration is enabled)."
        },
        {
          "error_id": "failed-precondition",
          "condition": "The target is the reserved default tenant."
        },
        {
          "error_id": "unimplemented",
          "condition": "The tenant directory or tenant policy facade is not registered on the host."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only tenant-tier operation.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Read-only posture; answers while the feature is disabled.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs"
      },
      "concurrency": {
        "rule": "Rule writes run under system origin through the policy store; MaxTenantRules uses verify-and-compensate.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "get-tenant-effective-permissions",
      "in_process": "ILatticeTenantPolicyAdmin.EffectivePermissionsAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/GetTenantEffectivePermissions",
      "transport_scope": "both",
      "request": "TenantAdminEffectivePermissionsRequest",
      "response": "TenantEffectivePermissions",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "Malformed tenant id, name or subject id, or a confinement violation (TenantAccessConfinementException: foreign tenant group, group nesting, rule tree, rule operations, reserved rule id)."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither a platform operator nor an admin of the target tenant (group-aware while delegated tenant access administration is enabled)."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Delegated tenant access administration is disabled, the target is the reserved default tenant, or (removals) the last admin entry would be removed."
        },
        {
          "error_id": "unimplemented",
          "condition": "The tenant directory or tenant policy facade is not registered on the host."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only tenant-tier operation.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Read-only effective permissions.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs"
      },
      "concurrency": {
        "rule": "Rule writes run under system origin through the policy store; MaxTenantRules uses verify-and-compensate.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "get-tenant-group",
      "in_process": "ILatticeTenantDirectoryAdmin.GetGroupAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/GetTenantGroup",
      "transport_scope": "both",
      "request": "TenantAdminGroupRequest",
      "response": "TenantAdminGroupLookup",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "Malformed tenant id, name or subject id, or a confinement violation (TenantAccessConfinementException: foreign tenant group, group nesting, rule tree, rule operations, reserved rule id)."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither a platform operator nor an admin of the target tenant (group-aware while delegated tenant access administration is enabled)."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Delegated tenant access administration is disabled, the target is the reserved default tenant, or (removals) the last admin entry would be removed."
        },
        {
          "error_id": "unimplemented",
          "condition": "The tenant directory or tenant policy facade is not registered on the host."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only tenant-tier operation.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Read-only group lookup; null when absent.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs"
      },
      "concurrency": {
        "rule": "Directory writes run under system origin through the membership store and the tenant record CRDT merge; D13 caps use verify-and-compensate.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "get-tenant-quota-usage",
      "in_process": "ILatticeTenantQuotaUsage.GetQuotaUsageAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/GetTenantQuotaUsage",
      "transport_scope": "both",
      "request": "TenantAdminTenantRequest",
      "response": "TenantQuotaUsageReport",
      "errors": [
        {
          "error_id": "not-found",
          "condition": "Tenant does not exist or caller is not authorized to read it."
        },
        {
          "error_id": "unimplemented",
          "condition": "Quota usage facade is not registered."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only tenant-tier operation.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Read-only quota usage report.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantQuotaUsage.cs"
      },
      "concurrency": {
        "rule": "Reads the tenancy engine warm per-tenant usage index.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantQuotaUsage.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantQuotaUsage.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "get-tenant-region-status",
      "in_process": "ILatticeTenantRegionAdmin.GetTenantRegionStatusAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/GetTenantRegionStatus",
      "transport_scope": "both",
      "request": "TenantAdminTenantRequest",
      "response": "TenantRegionStatusReport",
      "errors": [
        {
          "error_id": "not-found",
          "condition": "Tenant does not exist."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither platform operator nor tenant admin."
        },
        {
          "error_id": "unimplemented",
          "condition": "Region-residency facade is not registered."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only tenant-tier operation.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Read-only per-region status report.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantRegionAdmin.cs"
      },
      "concurrency": {
        "rule": "Reports one row per allowed or non-None region. Backfilling rows carry BackfillProgress when the backfill service is registered. A nonlocal row reports NotLocal; local progress includes phase, stall reason and per-tree bootstrap state, source, entries applied, read fence and pending dead letters.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantRegionAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantRegionAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "get-tenant-rule",
      "in_process": "ILatticeTenantPolicyAdmin.GetRuleAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/GetTenantRule",
      "transport_scope": "both",
      "request": "TenantAdminRuleRequest",
      "response": "TenantAdminRuleLookup",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "Malformed tenant id, name or subject id, or a confinement violation (TenantAccessConfinementException: foreign tenant group, group nesting, rule tree, rule operations, reserved rule id)."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither a platform operator nor an admin of the target tenant (group-aware while delegated tenant access administration is enabled)."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Delegated tenant access administration is disabled, the target is the reserved default tenant, or (removals) the last admin entry would be removed."
        },
        {
          "error_id": "unimplemented",
          "condition": "The tenant directory or tenant policy facade is not registered on the host."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only tenant-tier operation.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Read-only rule lookup; null when absent.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs"
      },
      "concurrency": {
        "rule": "Rule writes run under system origin through the policy store; MaxTenantRules uses verify-and-compensate.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "list-accessible-tenants",
      "in_process": "ILatticeTenantSelfService.ListAccessibleTenantsAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/ListAccessibleTenants",
      "transport_scope": "both",
      "request": "TenantSelfListRequest",
      "response": "TenantSelfDescriptorList",
      "errors": [
        {
          "error_id": "permission-denied",
          "condition": "Active tenant assertion is not valid for the caller."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only self-service operation.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantSelfServiceApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Read-only accessible tenant enumeration.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantSelfService.cs"
      },
      "concurrency": {
        "rule": "Enumeration is scoped to the caller resolved subject and its resolved groups and omits tenants the caller cannot see; with delegated tenant access administration on, a tenant reached through a member entry or a group entry is listed. A group never admits to a tenant that is not group-aware (the reserved default tenant, or one compiled with the feature off), even when the group id is in its admin set.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantSelfService.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantSelfService.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "list-cross-tenant-grants",
      "in_process": "ILatticeTenantGrantAdmin.ListGrantsAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/ListCrossTenantGrants",
      "transport_scope": "both",
      "request": "TenantAdminTenantRequest",
      "response": "TenantGrantReport",
      "errors": [
        {
          "error_id": "not-found",
          "condition": "Tenant does not exist for an operator caller."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither platform operator nor tenant admin."
        },
        {
          "error_id": "unimplemented",
          "condition": "Cross-tenant grant facade is not registered."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only tenant-tier operation.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Read-only grant report.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantGrantAdmin.cs"
      },
      "concurrency": {
        "rule": "Lists issued and received grants in every lifecycle state.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantGrantAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantGrantAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "list-tenant-admin-subjects",
      "in_process": "ILatticeTenantAccessAdmin.ListAdminSubjectsAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/ListTenantAdminSubjects",
      "transport_scope": "both",
      "request": "TenantAdminTenantRequest",
      "response": "TenantAdminSubjectReport",
      "errors": [
        {
          "error_id": "not-found",
          "condition": "Tenant does not exist for an operator caller."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither platform operator nor tenant admin."
        },
        {
          "error_id": "unimplemented",
          "condition": "Tenant access-administration facade is not registered."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only tenant-tier operation.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Read-only tenant admin subject report.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAccessAdmin.cs"
      },
      "concurrency": {
        "rule": "Lists live tenant-admin subjects in ordinal order.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAccessAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAccessAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "list-tenant-audit",
      "in_process": "ILatticeTenantAuditLog.ListAuditAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/ListTenantAudit",
      "transport_scope": "both",
      "request": "TenantAdminAuditListRequest",
      "response": "AdminAuditPage",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "Malformed tenant id, page token or query window."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither a platform operator nor an admin of the target tenant, or the target tenant is foreign to the caller's active tenant."
        },
        {
          "error_id": "unimplemented",
          "condition": "The tenant audit log facade is not registered on the host."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only tenant-tier operation.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Paged read of the tenant's committed admin audit records; scope is forced to the validated tenant and pending intents are excluded.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAuditLog.cs"
      },
      "concurrency": {
        "rule": "Pages reflect committed audit records at read time; records written between pages may appear on later pages.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAuditLog.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAuditLog.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "list-tenant-group-members",
      "in_process": "ILatticeTenantDirectoryAdmin.ListGroupMembersAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/ListTenantGroupMembers",
      "transport_scope": "both",
      "request": "TenantAdminGroupRequest",
      "response": "TenantAdminGroupMemberList",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "Malformed tenant id, name or subject id, or a confinement violation (TenantAccessConfinementException: foreign tenant group, group nesting, rule tree, rule operations, reserved rule id)."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither a platform operator nor an admin of the target tenant (group-aware while delegated tenant access administration is enabled)."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Delegated tenant access administration is disabled, the target is the reserved default tenant, or (removals) the last admin entry would be removed."
        },
        {
          "error_id": "unimplemented",
          "condition": "The tenant directory or tenant policy facade is not registered on the host."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only tenant-tier operation.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Read-only listing of direct members.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs"
      },
      "concurrency": {
        "rule": "Directory writes run under system origin through the membership store and the tenant record CRDT merge; D13 caps use verify-and-compensate.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "list-tenant-groups",
      "in_process": "ILatticeTenantDirectoryAdmin.ListGroupsAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/ListTenantGroups",
      "transport_scope": "both",
      "request": "TenantAdminAccessListRequest",
      "response": "TenantGroupPage",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "Malformed tenant id, name or subject id, or a confinement violation (TenantAccessConfinementException: foreign tenant group, group nesting, rule tree, rule operations, reserved rule id)."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither a platform operator nor an admin of the target tenant (group-aware while delegated tenant access administration is enabled)."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Delegated tenant access administration is disabled, the target is the reserved default tenant, or (removals) the last admin entry would be removed."
        },
        {
          "error_id": "unimplemented",
          "condition": "The tenant directory or tenant policy facade is not registered on the host."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only tenant-tier operation.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Paged listing of the tenant's own groups.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs"
      },
      "concurrency": {
        "rule": "Directory writes run under system origin through the membership store and the tenant record CRDT merge; D13 caps use verify-and-compensate.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "list-tenant-members",
      "in_process": "ILatticeTenantDirectoryAdmin.ListMembersAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/ListTenantMembers",
      "transport_scope": "both",
      "request": "TenantAdminAccessListRequest",
      "response": "TenantMemberPage",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "Malformed tenant id, name or subject id, or a confinement violation (TenantAccessConfinementException: foreign tenant group, group nesting, rule tree, rule operations, reserved rule id)."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither a platform operator nor an admin of the target tenant (group-aware while delegated tenant access administration is enabled)."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Delegated tenant access administration is disabled, the target is the reserved default tenant, or (removals) the last admin entry would be removed."
        },
        {
          "error_id": "unimplemented",
          "condition": "The tenant directory or tenant policy facade is not registered on the host."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only tenant-tier operation.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Paged listing of the tenant member set.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs"
      },
      "concurrency": {
        "rule": "Directory writes run under system origin through the membership store and the tenant record CRDT merge; D13 caps use verify-and-compensate.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "list-tenant-rules",
      "in_process": "ILatticeTenantPolicyAdmin.ListRulesAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/ListTenantRules",
      "transport_scope": "both",
      "request": "TenantAdminAccessListRequest",
      "response": "TenantRulePage",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "Malformed tenant id, name or subject id, or a confinement violation (TenantAccessConfinementException: foreign tenant group, group nesting, rule tree, rule operations, reserved rule id)."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither a platform operator nor an admin of the target tenant (group-aware while delegated tenant access administration is enabled)."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Delegated tenant access administration is disabled, the target is the reserved default tenant, or (removals) the last admin entry would be removed."
        },
        {
          "error_id": "unimplemented",
          "condition": "The tenant directory or tenant policy facade is not registered on the host."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only tenant-tier operation.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Read-only paged listing of tenant-tier and read-only Platform rules.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs"
      },
      "concurrency": {
        "rule": "Rule writes run under system origin through the policy store; MaxTenantRules uses verify-and-compensate.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "offer-cross-tenant-grant",
      "in_process": "ILatticeTenantGrantAdmin.OfferGrantAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/OfferCrossTenantGrant",
      "transport_scope": "both",
      "request": "TenantAdminGrantOfferRequest",
      "response": "TenantGrantChangeResult",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "The scope is blank, operations is TenantGrantAccess.None, or the granting and grantee tenants are the same."
        },
        {
          "error_id": "failed-precondition",
          "condition": "A live active grant exists for the same grantee and scope or a reserved tenant was targeted."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is not platform operator and not an admin of the granting tenant."
        },
        {
          "error_id": "unimplemented",
          "condition": "Cross-tenant grant facade is not registered."
        }
      ],
      "retry": {
        "safe": false,
        "policy": "Retry only when resubmitting the same offer terms.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": "conditional",
        "basis": "Re-offering over a pending offer amends terms; re-offering over a terminal grant starts a fresh agreement.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantGrantAdmin.cs"
      },
      "concurrency": {
        "rule": "Grant writes are stamped through the tenant record CRDT merge and concurrent transitions converge on the more restrictive outcome.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantGrantAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantGrantAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "put-tenant-rule",
      "in_process": "ILatticeTenantPolicyAdmin.PutRuleAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/PutTenantRule",
      "transport_scope": "both",
      "request": "TenantAdminRulePutRequest",
      "response": "TenantRuleView",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "Malformed tenant id, name or subject id, or a confinement violation (TenantAccessConfinementException: foreign tenant group, group nesting, rule tree, rule operations, reserved rule id); or a templated (subject-relative) key or prefix whose {subject} or {group:<prefix>} placeholder is not followed by a literal delimiter, that carries more than 8 placeholders, or whose group prefix reaches tenant groups (t/...) outside this tenant."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither a platform operator nor an admin of the target tenant (group-aware while delegated tenant access administration is enabled)."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Delegated tenant access administration is disabled, the target is the reserved default tenant, or (removals) the last admin entry would be removed."
        },
        {
          "error_id": "quota-exceeded",
          "condition": "A D13 delegated-access cap (MaxGroups, MaxMembershipEdges, MaxMemberSubjects or MaxTenantRules) would be exceeded; carried as ResourceExhausted with lattice-quota-dimension, -current and -limit trailers."
        },
        {
          "error_id": "unimplemented",
          "condition": "The tenant directory or tenant policy facade is not registered on the host."
        }
      ],
      "retry": {
        "safe": false,
        "policy": "No facade retry policy is defined; configure retries on the caller or CallInvoker.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Putting the same draft again replaces the rule with an identical one; one stored copy per local id.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs"
      },
      "concurrency": {
        "rule": "Rule writes run under system origin through the policy store; MaxTenantRules uses verify-and-compensate.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs",
        "src/lattice.auth/ScopeTemplate.cs#ScopeTemplate.Validate"
      ]
    },
    {
      "id": "reject-cross-tenant-grant",
      "in_process": "ILatticeTenantGrantAdmin.RejectGrantAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/RejectCrossTenantGrant",
      "transport_scope": "both",
      "request": "TenantAdminGrantRequest",
      "response": "TenantGrantChangeResult",
      "errors": [
        {
          "error_id": "not-found",
          "condition": "No such grant was offered."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Grant is not pending."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is not platform operator and not an admin of the grantee tenant."
        },
        {
          "error_id": "unimplemented",
          "condition": "Cross-tenant grant facade is not registered."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "No facade retry policy is defined; repeated rejection of a rejected grant is idempotent.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Idempotent on an already-rejected grant.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantGrantAdmin.cs"
      },
      "concurrency": {
        "rule": "Concurrent grant transitions converge on the more restrictive outcome.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantGrantAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantGrantAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "remove-tenant-admin-subject",
      "in_process": "ILatticeTenantAccessAdmin.RemoveAdminSubjectAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/RemoveTenantAdminSubject",
      "transport_scope": "both",
      "request": "TenantAdminSubjectRequest",
      "response": "TenantAdminSubjectChangeResult",
      "errors": [
        {
          "error_id": "failed-precondition",
          "condition": "Removal would leave no admin subjects or the reserved default tenant was targeted."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither platform operator nor target tenant admin."
        },
        {
          "error_id": "unimplemented",
          "condition": "Tenant access-administration facade is not registered."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "No facade retry policy is defined; removing a non-member reports Changed false.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Removing a subject that is not a member reports Changed false.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAccessAdmin.cs"
      },
      "concurrency": {
        "rule": "The last-admin guard is re-applied to the merged record inside the registry compare-and-set loop, so of two concurrent removals that would together empty the set the second to commit is refused with nothing written. The removal is stamped later than the slot it supersedes.",
        "source": "src/lattice.api.tenantadmin/TenantAdminSetCommit.cs#TenantAdminSetCommit"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAccessAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "remove-tenant-group",
      "in_process": "ILatticeTenantDirectoryAdmin.RemoveGroupAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/RemoveTenantGroup",
      "transport_scope": "both",
      "request": "TenantAdminGroupRequest",
      "response": "TenantGroupRemovalResult",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "The tenant id is not a valid tenant id, or the group name is not a valid local group name."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither a platform operator nor an admin of the target tenant (group-aware while delegated tenant access administration is enabled)."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Delegated tenant access administration is disabled, the target is the reserved default tenant, or the group is the tenant's last admin-set entry (TenantLastAdminSubjectException)."
        },
        {
          "error_id": "unimplemented",
          "condition": "The tenant directory or tenant policy facade is not registered on the host."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Reissue the same request after an ambiguous failure; the removal is idempotent and removing an absent group reports Removed false and an interrupted cascade completes on re-run.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs#ILatticeTenantDirectoryAdmin.RemoveGroupAsync"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Removing an absent group reports Removed false; an interrupted cascade completes on re-run.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs"
      },
      "concurrency": {
        "rule": "Directory writes run under system origin through the membership store and the tenant record CRDT merge; the admin-set removal is committed with the last-admin guard re-applied inside the registry compare-and-set loop, and every set removal is stamped later than the slot it supersedes.",
        "source": "src/lattice.api.tenantadmin/TenantAdminSetCommit.cs#TenantAdminSetCommit"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "remove-tenant-group-member",
      "in_process": "ILatticeTenantDirectoryAdmin.RemoveGroupMemberAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/RemoveTenantGroupMember",
      "transport_scope": "both",
      "request": "TenantAdminGroupMemberRequest",
      "response": "TenantMembershipChangeResult",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "An argument is null, empty or malformed."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither a platform operator nor an admin of the target tenant (group-aware while delegated tenant access administration is enabled)."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Delegated tenant access administration is disabled or the target is the reserved default tenant."
        },
        {
          "error_id": "unimplemented",
          "condition": "The tenant directory or tenant policy facade is not registered on the host."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Reissue the same request after an ambiguous failure; the removal is idempotent and removing an absent member reports Changed false.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs#ILatticeTenantDirectoryAdmin.RemoveGroupMemberAsync"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Removing an absent member reports Changed false.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs"
      },
      "concurrency": {
        "rule": "Directory writes run under system origin through the membership store and the tenant record CRDT merge; D13 caps use verify-and-compensate.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "remove-tenant-member",
      "in_process": "ILatticeTenantDirectoryAdmin.RemoveMemberAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/RemoveTenantMember",
      "transport_scope": "both",
      "request": "TenantAdminMemberRequest",
      "response": "TenantMembershipChangeResult",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "An argument is null, empty or malformed."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither a platform operator nor an admin of the target tenant (group-aware while delegated tenant access administration is enabled)."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Delegated tenant access administration is disabled or the target is the reserved default tenant."
        },
        {
          "error_id": "unimplemented",
          "condition": "The tenant directory or tenant policy facade is not registered on the host."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Reissue the same request after an ambiguous failure; the removal is idempotent and removing an absent member-set entry reports Changed false.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs#ILatticeTenantDirectoryAdmin.RemoveMemberAsync"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Removing an absent member-set entry reports Changed false.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs"
      },
      "concurrency": {
        "rule": "Member-set removals are stamped later than the slot they supersede, so the removal wins the CRDT merge even against a slot written by a silo whose clock runs ahead.",
        "source": "src/lattice.api.tenantadmin/TenantRemovalStamp.cs#TenantRemovalStamp"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "remove-tenant-rule",
      "in_process": "ILatticeTenantPolicyAdmin.RemoveRuleAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/RemoveTenantRule",
      "transport_scope": "both",
      "request": "TenantAdminRuleRequest",
      "response": "TenantAdminRuleRemoval",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "The tenant id is not a valid tenant id, or the rule id is null or empty."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither a platform operator nor an admin of the target tenant (group-aware while delegated tenant access administration is enabled)."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Delegated tenant access administration is disabled or the target is the reserved default tenant."
        },
        {
          "error_id": "unimplemented",
          "condition": "The tenant directory or tenant policy facade is not registered on the host."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Reissue the same request after an ambiguous failure; the removal is idempotent and removing an absent rule reports false.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs#ILatticeTenantPolicyAdmin.RemoveRuleAsync"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Removing an absent rule reports false.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs"
      },
      "concurrency": {
        "rule": "Rule writes run under system origin through the policy store; removal checks no rule cap.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantPolicyAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "resolve-tenant-subject",
      "in_process": "ILatticeTenantDirectoryAdmin.ResolveSubjectAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/ResolveTenantSubject",
      "transport_scope": "both",
      "request": "TenantAdminMemberRequest",
      "response": "TenantSubjectResolution",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "Malformed tenant id, name or subject id, or a confinement violation (TenantAccessConfinementException: foreign tenant group, group nesting, rule tree, rule operations, reserved rule id)."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither a platform operator nor an admin of the target tenant (group-aware while delegated tenant access administration is enabled)."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Delegated tenant access administration is disabled, the target is the reserved default tenant, or (removals) the last admin entry would be removed."
        },
        {
          "error_id": "unimplemented",
          "condition": "The tenant directory or tenant policy facade is not registered on the host."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only tenant-tier operation.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Read-only resolution of admin and member entries. The subject may be any principal, so a tenant admin can learn whether a user is in a cluster group the tenant admitted; by design.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs"
      },
      "concurrency": {
        "rule": "Directory writes run under system origin through the membership store and the tenant record CRDT merge; D13 caps use verify-and-compensate.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "resume-tenant",
      "in_process": "ILatticeTenantAdmin.ResumeTenantAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/ResumeTenant",
      "transport_scope": "both",
      "request": "TenantAdminTenantRequest",
      "response": "TenantStatusChangeResult",
      "errors": [
        {
          "error_id": "cancelled",
          "condition": "The call was cancelled."
        },
        {
          "error_id": "internal",
          "condition": "A tenant-registry write exhausted its bounded optimistic-concurrency retry budget (TenantRegistryConcurrencyException), or another unhandled failure occurred."
        },
        {
          "error_id": "not-found",
          "condition": "Tenant id is not registered."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is not authorized to administer tenants."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "No facade retry policy is defined; resuming an already-active tenant is idempotent.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Resuming an already-active tenant reports Changed false.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAdmin.cs"
      },
      "concurrency": {
        "rule": "Status transition is written through the tenant registry record.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs",
        "src/lattice.tenancy/TenantRegistryConcurrencyException.cs#TenantRegistryConcurrencyException"
      ]
    },
    {
      "id": "revoke-cross-tenant-grant",
      "in_process": "ILatticeTenantGrantAdmin.RevokeGrantAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/RevokeCrossTenantGrant",
      "transport_scope": "both",
      "request": "TenantAdminGrantRequest",
      "response": "TenantGrantChangeResult",
      "errors": [
        {
          "error_id": "not-found",
          "condition": "No such grant exists."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Grant is not active."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is platform operator for neither tenant and admin of neither party."
        },
        {
          "error_id": "unimplemented",
          "condition": "Cross-tenant grant facade is not registered."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "No facade retry policy is defined; repeated revocation of a revoked grant is idempotent.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Idempotent on an already-revoked grant.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantGrantAdmin.cs"
      },
      "concurrency": {
        "rule": "Concurrent grant transitions converge on the more restrictive outcome.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantGrantAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantGrantAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "set-tenant-quotas",
      "in_process": "ILatticeTenantAdmin.SetTenantQuotasAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/SetTenantQuotas",
      "transport_scope": "both",
      "request": "TenantAdminSetQuotasRequest",
      "response": "TenantQuotasUpdateResult",
      "errors": [
        {
          "error_id": "cancelled",
          "condition": "The call was cancelled."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Tenant id is the reserved default tenant."
        },
        {
          "error_id": "internal",
          "condition": "A tenant-registry write exhausted its bounded optimistic-concurrency retry budget (TenantRegistryConcurrencyException), or another unhandled failure occurred."
        },
        {
          "error_id": "invalid-argument",
          "condition": "Invalid tenant id, negative burst percent, or negative quota ceiling."
        },
        {
          "error_id": "not-found",
          "condition": "Tenant id is not registered."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is not authorized to administer tenants."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Retry is safe when resubmitting the same quota descriptor.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Replacing quotas with the same descriptor is idempotent.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAdmin.cs"
      },
      "concurrency": {
        "rule": "Quota descriptor replaces the tenant current quotas in the registry record.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs",
        "src/lattice.tenancy/TenantRegistryConcurrencyException.cs#TenantRegistryConcurrencyException"
      ]
    },
    {
      "id": "set-tenant-residency",
      "in_process": "ILatticeTenantRegionAdmin.SetResidencyAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/SetTenantResidency",
      "transport_scope": "both",
      "request": "TenantAdminRegionSetRequest",
      "response": "TenantResidencyChangeResult",
      "errors": [
        {
          "error_id": "failed-precondition",
          "condition": "Requested region is not allowed or the change removes the last resident region."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither platform operator nor tenant admin."
        },
        {
          "error_id": "unimplemented",
          "condition": "Region-residency facade is not registered."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Retry is safe when resubmitting the same complete residency set.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": "conditional",
        "basis": "Setting the same residency set is idempotent; invalid sets are refused.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantRegionAdmin.cs"
      },
      "concurrency": {
        "rule": "The last-resident-region guard runs before the write and after the committed CRDT join. Added regions automatically advance Provisioning to Backfilling to Online only after every discovered tenant tree finishes bootstrap from an Online source, is unfenced and has no tenant_offline dead letters. Dropped regions automatically drain through Offline to Removed; an operator advance is an explicit data-in-place override.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantRegionAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantRegionAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    },
    {
      "id": "suspend-tenant",
      "in_process": "ILatticeTenantAdmin.SuspendTenantAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/SuspendTenant",
      "transport_scope": "both",
      "request": "TenantAdminTenantRequest",
      "response": "TenantStatusChangeResult",
      "errors": [
        {
          "error_id": "cancelled",
          "condition": "The call was cancelled."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Tenant id is the reserved default tenant."
        },
        {
          "error_id": "internal",
          "condition": "A tenant-registry write exhausted its bounded optimistic-concurrency retry budget (TenantRegistryConcurrencyException), or another unhandled failure occurred."
        },
        {
          "error_id": "not-found",
          "condition": "Tenant id is not registered."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is not authorized to administer tenants."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "No facade retry policy is defined; suspending an already-suspended tenant is idempotent.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Suspending an already-suspended tenant reports Changed false.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAdmin.cs"
      },
      "concurrency": {
        "rule": "Status transition is written through the tenant registry record.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs",
        "src/lattice.tenancy/TenantRegistryConcurrencyException.cs#TenantRegistryConcurrencyException"
      ]
    },
    {
      "id": "tenant-scoped-check-tree-exists",
      "in_process": "ILatticeTenantScopedTreeAdmin.CheckTreeExistsAsync",
      "grpc_method": null,
      "transport_scope": "in_process_only",
      "request": "string name",
      "response": "TreeExistenceResult",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "name is null or empty."
        },
        {
          "error_id": "tenant-scope-required",
          "condition": "No active tenant is in scope."
        },
        {
          "error_id": "permission-denied",
          "condition": "The caller is not authorized to read the tree."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only; reissue the same call.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#CheckTreeExistsAsync"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "A pure read with no side effects.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#CheckTreeExistsAsync"
      },
      "concurrency": {
        "rule": "The target id is composed as t/{tenantId}/{name} under the ambient active tenant; no parameter can name another tenant tree.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#ILatticeTenantScopedTreeAdmin"
      },
      "sources": [
        "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#CheckTreeExistsAsync",
        "src/lattice.api.tenantadmin/LatticeTenantScopedTreeAdmin.cs#LatticeTenantScopedTreeAdmin"
      ]
    },
    {
      "id": "tenant-scoped-clear-schema-policy",
      "in_process": "ILatticeTenantScopedTreeAdmin.ClearSchemaPolicyAsync",
      "grpc_method": null,
      "transport_scope": "in_process_only",
      "request": "string name",
      "response": "bool",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "name is null or empty."
        },
        {
          "error_id": "tenant-scope-required",
          "condition": "No active tenant is in scope."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Reissue the same call; a repeat reports false.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#ClearSchemaPolicyAsync"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Returns true when a policy was removed; a repeat finds no policy and returns false.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#ClearSchemaPolicyAsync"
      },
      "concurrency": {
        "rule": "The target id is composed as t/{tenantId}/{name} under the ambient active tenant; no parameter can name another tenant tree. Schema verbs delegate to the in-process schema admin, which does not authorize; callers must arrive through an authorized tenant-administration transport.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#ILatticeTenantScopedTreeAdmin"
      },
      "sources": [
        "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#ClearSchemaPolicyAsync",
        "src/lattice.api.tenantadmin/LatticeTenantScopedTreeAdmin.cs#LatticeTenantScopedTreeAdmin"
      ]
    },
    {
      "id": "tenant-scoped-create-tree",
      "in_process": "ILatticeTenantScopedTreeAdmin.CreateTreeAsync",
      "grpc_method": null,
      "transport_scope": "in_process_only",
      "request": "string name, int? shardCount, int? maxLeafKeys, int? maxInternalChildren",
      "response": "TreeCreationResult",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "name is null or empty."
        },
        {
          "error_id": "tenant-scope-required",
          "condition": "No active tenant is in scope."
        },
        {
          "error_id": "quota-exceeded",
          "condition": "The active tenant quota, including owned-tree count, would be exceeded."
        },
        {
          "error_id": "permission-denied",
          "condition": "The caller is not authorized to administer the tree."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Reissue the same call; registration is idempotent.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#CreateTreeAsync"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Registration is idempotent.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#CreateTreeAsync"
      },
      "concurrency": {
        "rule": "The target id is composed as t/{tenantId}/{name} under the ambient active tenant; no parameter can name another tenant tree. The create is admitted against the tenant quota before the tree is registered.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#ILatticeTenantScopedTreeAdmin"
      },
      "sources": [
        "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#CreateTreeAsync",
        "src/lattice.api.tenantadmin/LatticeTenantScopedTreeAdmin.cs#LatticeTenantScopedTreeAdmin"
      ]
    },
    {
      "id": "tenant-scoped-delete-tree",
      "in_process": "ILatticeTenantScopedTreeAdmin.DeleteTreeAsync",
      "grpc_method": null,
      "transport_scope": "in_process_only",
      "request": "string name",
      "response": "TreeDeletionStatus",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "name is null or empty."
        },
        {
          "error_id": "tenant-scope-required",
          "condition": "No active tenant is in scope."
        },
        {
          "error_id": "permission-denied",
          "condition": "The caller lacks the tree-lifecycle capability."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Reissue the same call; soft delete is idempotent.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#DeleteTreeAsync"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Soft delete is idempotent and reversible until the recovery window elapses.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#DeleteTreeAsync"
      },
      "concurrency": {
        "rule": "The target id is composed as t/{tenantId}/{name} under the ambient active tenant; no parameter can name another tenant tree.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#ILatticeTenantScopedTreeAdmin"
      },
      "sources": [
        "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#DeleteTreeAsync",
        "src/lattice.api.tenantadmin/LatticeTenantScopedTreeAdmin.cs#LatticeTenantScopedTreeAdmin"
      ]
    },
    {
      "id": "tenant-scoped-get-schema-policy",
      "in_process": "ILatticeTenantScopedTreeAdmin.GetSchemaPolicyAsync",
      "grpc_method": null,
      "transport_scope": "in_process_only",
      "request": "string name",
      "response": "LatticeSchemaPolicy?",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "name is null or empty."
        },
        {
          "error_id": "tenant-scope-required",
          "condition": "No active tenant is in scope."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only; reissue the same call.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#GetSchemaPolicyAsync"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "A read; null when no policy exists.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#GetSchemaPolicyAsync"
      },
      "concurrency": {
        "rule": "The target id is composed as t/{tenantId}/{name} under the ambient active tenant; no parameter can name another tenant tree. Schema verbs delegate to the in-process schema admin, which does not authorize; callers must arrive through an authorized tenant-administration transport.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#ILatticeTenantScopedTreeAdmin"
      },
      "sources": [
        "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#GetSchemaPolicyAsync",
        "src/lattice.api.tenantadmin/LatticeTenantScopedTreeAdmin.cs#LatticeTenantScopedTreeAdmin"
      ]
    },
    {
      "id": "tenant-scoped-get-tree-deletion-status",
      "in_process": "ILatticeTenantScopedTreeAdmin.GetTreeDeletionStatusAsync",
      "grpc_method": null,
      "transport_scope": "in_process_only",
      "request": "string name",
      "response": "TreeDeletionStatus",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "name is null or empty."
        },
        {
          "error_id": "tenant-scope-required",
          "condition": "No active tenant is in scope."
        },
        {
          "error_id": "permission-denied",
          "condition": "The caller is not authorized to read the tree."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Read-only; reissue the same call.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#GetTreeDeletionStatusAsync"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "A pure read with no side effects.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#GetTreeDeletionStatusAsync"
      },
      "concurrency": {
        "rule": "The target id is composed as t/{tenantId}/{name} under the ambient active tenant; no parameter can name another tenant tree.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#ILatticeTenantScopedTreeAdmin"
      },
      "sources": [
        "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#GetTreeDeletionStatusAsync",
        "src/lattice.api.tenantadmin/LatticeTenantScopedTreeAdmin.cs#LatticeTenantScopedTreeAdmin"
      ]
    },
    {
      "id": "tenant-scoped-purge-tree",
      "in_process": "ILatticeTenantScopedTreeAdmin.PurgeTreeAsync",
      "grpc_method": null,
      "transport_scope": "in_process_only",
      "request": "string name, bool confirm",
      "response": "TreeDeletionStatus",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "name is null or empty, or confirm is false."
        },
        {
          "error_id": "tenant-scope-required",
          "condition": "No active tenant is in scope."
        },
        {
          "error_id": "permission-denied",
          "condition": "The caller lacks the tree-lifecycle capability."
        }
      ],
      "retry": {
        "safe": "conditional",
        "policy": "Safe to retry. The purge is accept-then-poll: the first call records it in progress and hands the shard walk to a background timer, then waits a bounded time; a call while the purge runs, after the shard walk completed but registry removal is still owed, or after it completed returns the current status without error, so after an ambiguous failure or a return with PurgeInProgress still true, read the deletion status or simply call again.",
        "source": "src/lattice/BPlusTree/Grains/TreeDeletionGrain.cs#TreeDeletionGrain.SettleRegistryEntryAsync"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Accepting a purge that is already running, still settling registry removal, or complete changes nothing and returns its status; the background walk resumes from its last durably recorded shard after a restart, and an owed registry removal is re-driven from RegistryUnregisterPending.",
        "source": "src/lattice/BPlusTree/Grains/TreeDeletionGrain.cs#TreeDeletionGrain.SettleRegistryEntryAsync"
      },
      "concurrency": {
        "rule": "The target id is composed as t/{tenantId}/{name} under the ambient active tenant; no parameter can name another tenant tree.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#ILatticeTenantScopedTreeAdmin"
      },
      "sources": [
        "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#PurgeTreeAsync",
        "src/lattice.api.tenantadmin/LatticeTenantScopedTreeAdmin.cs#LatticeTenantScopedTreeAdmin"
      ]
    },
    {
      "id": "tenant-scoped-recover-tree",
      "in_process": "ILatticeTenantScopedTreeAdmin.RecoverTreeAsync",
      "grpc_method": null,
      "transport_scope": "in_process_only",
      "request": "string name",
      "response": "TreeDeletionStatus",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "name is null or empty."
        },
        {
          "error_id": "tenant-scope-required",
          "condition": "No active tenant is in scope."
        },
        {
          "error_id": "permission-denied",
          "condition": "The caller lacks the tree-lifecycle capability."
        }
      ],
      "retry": {
        "safe": "conditional",
        "policy": "Retry is safe after a partial recovery failure, but a retry after a completed recovery fails with InvalidOperationException because the tree is no longer deleted.",
        "source": "src/lattice/BPlusTree/ITreeDeletionGrain.cs#RecoverAsync"
      },
      "idempotency": {
        "idempotent": "conditional",
        "basis": "Recovery keeps the deletion record until idempotent shard unmark and reseed complete, but after success the cleared deletion record makes a repeated call throw InvalidOperationException.",
        "source": "src/lattice/BPlusTree/Grains/TreeDeletionGrain.cs#RecoverPhysicalAsync"
      },
      "concurrency": {
        "rule": "The target id is composed as t/{tenantId}/{name} under the ambient active tenant; no parameter can name another tenant tree.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#ILatticeTenantScopedTreeAdmin"
      },
      "sources": [
        "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#RecoverTreeAsync",
        "src/lattice.api.tenantadmin/LatticeTenantScopedTreeAdmin.cs#LatticeTenantScopedTreeAdmin"
      ]
    },
    {
      "id": "tenant-scoped-set-schema-policy",
      "in_process": "ILatticeTenantScopedTreeAdmin.SetSchemaPolicyAsync",
      "grpc_method": null,
      "transport_scope": "in_process_only",
      "request": "string name, LatticeSchemaPolicy policy",
      "response": "void",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "name is null or empty, a rule is invalid, or policy is null."
        },
        {
          "error_id": "tenant-scope-required",
          "condition": "No active tenant is in scope."
        }
      ],
      "retry": {
        "safe": true,
        "policy": "Reissue the same call.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#SetSchemaPolicyAsync"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Sets or replaces the policy; a repeat with the same policy leaves the same state.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#SetSchemaPolicyAsync"
      },
      "concurrency": {
        "rule": "The target id is composed as t/{tenantId}/{name} under the ambient active tenant; no parameter can name another tenant tree. Schema verbs delegate to the in-process schema admin, which does not authorize; callers must arrive through an authorized tenant-administration transport. The policy is enforced immediately on subsequent writes.",
        "source": "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#ILatticeTenantScopedTreeAdmin"
      },
      "sources": [
        "src/lattice.api.tenantadmin/ILatticeTenantScopedTreeAdmin.cs#SetSchemaPolicyAsync",
        "src/lattice.api.tenantadmin/LatticeTenantScopedTreeAdmin.cs#LatticeTenantScopedTreeAdmin"
      ]
    },
    {
      "id": "upsert-tenant-group",
      "in_process": "ILatticeTenantDirectoryAdmin.UpsertGroupAsync",
      "grpc_method": "/orleans.lattice.api.tenantadmin/UpsertTenantGroup",
      "transport_scope": "both",
      "request": "TenantAdminGroupUpsertRequest",
      "response": "TenantGroupDescriptor",
      "errors": [
        {
          "error_id": "invalid-argument",
          "condition": "Malformed tenant id, name or subject id, or a confinement violation (TenantAccessConfinementException: foreign tenant group, group nesting, rule tree, rule operations, reserved rule id)."
        },
        {
          "error_id": "permission-denied",
          "condition": "Caller is neither a platform operator nor an admin of the target tenant (group-aware while delegated tenant access administration is enabled)."
        },
        {
          "error_id": "failed-precondition",
          "condition": "Delegated tenant access administration is disabled, the target is the reserved default tenant, or (removals) the last admin entry would be removed."
        },
        {
          "error_id": "quota-exceeded",
          "condition": "A D13 delegated-access cap (MaxGroups, MaxMembershipEdges, MaxMemberSubjects or MaxTenantRules) would be exceeded; carried as ResourceExhausted with lattice-quota-dimension, -current and -limit trailers."
        },
        {
          "error_id": "unimplemented",
          "condition": "The tenant directory or tenant policy facade is not registered on the host."
        }
      ],
      "retry": {
        "safe": false,
        "policy": "No facade retry policy is defined; configure retries on the caller or CallInvoker.",
        "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminApiGrpcClient.cs"
      },
      "idempotency": {
        "idempotent": true,
        "basis": "Upserting the same group again changes nothing.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs"
      },
      "concurrency": {
        "rule": "Directory writes run under system origin through the membership store and the tenant record CRDT merge; D13 caps use verify-and-compensate.",
        "source": "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs"
      },
      "sources": [
        "src/lattice.api.abstractions/TenantAdmin/ILatticeTenantDirectoryAdmin.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcMethods.cs",
        "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
      ]
    }
  ],
  "error_taxonomy": [
    {
      "id": "already-exists",
      "type": "TenantAlreadyExistsException",
      "grpc_status": "AlreadyExists",
      "retryable": false,
      "meaning": "A create attempted to register an existing tenant.",
      "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
    },
    {
      "id": "cancelled",
      "type": "OperationCanceledException",
      "grpc_status": "Cancelled",
      "retryable": true,
      "meaning": "The request was cancelled before completion.",
      "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
    },
    {
      "id": "cluster-timeout",
      "type": "TimeoutException",
      "grpc_status": "DeadlineExceeded",
      "retryable": false,
      "meaning": "A grain call timed out inside the cluster, so the outcome is unknown and a write may already have applied. Retry an idempotent read; confirm state before retrying a write (#5742).",
      "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
    },
    {
      "id": "cluster-unavailable",
      "type": "OrleansMessageRejectionException (including SiloUnavailableException) or EnumerationAbortedException",
      "grpc_status": "Unavailable",
      "retryable": true,
      "meaning": "A silo was unavailable or rejected the message, or a remote enumerator was lost to a grain deactivation mid-read: a transient cluster fault. Retry after a short backoff (#5742).",
      "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
    },
    {
      "id": "saturated",
      "type": "LatticeSaturatedException",
      "grpc_status": "ResourceExhausted",
      "retryable": true,
      "meaning": "Storage back-pressure: the store refused the call on purpose and nothing was applied. Retry after a short backoff (#5722, #5723).",
      "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
    },
    {
      "id": "wal-quiescing",
      "type": "LatticeWalQuiescingException",
      "grpc_status": "Unavailable",
      "retryable": true,
      "meaning": "A WAL shard is briefly quiesced for a placement move: the write was refused without being applied, and the shard accepts writes again once the move lifts its fence. Retry after a short backoff (#5800).",
      "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
    },
    {
      "id": "failed-precondition",
      "type": "ReservedTenantOperationException, TenantAccessAdministrationDisabledException, TenantLastAdminSubjectException, TenantLastRegionException, TenantGrantTransitionException, TenantRegionNotAllowedException, InvalidOperationException",
      "grpc_status": "FailedPrecondition",
      "retryable": false,
      "meaning": "Cluster state or reserved-target invariants refused a well-formed request.",
      "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
    },
    {
      "id": "internal",
      "type": "Exception",
      "grpc_status": "Internal",
      "retryable": false,
      "meaning": "Unhandled facade or binding failure after logging.",
      "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
    },
    {
      "id": "invalid-argument",
      "type": "ArgumentException (including TenantAccessConfinementException)",
      "grpc_status": "InvalidArgument",
      "retryable": false,
      "meaning": "Request validation failed.",
      "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
    },
    {
      "id": "not-found",
      "type": "TenantNotFoundException or TenantGrantNotFoundException",
      "grpc_status": "NotFound",
      "retryable": false,
      "meaning": "The tenant or grant is absent, or a facade deliberately unifies unauthorized visibility with absence.",
      "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
    },
    {
      "id": "permission-denied",
      "type": "LatticeAuthorizationDeniedException or LatticeTenantAccessDeniedException",
      "grpc_status": "PermissionDenied",
      "retryable": false,
      "meaning": "The transport authorizer, access gate, or active-tenant validation denied the caller.",
      "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
    },
    {
      "id": "quota-exceeded",
      "type": "LatticeQuotaExceededException",
      "grpc_status": "ResourceExhausted",
      "retryable": false,
      "meaning": "The active tenant quota, or a delegated tenant access cap (MaxGroups, MaxMembershipEdges, MaxMemberSubjects, MaxTenantRules), would be exceeded. Over gRPC it is ResourceExhausted with lattice-quota-dimension, -current and -limit trailers. A delegated access cap addition found over the cap is withdrawn with up to four attempts; if none lands, the message says the cap may stay exceeded until the addition is removed.",
      "source": "src/lattice/LatticeQuotaExceededException.cs#LatticeQuotaExceededException"
    },
    {
      "id": "tenant-scope-required",
      "type": "TenantScopeRequiredException",
      "grpc_status": null,
      "retryable": false,
      "meaning": "No active tenant is in scope; the tenant-scoped facade refuses the call before any tree is named.",
      "source": "src/lattice.api.tenantadmin/TenantScopeRequiredException.cs#TenantScopeRequiredException"
    },
    {
      "id": "unimplemented",
      "type": "RpcException",
      "grpc_status": "Unimplemented",
      "retryable": false,
      "meaning": "An optional tenant facade is not registered on the host.",
      "source": "src/lattice.api.tenantadmin.grpc/LatticeTenantAdminGrpcService.cs"
    }
  ]
}
