{
  "schema": "lattice.agents/governance-authorization/v1",
  "decision_trees": [
    {
      "id": "app-bridge-authorization",
      "nodes": [
        {
          "id": "service-match",
          "check": "Method starts with the app-bridge gRPC service prefix.",
          "on_true": "operation-classified",
          "on_false": "allow-unrelated",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs#LatticeAppsApiGrpcAuthInterceptor"
        },
        {
          "id": "operation-classified",
          "check": "The bound unary RPC and request type classify to BridgeGet, BridgeScan, BridgeSet or BridgeDelete.",
          "on_true": "require-option",
          "on_false": "deny-grpc",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs#LatticeAppsApiGrpcAuthInterceptor.DescribeCall"
        },
        {
          "id": "require-option",
          "check": "LatticeAppsApiGrpcOptions.RequireAuthorization is true.",
          "on_true": "transport-authorizer",
          "on_false": "caller",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs#LatticeAppsApiGrpcAuthInterceptor"
        },
        {
          "id": "transport-authorizer",
          "check": "ILatticeAppsApiAuthorizer admits the server-classified bridge operation and target app slug.",
          "on_true": "caller",
          "on_false": "deny-grpc",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs#LatticeAppsApiGrpcAuthInterceptor"
        },
        {
          "id": "caller",
          "check": "The bridge facade resolves a non-anonymous subject, an active tenant, a grain factory, and a serving app role-grant evaluator.",
          "on_true": "rate-limit",
          "on_false": "deny-bridge",
          "source": "src/lattice.api.apps/LatticeAppBridge.cs#LatticeAppBridge.AuthorizeAsync"
        },
        {
          "id": "rate-limit",
          "check": "The per-caller, per-tenant, per-app rate limiter admits the request.",
          "on_true": "enabled-install",
          "on_false": "deny-unavailable",
          "source": "src/lattice.api.apps/AppBridgeRateLimiter.cs#AppBridgeRateLimiter.TryAcquire"
        },
        {
          "id": "enabled-install",
          "check": "The current registry snapshot has an enabled install in the caller tenant whose revision matches AppBridgeTarget.InstallRevision and whose ceiling is pinned to its version.",
          "on_true": "bridge-consent",
          "on_false": "deny-bridge",
          "source": "src/lattice.api.apps/LatticeAppBridge.cs#LatticeAppBridge.AuthorizeAsync"
        },
        {
          "id": "bridge-consent",
          "check": "The bridge operation over the logical tree is covered by both the consented bridge grants and the installed manifest's requested bridge grants.",
          "on_true": "tree-resolution",
          "on_false": "deny-bridge",
          "source": "src/lattice.api.apps/LatticeAppBridge.cs#LatticeAppBridge.AuthorizeAsync"
        },
        {
          "id": "tree-resolution",
          "check": "The logical tree name resolves server-side to a declared structural or adopted tree of the install.",
          "on_true": "app-owned-grant",
          "on_false": "deny-not-found",
          "source": "src/lattice.api.apps/AppBridgeInstallPlan.cs#AppBridgeInstallPlan.TryGetTree"
        },
        {
          "id": "app-owned-grant",
          "check": "An app-owned grant for a bound group covers the concrete operation and key or prefix.",
          "on_true": "data-path",
          "on_false": "deny-bridge",
          "source": "src/lattice.api.apps/AppBridgeInstallPlan.cs#TreePlan.Allows"
        },
        {
          "id": "data-path",
          "check": "The core data path admits the call under the caller's ambient credential and active tenant.",
          "on_true": "allow",
          "on_false": "deny-bridge",
          "source": "src/lattice.api.apps/LatticeAppBridge.cs#LatticeAppBridge"
        }
      ],
      "terminals": [
        {
          "id": "allow",
          "outcome": "The bridge operation executes on the app-owned tree through the core data path."
        },
        {
          "id": "allow-unrelated",
          "outcome": "The interceptor passes the call through unchanged because the method belongs to another service."
        },
        {
          "id": "deny-bridge",
          "outcome": "The bridge refuses the request with a sanitized Denied failure."
        },
        {
          "id": "deny-grpc",
          "outcome": "The gRPC call fails with PermissionDenied before the bridge facade is invoked."
        },
        {
          "id": "deny-not-found",
          "outcome": "The bridge refuses the request with a sanitized NotFound failure."
        },
        {
          "id": "deny-unavailable",
          "outcome": "The bridge refuses the request with a sanitized Unavailable failure."
        }
      ],
      "fail_closed": "Disabling the transport authorizer does not bypass the bridge facade; missing collaborators, stale revisions, unconsented bridge operations, undeclared trees, lost role bindings, rate limits, and data-path denial all refuse the request.",
      "sources": [
        "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs#LatticeAppsApiGrpcAuthInterceptor",
        "src/lattice.api.apps.grpc/LatticeAppBridgeGrpcService.cs#LatticeAppBridgeGrpcService",
        "src/lattice.api.apps/LatticeAppBridge.cs#LatticeAppBridge",
        "src/lattice.api.apps/AppBridgeInstallPlan.cs#AppBridgeInstallPlan"
      ]
    },
    {
      "id": "app-catalog-authorization",
      "nodes": [
        {
          "id": "service-match",
          "check": "Method starts with the app-catalog gRPC service prefix.",
          "on_true": "operation-classified",
          "on_false": "allow-unrelated",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs#LatticeAppsApiGrpcAuthInterceptor"
        },
        {
          "id": "operation-classified",
          "check": "The bound unary RPC and request type classify to a catalog operation.",
          "on_true": "require-option",
          "on_false": "deny-grpc",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs#LatticeAppsApiGrpcAuthInterceptor.DescribeCall"
        },
        {
          "id": "require-option",
          "check": "LatticeAppsApiGrpcOptions.RequireAuthorization is true.",
          "on_true": "transport-authorizer",
          "on_false": "capability-probe",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs#LatticeAppsApiGrpcAuthInterceptor"
        },
        {
          "id": "transport-authorizer",
          "check": "ILatticeAppsApiAuthorizer admits the server-classified catalog operation and target app slug when present.",
          "on_true": "capability-probe",
          "on_false": "deny-grpc",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs#LatticeAppsApiGrpcAuthInterceptor"
        },
        {
          "id": "capability-probe",
          "check": "The call is ILatticeAppCatalog.GetCapabilitiesAsync.",
          "on_true": "probe-authorize",
          "on_false": "tenant",
          "source": "src/lattice.api.apps/LatticeAppCatalog.cs#LatticeAppCatalog.GetCapabilitiesAsync"
        },
        {
          "id": "probe-authorize",
          "check": "The apps facade authorizes AppInstall over the cluster-wide scope.",
          "on_true": "allow-probe-granted",
          "on_false": "allow-probe-none",
          "source": "src/lattice.api.apps/LatticeAppCatalog.cs#LatticeAppCatalog.GetCapabilitiesAsync"
        },
        {
          "id": "tenant",
          "check": "The apps facade resolves an initialized active tenant.",
          "on_true": "app-install",
          "on_false": "deny-tenant",
          "source": "src/lattice.api.apps/AppsFacadeAccess.cs#AppsFacadeAccess.ResolveTenantAsync"
        },
        {
          "id": "app-install",
          "check": "The apps facade authorizes AppInstall over the cluster-wide scope before any source or registry data is read.",
          "on_true": "allow-catalog",
          "on_false": "deny-app-install",
          "source": "src/lattice.api.apps/AppsFacadeAccess.cs#AppsFacadeAccess.AuthorizeInstallAsync"
        }
      ],
      "terminals": [
        {
          "id": "allow-catalog",
          "outcome": "The catalog operation may list sources, list source-offered apps, describe a source version or read a source icon."
        },
        {
          "id": "allow-probe-granted",
          "outcome": "The advisory capability probe reports catalog verbs granted."
        },
        {
          "id": "allow-probe-none",
          "outcome": "The advisory capability probe reports catalog verbs denied without exposing source or registry data."
        },
        {
          "id": "allow-unrelated",
          "outcome": "The interceptor passes the call through unchanged because the method belongs to another service."
        },
        {
          "id": "deny-app-install",
          "outcome": "The call is denied before any app source or registry metadata is disclosed."
        },
        {
          "id": "deny-grpc",
          "outcome": "The gRPC call fails with PermissionDenied before the catalog facade is invoked."
        },
        {
          "id": "deny-tenant",
          "outcome": "The call fails closed because the active tenant cannot be resolved or validated."
        }
      ],
      "fail_closed": "Disabling the transport authorizer does not bypass the catalog facade AppInstall gate; the advisory probe returns default-deny capability data rather than source data on denial.",
      "sources": [
        "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs#LatticeAppsApiGrpcAuthInterceptor",
        "src/lattice.api.apps.grpc/LatticeAppCatalogGrpcService.cs#LatticeAppCatalogGrpcService",
        "src/lattice.api.apps/LatticeAppCatalog.cs#LatticeAppCatalog",
        "src/lattice.api.apps/AppsFacadeAccess.cs#AppsFacadeAccess"
      ]
    },
    {
      "id": "app-control-facade",
      "nodes": [
        {
          "id": "parse-request",
          "check": "The facade parses the app slug, version, bindings, and consent exception scopes, composing caller-supplied tree references under the active tenant before authorization.",
          "on_true": "tenant",
          "on_false": "deny-invalid",
          "source": "src/lattice.api.apps/LatticeAppsControl.cs"
        },
        {
          "id": "tenant",
          "check": "ITenantContextResolver resolves an initialized active tenant.",
          "on_true": "app-install",
          "on_false": "deny-tenant",
          "source": "src/lattice.api.apps/LatticeAppsControl.cs"
        },
        {
          "id": "app-install",
          "check": "The shared access-gate enforcement authorizes LatticeOperation.AppInstall on LatticeScope.ClusterWideTreeId with no key filter.",
          "on_true": "capability-probe",
          "on_false": "deny-app-install",
          "source": "src/lattice.api.apps/LatticeAppsControl.cs"
        },
        {
          "id": "capability-probe",
          "check": "The call is GetCapabilitiesAsync.",
          "on_true": "allow-probe",
          "on_false": "touch-control-plane",
          "source": "src/lattice.api.apps/LatticeAppsControl.Reads.cs"
        },
        {
          "id": "touch-control-plane",
          "check": "Authorization succeeded before any registry, source, or activation status metadata is read or mutated.",
          "on_true": "allow",
          "on_false": "deny-app-install",
          "source": "src/lattice.api.apps/LatticeAppsControl.cs"
        }
      ],
      "terminals": [
        {
          "id": "allow",
          "outcome": "The facade reads or mutates the caller tenant's app registry, source metadata, consent, or activation pipeline."
        },
        {
          "id": "allow-probe",
          "outcome": "The advisory capability probe reports all app-control verbs granted; if authorization throws, it reports none."
        },
        {
          "id": "deny-app-install",
          "outcome": "The call is denied before app existence, consent, bindings, or activation state are disclosed."
        },
        {
          "id": "deny-invalid",
          "outcome": "The call fails as invalid input before any control-plane read or write."
        },
        {
          "id": "deny-tenant",
          "outcome": "The call fails closed because the active tenant cannot be resolved or validated."
        }
      ],
      "fail_closed": "Every app-control verb gates on AppInstall before reading registry, source, consent, bindings, or activation status; GetCapabilities returns a default-deny probe rather than granting authority.",
      "sources": [
        "src/lattice.api.apps/LatticeAppsControl.cs",
        "src/lattice.api.apps/LatticeAppsControl.Install.cs",
        "src/lattice.api.apps/LatticeAppsControl.Reads.cs"
      ]
    },
    {
      "id": "app-owned-rule-protection",
      "nodes": [
        {
          "id": "app-owned",
          "check": "The rule id starts with LatticeAppRuleIds.Prefix (app:).",
          "on_true": "system-origin",
          "on_false": "allow",
          "source": "src/lattice.auth/LatticeAuthorizationPolicyStore.cs"
        },
        {
          "id": "system-origin",
          "check": "The call already carries system origin before the store enters its own system-origin scope.",
          "on_true": "allow",
          "on_false": "deny-app-owned",
          "source": "src/lattice.auth/LatticeAuthorizationPolicyStore.cs"
        }
      ],
      "terminals": [
        {
          "id": "allow",
          "outcome": "The policy store continues to ordinary rule authoring validation and persistence or deletion."
        },
        {
          "id": "deny-app-owned",
          "outcome": "PutRuleAsync or RemoveRuleAsync throws LatticeAppOwnedRuleException before any lookup, write, or delete."
        }
      ],
      "fail_closed": "Direct operator edits of app-owned rule ids are rejected before persistence or existence checks; only system-origin app reconciliation may replace them.",
      "sources": [
        "src/lattice.auth/LatticeAppRuleIds.cs",
        "src/lattice.auth/LatticeAppOwnedRuleException.cs",
        "src/lattice.auth/LatticeAuthorizationPolicyStore.cs"
      ]
    },
    {
      "id": "app-role-bindings-authorization",
      "nodes": [
        {
          "id": "service-match",
          "check": "Method starts with the app-control gRPC service prefix.",
          "on_true": "operation-classified",
          "on_false": "allow-unrelated",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs#LatticeAppsApiGrpcAuthInterceptor"
        },
        {
          "id": "operation-classified",
          "check": "The bound unary RPC and request type classify to LatticeAppsApiOperation.UpdateRoleBindings.",
          "on_true": "require-option",
          "on_false": "deny-grpc",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs#LatticeAppsApiGrpcAuthInterceptor.DescribeCall"
        },
        {
          "id": "require-option",
          "check": "LatticeAppsApiGrpcOptions.RequireAuthorization is true.",
          "on_true": "transport-authorizer",
          "on_false": "tenant",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs#LatticeAppsApiGrpcAuthInterceptor"
        },
        {
          "id": "transport-authorizer",
          "check": "ILatticeAppsApiAuthorizer admits UpdateRoleBindings for the request slug.",
          "on_true": "tenant",
          "on_false": "deny-grpc",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs#LatticeAppsApiGrpcAuthInterceptor"
        },
        {
          "id": "tenant",
          "check": "The apps facade resolves the active tenant.",
          "on_true": "app-install",
          "on_false": "deny-tenant",
          "source": "src/lattice.api.apps/LatticeAppsControl.RoleBindings.cs#LatticeAppsControl.UpdateRoleBindingsAsync"
        },
        {
          "id": "app-install",
          "check": "The facade authorizes AppInstall over the cluster-wide scope before reading the installed record.",
          "on_true": "installed-version",
          "on_false": "deny-app-install",
          "source": "src/lattice.api.apps/LatticeAppsControl.RoleBindings.cs#LatticeAppsControl.UpdateRoleBindingsAsync"
        },
        {
          "id": "installed-version",
          "check": "The app is installed, not uninstalled, the request version matches the installed version, and the ceiling is pinned to that version.",
          "on_true": "declared-roles",
          "on_false": "deny-precondition",
          "source": "src/lattice.api.apps/LatticeAppsControl.RoleBindings.cs#LatticeAppsControl.UpdateRoleBindingsAsync"
        },
        {
          "id": "declared-roles",
          "check": "Every replacement binding names a role declared by the installed manifest.",
          "on_true": "registry-update",
          "on_false": "deny-precondition",
          "source": "src/lattice.api.apps/LatticeAppsControl.RoleBindings.cs#LatticeAppsControl.UpdateRoleBindingsAsync"
        },
        {
          "id": "registry-update",
          "check": "The registry upgrade succeeds with the installed version and just-read revision as concurrency preconditions.",
          "on_true": "enabled",
          "on_false": "deny-precondition",
          "source": "src/lattice.api.apps/LatticeAppsControl.RoleBindings.cs#LatticeAppsControl.UpdateRoleBindingsAsync"
        },
        {
          "id": "enabled",
          "check": "The resulting record is enabled.",
          "on_true": "reapply",
          "on_false": "allow",
          "source": "src/lattice.api.apps/LatticeAppsControl.RoleBindings.cs#LatticeAppsControl.UpdateRoleBindingsAsync"
        },
        {
          "id": "reapply",
          "check": "Reapply succeeds after the bindings are recorded.",
          "on_true": "allow",
          "on_false": "deny-reapply-recorded",
          "source": "src/lattice.api.apps/LatticeAppsControl.RoleBindings.cs#LatticeAppsControl.UpdateRoleBindingsAsync"
        }
      ],
      "terminals": [
        {
          "id": "allow",
          "outcome": "The response reports the recorded role bindings and lifecycle state."
        },
        {
          "id": "allow-unrelated",
          "outcome": "The interceptor passes the call through unchanged because the method belongs to another service."
        },
        {
          "id": "deny-app-install",
          "outcome": "The call is denied before app existence or bindings are disclosed."
        },
        {
          "id": "deny-grpc",
          "outcome": "The gRPC call fails with PermissionDenied before the facade is invoked."
        },
        {
          "id": "deny-precondition",
          "outcome": "The call fails without replacing bindings."
        },
        {
          "id": "deny-reapply-recorded",
          "outcome": "The bindings were recorded, and the call fails reporting that re-application of the enabled app failed."
        },
        {
          "id": "deny-tenant",
          "outcome": "The call fails closed because the active tenant cannot be resolved or validated."
        }
      ],
      "fail_closed": "Disabling the transport authorizer does not bypass the facade AppInstall gate; version, revision and declared-role checks run before mutation, and reapply failure is reported after the recorded binding change.",
      "sources": [
        "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs#LatticeAppsApiGrpcAuthInterceptor",
        "src/lattice.api.apps/LatticeAppsControl.RoleBindings.cs#LatticeAppsControl",
        "src/lattice.api.abstractions/Apps/ILatticeAppRoleBindings.cs#ILatticeAppRoleBindings"
      ]
    },
    {
      "id": "app-role-compilation",
      "nodes": [
        {
          "id": "role-operations",
          "check": "Every role operation is inside the installed AppCapabilityCeiling.AllowedOperations after excluding scopeless Telemetry and AppInstall.",
          "on_true": "role-scopes",
          "on_false": "activation-fails",
          "source": "src/lattice.apps/Compiler/AppRoleCompiler.cs"
        },
        {
          "id": "role-scopes",
          "check": "Each role scope is structural for the app or covered by an approved exception scope; reserved, system, tenant-qualified, and cluster-wide sentinel scopes are not grantable exceptions.",
          "on_true": "bindings",
          "on_false": "activation-fails",
          "source": "src/lattice.apps/Compiler/AppRoleCompiler.cs"
        },
        {
          "id": "bindings",
          "check": "Every supplied binding names a declared role and maps it to a non-empty membership group id.",
          "on_true": "emit-rules",
          "on_false": "activation-fails",
          "source": "src/lattice.apps/Compiler/AppRoleCompiler.cs"
        },
        {
          "id": "emit-rules",
          "check": "The compiler emits deterministic Allow rules with group subjects and app:{slug}: rule ids, then activation replaces the app-owned stored set for that tenant.",
          "on_true": "allow",
          "on_false": "activation-fails",
          "source": "src/lattice.apps/Activation/AppActivationEngine.cs"
        }
      ],
      "terminals": [
        {
          "id": "activation-fails",
          "outcome": "No compiled rules are emitted or stale grants are withdrawn by activation fail-closed handling, depending on failure kind."
        },
        {
          "id": "allow",
          "outcome": "The compiled group rules become ordinary authorization rules enforced by the shared access gate."
        }
      ],
      "fail_closed": "A manifest, binding, or ceiling mismatch fails activation rather than clamping or partially granting; withdrawn rules are removed before new grants are written.",
      "sources": [
        "src/lattice.apps/Compiler/AppRoleCompiler.cs",
        "src/lattice.apps/Activation/AppActivationEngine.cs",
        "src/lattice.auth/LatticeAppRuleIds.cs"
      ]
    },
    {
      "id": "app-workspace-authorization",
      "nodes": [
        {
          "id": "service-match",
          "check": "Method starts with the app-workspace gRPC service prefix.",
          "on_true": "operation-classified",
          "on_false": "allow-unrelated",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs#LatticeAppsApiGrpcAuthInterceptor"
        },
        {
          "id": "operation-classified",
          "check": "The bound unary RPC and request type classify to ListMyApps, DescribeMyApp, GetMyAppIcon or GetUiAsset.",
          "on_true": "require-option",
          "on_false": "deny-grpc",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs#LatticeAppsApiGrpcAuthInterceptor.DescribeCall"
        },
        {
          "id": "require-option",
          "check": "LatticeAppsApiGrpcOptions.RequireAuthorization is true.",
          "on_true": "transport-authorizer",
          "on_false": "caller",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs#LatticeAppsApiGrpcAuthInterceptor"
        },
        {
          "id": "transport-authorizer",
          "check": "ILatticeAppsApiAuthorizer admits the server-classified workspace operation and target app slug when present.",
          "on_true": "caller",
          "on_false": "deny-grpc",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs#LatticeAppsApiGrpcAuthInterceptor"
        },
        {
          "id": "caller",
          "check": "The workspace resolves a membership context, active tenant, serving app role-grant evaluator and access gate.",
          "on_true": "enabled-install",
          "on_false": "absence",
          "source": "src/lattice.api.apps/LatticeAppWorkspace.cs#LatticeAppWorkspace.ResolveCallerAsync"
        },
        {
          "id": "enabled-install",
          "check": "The current registry snapshot has an enabled install in the caller tenant with a ceiling pinned to its version.",
          "on_true": "role-held",
          "on_false": "absence",
          "source": "src/lattice.apps/Registry/AppRoleGrantEvaluator.cs#AppRoleGrantEvaluator.IsEvaluated"
        },
        {
          "id": "role-held",
          "check": "The caller holds at least one app role by binding and no access-gate deny removes it.",
          "on_true": "allow",
          "on_false": "absence",
          "source": "src/lattice.apps/Registry/AppRoleGrantEvaluator.cs#AppRoleGrantEvaluator.EvaluateAsync"
        }
      ],
      "terminals": [
        {
          "id": "absence",
          "outcome": "The workspace returns no list entry or null, matching the result for a missing app."
        },
        {
          "id": "allow",
          "outcome": "The workspace returns the caller's app summary, sanitized descriptor, icon or UI asset."
        },
        {
          "id": "allow-unrelated",
          "outcome": "The interceptor passes the call through unchanged because the method belongs to another service."
        },
        {
          "id": "deny-grpc",
          "outcome": "The gRPC call fails with PermissionDenied before the workspace facade is invoked."
        }
      ],
      "fail_closed": "Disabling the transport authorizer does not bypass the workspace role gate; missing collaborators, denied tenant resolution, disabled installs, unpinned ceilings, absent bindings, and explicit denies all collapse to absence.",
      "sources": [
        "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs#LatticeAppsApiGrpcAuthInterceptor",
        "src/lattice.api.apps.grpc/LatticeAppWorkspaceGrpcService.cs#LatticeAppWorkspaceGrpcService",
        "src/lattice.api.apps/LatticeAppWorkspace.cs#LatticeAppWorkspace",
        "src/lattice.apps/Registry/AppRoleGrantEvaluator.cs#AppRoleGrantEvaluator"
      ]
    },
    {
      "id": "backup-restore-authorization",
      "nodes": [
        {
          "id": "target-source",
          "check": "A restore target tree is explicitly supplied, or can be derived from the catalog or sink manifest.",
          "on_true": "compose-target",
          "on_false": "catalog-fallback",
          "source": "src/lattice.api.backup/LatticeBackupControl.cs#LatticeBackupControl"
        },
        {
          "id": "compose-target",
          "check": "An explicit caller target is composed under the active tenant; a manifest-derived target is already effective and is not recomposed.",
          "on_true": "authorize-target",
          "on_false": "deny-tenant",
          "source": "src/lattice.api.backup/LatticeBackupControl.cs#LatticeBackupControl"
        },
        {
          "id": "catalog-fallback",
          "check": "No target can be resolved, so authorization falls back to the reserved backup catalog tree.",
          "on_true": "authorize-target",
          "on_false": "deny-restore",
          "source": "src/lattice.api.backup/LatticeBackupControl.cs#LatticeBackupControl.ResolveRestoreAuthorizationScope"
        },
        {
          "id": "authorize-target",
          "check": "The backup access check authorizes Backup or Restore over the resolved scope: whole tree as whole-tree, prefix as the half-open prefix range with filtered allows refused, and key as point.",
          "on_true": "source-needed",
          "on_false": "deny-restore",
          "source": "src/lattice.backup/BackupAccessAuthorizer.cs#BackupAccessAuthorizer.AuthorizeAsync"
        },
        {
          "id": "source-needed",
          "check": "The restore will replay a manifest chain whose source tree differs from the target tree.",
          "on_true": "authorize-source",
          "on_false": "allow",
          "source": "src/lattice.backup/LatticeBackupRestoreService.cs#LatticeBackupRestoreService.AuthorizeCapturedSourcesAsync"
        },
        {
          "id": "authorize-source",
          "check": "For a cross-tree retarget, the restore engine authorizes Backup on each distinct captured source tree over the effective restore scope retargeted to that source.",
          "on_true": "allow",
          "on_false": "deny-restore",
          "source": "src/lattice.backup/LatticeBackupRestoreService.cs#LatticeBackupRestoreService.AuthorizeCapturedSourcesAsync"
        }
      ],
      "terminals": [
        {
          "id": "allow",
          "outcome": "The backup, restore, cold restore, catalog rebuild, catalog scrub, or revert operation proceeds."
        },
        {
          "id": "deny-restore",
          "outcome": "The operation is denied before the restore engine, sink, or catalog mutation path is reached."
        },
        {
          "id": "deny-tenant",
          "outcome": "The operation is denied by active-tenant composition or backup tenant isolation before data is touched."
        }
      ],
      "fail_closed": "Backup and restore authorization is total: a prefix scope must be allowed over its whole range, filtered coverage is refused, absence of a manifest target falls back to Restore on the catalog tree, and cross-tree restore retargets require Backup on the replayed source scope.",
      "sources": [
        "src/lattice.api.backup/LatticeBackupControl.cs",
        "src/lattice.backup/BackupAccessAuthorizer.cs",
        "src/lattice.backup/LatticeBackupRestoreService.cs",
        "src/lattice/LatticeAccessGateEnforcement.cs"
      ]
    },
    {
      "id": "grpc-apps-api-interceptor",
      "nodes": [
        {
          "id": "service-match",
          "check": "Method starts with an app-control, app-catalog, app-workspace, or app-bridge service prefix.",
          "on_true": "auth-scheme",
          "on_false": "allow-unrelated",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "auth-scheme",
          "check": "Method is GetAuthScheme with the auth-scheme request shape.",
          "on_true": "allow-discovery",
          "on_false": "unary-known",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "unary-known",
          "check": "The bound unary RPC and request type classify to a known LatticeAppsApiOperation on the server.",
          "on_true": "require-option",
          "on_false": "deny-permission-denied",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "require-option",
          "check": "LatticeAppsApiGrpcOptions.RequireAuthorization is true.",
          "on_true": "authorizer",
          "on_false": "allow",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "authorizer",
          "check": "ILatticeAppsApiAuthorizer.IsAuthorizedAsync returns true for the server-classified operation and asserted slug.",
          "on_true": "allow",
          "on_false": "deny-permission-denied",
          "source": "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs"
        }
      ],
      "terminals": [
        {
          "id": "allow",
          "outcome": "The gRPC request reaches the classified app service, which stamps credential and active tenant and then applies its facade authorization path."
        },
        {
          "id": "allow-discovery",
          "outcome": "The unauthenticated GetAuthScheme discovery call returns only configured public scheme descriptors."
        },
        {
          "id": "allow-unrelated",
          "outcome": "The interceptor passes the call through unchanged because the method belongs to another service."
        },
        {
          "id": "deny-permission-denied",
          "outcome": "The call fails with gRPC status PermissionDenied before the facade is invoked."
        }
      ],
      "fail_closed": "DenyAppsApiAuthorizer is the default, unknown or streaming app-service methods are rejected, and operation classification comes from the bound RPC and request shape rather than caller-supplied data.",
      "sources": [
        "src/lattice.api.apps.grpc/Security/DenyAppsApiAuthorizer.cs",
        "src/lattice.api.apps.grpc/Security/LatticeAppsApiAuthorizationContext.cs",
        "src/lattice.api.apps.grpc/Security/LatticeAppsApiGrpcAuthInterceptor.cs",
        "src/lattice.api.apps.grpc/Security/LatticeAppsApiOperation.cs"
      ]
    },
    {
      "id": "grpc-auth-api-interceptor",
      "nodes": [
        {
          "id": "service-match",
          "check": "Method starts with /orleans.lattice.api.auth/.",
          "on_true": "require-option",
          "on_false": "allow-unrelated",
          "source": "src/lattice.api.auth.grpc/Security/LatticeAuthApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "require-option",
          "check": "LatticeAuthApiGrpcOptions.RequireAuthorization is true.",
          "on_true": "authorizer",
          "on_false": "allow",
          "source": "src/lattice.api.auth.grpc/Security/LatticeAuthApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "authorizer",
          "check": "ILatticeAuthApiAuthorizer.IsAuthorizedAsync returns true.",
          "on_true": "allow",
          "on_false": "deny-permission-denied",
          "source": "src/lattice.api.auth.grpc/Security/LatticeAuthApiGrpcAuthInterceptor.cs"
        }
      ],
      "terminals": [
        {
          "id": "allow",
          "outcome": "The request proceeds."
        },
        {
          "id": "allow-unrelated",
          "outcome": "The interceptor passes the call through unchanged because the method belongs to another service."
        },
        {
          "id": "deny-permission-denied",
          "outcome": "The call fails with gRPC status PermissionDenied."
        }
      ],
      "fail_closed": "DenyAllAuthApiAuthorizer is the default and unknown methods map to Unknown.",
      "sources": [
        "src/lattice.api.auth.grpc/Security/ILatticeAuthApiAuthorizer.cs",
        "src/lattice.api.auth.grpc/Security/LatticeAuthApiGrpcAuthInterceptor.cs"
      ]
    },
    {
      "id": "grpc-backup-api-interceptor",
      "nodes": [
        {
          "id": "service-match",
          "check": "Method starts with /orleans.lattice.api.backup/.",
          "on_true": "unauthenticated-exempt",
          "on_false": "allow-unrelated",
          "source": "src/lattice.api.backup.grpc/Security/LatticeBackupApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "unauthenticated-exempt",
          "check": "Method is GetAuthScheme.",
          "on_true": "allow-discovery",
          "on_false": "require-option",
          "source": "src/lattice.api.backup.grpc/Security/LatticeBackupApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "require-option",
          "check": "LatticeBackupApiGrpcOptions.RequireAuthorization is true.",
          "on_true": "authorizer",
          "on_false": "allow",
          "source": "src/lattice.api.backup.grpc/Security/LatticeBackupApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "authorizer",
          "check": "ILatticeBackupApiAuthorizer.IsAuthorizedAsync returns true.",
          "on_true": "allow",
          "on_false": "deny-permission-denied",
          "source": "src/lattice.api.backup.grpc/Security/LatticeBackupApiGrpcAuthInterceptor.cs"
        }
      ],
      "terminals": [
        {
          "id": "allow",
          "outcome": "The request proceeds."
        },
        {
          "id": "allow-discovery",
          "outcome": "The unauthenticated GetAuthScheme discovery call proceeds without authorization."
        },
        {
          "id": "allow-unrelated",
          "outcome": "The interceptor passes the call through unchanged because the method belongs to another service."
        },
        {
          "id": "deny-permission-denied",
          "outcome": "The call fails with gRPC status PermissionDenied."
        }
      ],
      "fail_closed": "DenyAllBackupApiAuthorizer is the default and unrecognised methods map to Unknown.",
      "sources": [
        "src/lattice.api.backup.grpc/Security/ILatticeBackupApiAuthorizer.cs",
        "src/lattice.api.backup.grpc/Security/LatticeBackupApiGrpcAuthInterceptor.cs"
      ]
    },
    {
      "id": "grpc-data-api-interceptor",
      "nodes": [
        {
          "id": "service-match",
          "check": "Method starts with /orleans.lattice.api.data/.",
          "on_true": "require-option",
          "on_false": "allow-unrelated",
          "source": "src/lattice.api.data.grpc/Security/LatticeDataApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "require-option",
          "check": "LatticeDataApiGrpcOptions.RequireAuthorization is true.",
          "on_true": "authorizer",
          "on_false": "allow",
          "source": "src/lattice.api.data.grpc/Security/LatticeDataApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "authorizer",
          "check": "ILatticeDataApiAuthorizer.IsAuthorizedAsync returns true.",
          "on_true": "allow",
          "on_false": "deny-permission-denied",
          "source": "src/lattice.api.data.grpc/Security/LatticeDataApiGrpcAuthInterceptor.cs"
        }
      ],
      "terminals": [
        {
          "id": "allow",
          "outcome": "The request proceeds."
        },
        {
          "id": "allow-unrelated",
          "outcome": "The interceptor passes the call through unchanged because the method belongs to another service."
        },
        {
          "id": "deny-permission-denied",
          "outcome": "The call fails with gRPC status PermissionDenied."
        }
      ],
      "fail_closed": "DenyAllDataApiAuthorizer is the default and unrecognised methods map to Unknown.",
      "sources": [
        "src/lattice.api.data.grpc/Security/ILatticeDataApiAuthorizer.cs",
        "src/lattice.api.data.grpc/Security/LatticeDataApiGrpcAuthInterceptor.cs"
      ]
    },
    {
      "id": "grpc-replication-api-interceptor",
      "nodes": [
        {
          "id": "service-match",
          "check": "Method starts with /orleans.lattice.api.replication/ or /orleans.lattice.api.replication.status/.",
          "on_true": "unauthenticated-exempt",
          "on_false": "allow-unrelated",
          "source": "src/lattice.api.replication.grpc/Security/LatticeReplicationApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "unauthenticated-exempt",
          "check": "Method is GetAuthScheme.",
          "on_true": "allow-discovery",
          "on_false": "require-option",
          "source": "src/lattice.api.replication.grpc/Security/LatticeReplicationApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "require-option",
          "check": "LatticeReplicationApiGrpcOptions.RequireAuthorization is true.",
          "on_true": "authorizer",
          "on_false": "allow",
          "source": "src/lattice.api.replication.grpc/Security/LatticeReplicationApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "authorizer",
          "check": "ILatticeReplicationApiAuthorizer.IsAuthorizedAsync returns true.",
          "on_true": "allow",
          "on_false": "deny-permission-denied",
          "source": "src/lattice.api.replication.grpc/Security/LatticeReplicationApiGrpcAuthInterceptor.cs"
        }
      ],
      "terminals": [
        {
          "id": "allow",
          "outcome": "The request proceeds."
        },
        {
          "id": "allow-discovery",
          "outcome": "The unauthenticated GetAuthScheme discovery call proceeds without authorization."
        },
        {
          "id": "allow-unrelated",
          "outcome": "The interceptor passes the call through unchanged because the method belongs to another service."
        },
        {
          "id": "deny-permission-denied",
          "outcome": "The call fails with gRPC status PermissionDenied."
        }
      ],
      "fail_closed": "DenyAllReplicationApiAuthorizer is the default and unrecognised methods map to Unknown.",
      "sources": [
        "src/lattice.api.replication.grpc/Security/ILatticeReplicationApiAuthorizer.cs",
        "src/lattice.api.replication.grpc/Security/LatticeReplicationApiGrpcAuthInterceptor.cs"
      ]
    },
    {
      "id": "grpc-replication-peer-authentication",
      "nodes": [
        {
          "id": "service-match",
          "check": "Method targets the live push, remote snapshot, or saga replication gRPC service.",
          "on_true": "require-authentication",
          "on_false": "allow-unrelated",
          "source": "src/lattice.replication.grpc/Security/LatticeReplicationGrpcAuthInterceptor.cs"
        },
        {
          "id": "require-authentication",
          "check": "LatticeReplicationSecurityOptions.RequireAuthentication is true.",
          "on_true": "secret-present",
          "on_false": "saga-origin-check",
          "source": "src/lattice.replication.grpc/Security/LatticeReplicationGrpcAuthInterceptor.cs"
        },
        {
          "id": "secret-present",
          "check": "Metadata contains x-lattice-replication-secret.",
          "on_true": "secret-accepted",
          "on_false": "deny-unauthenticated",
          "source": "src/lattice.replication.grpc/Security/LatticeReplicationGrpcAuthInterceptor.cs"
        },
        {
          "id": "secret-accepted",
          "check": "The replication secret provider accepts the presented secret.",
          "on_true": "origin-binding-option",
          "on_false": "deny-permission-denied",
          "source": "src/lattice.replication.grpc/Security/LatticeReplicationGrpcAuthInterceptor.cs"
        },
        {
          "id": "origin-binding-option",
          "check": "LatticeReplicationSecurityOptions.BindCredentialToOriginCluster is true.",
          "on_true": "origin-credential-bound",
          "on_false": "saga-origin-check",
          "source": "src/lattice.replication.grpc/Security/LatticeReplicationGrpcAuthInterceptor.cs"
        },
        {
          "id": "origin-credential-bound",
          "check": "The x-lattice-replication-origin header is non-blank, the replication secret provider returns a non-empty outbound secret for that origin, and the presented secret equals it in fixed time.",
          "on_true": "saga-origin-check",
          "on_false": "deny-permission-denied",
          "source": "src/lattice.replication.grpc/Security/LatticeReplicationGrpcAuthInterceptor.cs#LatticeReplicationGrpcAuthInterceptor.EnforceOriginBindingAsync"
        },
        {
          "id": "saga-origin-check",
          "check": "Call is a saga control RPC.",
          "on_true": "saga-credential-bound",
          "on_false": "body-origin-check",
          "source": "src/lattice.replication.grpc/LatticeSagaGrpcService.cs"
        },
        {
          "id": "saga-credential-bound",
          "check": "The x-lattice-replication-origin header is non-blank and ordinally equals the peer the interceptor recorded after a successful credential-to-origin binding; no peer is recorded when RequireAuthentication or BindCredentialToOriginCluster is false.",
          "on_true": "saga-decision-query",
          "on_false": "deny-permission-denied",
          "source": "src/lattice.replication.grpc/LatticeSagaGrpcService.cs#LatticeSagaGrpcService.HandleAsync"
        },
        {
          "id": "saga-decision-query",
          "check": "Call is GetDecision, a participant's query to the saga's coordinator cluster.",
          "on_true": "origin-authorized",
          "on_false": "saga-coordinator-attribution",
          "source": "src/lattice.replication.grpc/LatticeSagaGrpcService.cs#LatticeSagaGrpcService.HandleAsync"
        },
        {
          "id": "saga-coordinator-attribution",
          "check": "The request body's CoordinatorClusterId is blank or ordinally equals the stamped origin.",
          "on_true": "origin-authorized",
          "on_false": "deny-permission-denied",
          "source": "src/lattice.replication.grpc/LatticeSagaGrpcService.cs#LatticeSagaGrpcService.HandleAsync"
        },
        {
          "id": "origin-authorized",
          "check": "ISagaPeerAuthorizer.IsAuthorizedAsync accepts the stamped origin (by default it accepts an origin that is a non-empty key in LatticeReplicationGrpcOptions.Peers).",
          "on_true": "saga-decision-requester",
          "on_false": "deny-permission-denied",
          "source": "src/lattice.replication.grpc/LatticeSagaGrpcService.cs#LatticeSagaGrpcService.HandleAsync"
        },
        {
          "id": "saga-decision-requester",
          "check": "Call is GetDecision.",
          "on_true": "decision-requester-participant",
          "on_false": "allow",
          "source": "src/lattice.replication.grpc/LatticeSagaGrpcService.cs#LatticeSagaGrpcService.HandleAsync"
        },
        {
          "id": "decision-requester-participant",
          "check": "The coordinator has not started the saga (it answers Aborted), or the stamped origin, which overwrites any body RequesterClusterId, is one of the saga's recorded participants.",
          "on_true": "allow",
          "on_false": "deny-permission-denied",
          "source": "src/lattice.replication/Grains/CrossClusterSagaCoordinatorGrain.cs#CrossClusterSagaCoordinatorGrain.ResolveDecisionForParticipantAsync"
        },
        {
          "id": "body-origin-check",
          "check": "Call is Push, ExchangeContentManifest, or GetPeerHighWaterMark, which key the durable per-origin high-water mark by a body-declared OriginClusterId.",
          "on_true": "body-origin-bound",
          "on_false": "allow",
          "source": "src/lattice.replication.grpc/LatticeReplicationGrpcService.cs#EnsureOriginMatchesCaller"
        },
        {
          "id": "body-origin-bound",
          "check": "The x-lattice-replication-origin header is non-blank and ordinally equals the body OriginClusterId.",
          "on_true": "allow",
          "on_false": "deny-permission-denied",
          "source": "src/lattice.replication.grpc/LatticeReplicationGrpcService.cs#EnsureOriginMatchesCaller"
        }
      ],
      "terminals": [
        {
          "id": "allow",
          "outcome": "The request proceeds."
        },
        {
          "id": "allow-unrelated",
          "outcome": "The interceptor passes the call through unchanged because the method belongs to another service."
        },
        {
          "id": "deny-permission-denied",
          "outcome": "The call fails with gRPC status PermissionDenied."
        },
        {
          "id": "deny-unauthenticated",
          "outcome": "The call fails with gRPC status Unauthenticated."
        }
      ],
      "fail_closed": "Authentication is required by default; missing secrets are Unauthenticated, non-matching secrets are PermissionDenied, credential-to-origin binding is required by default, and saga control requires that binding (it is refused when RequireAuthentication or BindCredentialToOriginCluster is off) and an authorized peer origin; a saga decision is answered only to a recorded participant; a peer may only advance or read the high-water mark of its own stamped origin.",
      "sources": [
        "src/lattice.replication.grpc/Security/LatticeReplicationGrpcAuthInterceptor.cs",
        "src/lattice.replication.grpc/Security/LatticeReplicationGrpcMetadataNames.cs",
        "src/lattice.replication.grpc/LatticeSagaGrpcService.cs",
        "src/lattice.replication.grpc/PeerMapSagaPeerAuthorizer.cs",
        "src/lattice.replication/Security/LatticeReplicationSecurityOptions.cs",
        "src/lattice.replication.grpc/LatticeReplicationGrpcService.cs",
        "src/lattice.replication/Grains/CrossClusterSagaCoordinatorGrain.cs"
      ]
    },
    {
      "id": "grpc-schema-api-interceptor",
      "nodes": [
        {
          "id": "service-match",
          "check": "Method starts with /orleans.lattice.api.schema/.",
          "on_true": "unauthenticated-exempt",
          "on_false": "allow-unrelated",
          "source": "src/lattice.api.schema.grpc/Security/LatticeSchemaApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "unauthenticated-exempt",
          "check": "Method is GetAuthScheme.",
          "on_true": "allow-discovery",
          "on_false": "require-option",
          "source": "src/lattice.api.schema.grpc/Security/LatticeSchemaApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "require-option",
          "check": "LatticeSchemaApiGrpcOptions.RequireAuthorization is true.",
          "on_true": "authorizer",
          "on_false": "allow",
          "source": "src/lattice.api.schema.grpc/Security/LatticeSchemaApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "authorizer",
          "check": "ILatticeSchemaApiAuthorizer.IsAuthorizedAsync returns true.",
          "on_true": "allow",
          "on_false": "deny-permission-denied",
          "source": "src/lattice.api.schema.grpc/Security/LatticeSchemaApiGrpcAuthInterceptor.cs"
        }
      ],
      "terminals": [
        {
          "id": "allow",
          "outcome": "The request proceeds."
        },
        {
          "id": "allow-discovery",
          "outcome": "The unauthenticated GetAuthScheme discovery call proceeds without authorization."
        },
        {
          "id": "allow-unrelated",
          "outcome": "The interceptor passes the call through unchanged because the method belongs to another service."
        },
        {
          "id": "deny-permission-denied",
          "outcome": "The call fails with gRPC status PermissionDenied."
        }
      ],
      "fail_closed": "DenySchemaApiAuthorizer is the default and unrecognised methods map to Unknown.",
      "sources": [
        "src/lattice.api.schema.grpc/Security/ILatticeSchemaApiAuthorizer.cs",
        "src/lattice.api.schema.grpc/Security/LatticeSchemaApiGrpcAuthInterceptor.cs"
      ]
    },
    {
      "id": "grpc-state-api-interceptor",
      "nodes": [
        {
          "id": "service-match",
          "check": "Method starts with /orleans.lattice.api.state/.",
          "on_true": "unauthenticated-exempt",
          "on_false": "allow-unrelated",
          "source": "src/lattice.api.state.grpc/Security/LatticeStateApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "unauthenticated-exempt",
          "check": "Method is GetAuthScheme.",
          "on_true": "allow-discovery",
          "on_false": "require-option",
          "source": "src/lattice.api.state.grpc/Security/LatticeStateApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "require-option",
          "check": "LatticeStateApiGrpcOptions.RequireAuthorization is true.",
          "on_true": "authorizer",
          "on_false": "allow",
          "source": "src/lattice.api.state.grpc/Security/LatticeStateApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "authorizer",
          "check": "ILatticeStateApiAuthorizer.IsAuthorizedAsync returns true.",
          "on_true": "allow",
          "on_false": "deny-permission-denied",
          "source": "src/lattice.api.state.grpc/Security/LatticeStateApiGrpcAuthInterceptor.cs"
        }
      ],
      "terminals": [
        {
          "id": "allow",
          "outcome": "The request proceeds."
        },
        {
          "id": "allow-discovery",
          "outcome": "The unauthenticated GetAuthScheme discovery call proceeds without authorization."
        },
        {
          "id": "allow-unrelated",
          "outcome": "The interceptor passes the call through unchanged because the method belongs to another service."
        },
        {
          "id": "deny-permission-denied",
          "outcome": "The call fails with gRPC status PermissionDenied."
        }
      ],
      "fail_closed": "DenyAllStateApiAuthorizer is the default and unrecognised methods map to Unknown.",
      "sources": [
        "src/lattice.api.state.grpc/Security/ILatticeStateApiAuthorizer.cs",
        "src/lattice.api.state.grpc/Security/LatticeStateApiGrpcAuthInterceptor.cs"
      ]
    },
    {
      "id": "grpc-telemetry-api-interceptor",
      "nodes": [
        {
          "id": "service-match",
          "check": "Method starts with /orleans.lattice.api.telemetry/.",
          "on_true": "unauthenticated-exempt",
          "on_false": "allow-unrelated",
          "source": "src/lattice.api.telemetry.grpc/Security/LatticeTelemetryApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "unauthenticated-exempt",
          "check": "Method is GetAuthScheme.",
          "on_true": "allow-discovery",
          "on_false": "require-option",
          "source": "src/lattice.api.telemetry.grpc/Security/LatticeTelemetryApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "require-option",
          "check": "LatticeTelemetryApiGrpcOptions.RequireAuthorization is true.",
          "on_true": "authorizer",
          "on_false": "allow",
          "source": "src/lattice.api.telemetry.grpc/Security/LatticeTelemetryApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "authorizer",
          "check": "ILatticeTelemetryApiAuthorizer.IsAuthorizedAsync returns true.",
          "on_true": "allow",
          "on_false": "deny-permission-denied",
          "source": "src/lattice.api.telemetry.grpc/Security/LatticeTelemetryApiGrpcAuthInterceptor.cs"
        }
      ],
      "terminals": [
        {
          "id": "allow",
          "outcome": "The request proceeds."
        },
        {
          "id": "allow-discovery",
          "outcome": "The unauthenticated GetAuthScheme discovery call proceeds without authorization."
        },
        {
          "id": "allow-unrelated",
          "outcome": "The interceptor passes the call through unchanged because the method belongs to another service."
        },
        {
          "id": "deny-permission-denied",
          "outcome": "The call fails with gRPC status PermissionDenied."
        }
      ],
      "fail_closed": "DenyTelemetryApiAuthorizer is the default and unrecognised methods map to Unknown.",
      "sources": [
        "src/lattice.api.telemetry.grpc/Security/ILatticeTelemetryApiAuthorizer.cs",
        "src/lattice.api.telemetry.grpc/Security/LatticeTelemetryApiGrpcAuthInterceptor.cs"
      ]
    },
    {
      "id": "grpc-tenantadmin-api-interceptor",
      "nodes": [
        {
          "id": "service-match",
          "check": "Method starts with /orleans.lattice.api.tenantadmin/.",
          "on_true": "exemption",
          "on_false": "allow-unrelated",
          "source": "src/lattice.api.tenantadmin.grpc/Security/LatticeTenantAdminApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "exemption",
          "check": "Method is GetAuthScheme or tenant self-service.",
          "on_true": "allow-facade-scoped",
          "on_false": "require-option",
          "source": "src/lattice.api.tenantadmin.grpc/Security/LatticeTenantAdminApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "require-option",
          "check": "LatticeTenantAdminApiGrpcOptions.RequireAuthorization is true.",
          "on_true": "authorizer",
          "on_false": "allow",
          "source": "src/lattice.api.tenantadmin.grpc/Security/LatticeTenantAdminApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "authorizer",
          "check": "ILatticeTenantAdminApiAuthorizer.IsAuthorizedAsync returns true.",
          "on_true": "allow",
          "on_false": "deny-permission-denied",
          "source": "src/lattice.api.tenantadmin.grpc/Security/LatticeTenantAdminApiGrpcAuthInterceptor.cs"
        }
      ],
      "terminals": [
        {
          "id": "allow",
          "outcome": "The request proceeds."
        },
        {
          "id": "allow-facade-scoped",
          "outcome": "GetAuthScheme or a tenant self-service method proceeds past the transport authorizer; the facade applies its own tenant-scoped authorization."
        },
        {
          "id": "allow-unrelated",
          "outcome": "The interceptor passes the call through unchanged because the method belongs to another service."
        },
        {
          "id": "deny-permission-denied",
          "outcome": "The call fails with gRPC status PermissionDenied."
        }
      ],
      "fail_closed": "DenyTenantAdminApiAuthorizer is the default and unknown operations map to Unknown.",
      "sources": [
        "src/lattice.api.tenantadmin.grpc/Security/ILatticeTenantAdminApiAuthorizer.cs",
        "src/lattice.api.tenantadmin.grpc/Security/LatticeTenantAdminApiGrpcAuthInterceptor.cs"
      ]
    },
    {
      "id": "grpc-treeadmin-api-interceptor",
      "nodes": [
        {
          "id": "service-match",
          "check": "Method starts with /orleans.lattice.api.treeadmin/.",
          "on_true": "unauthenticated-exempt",
          "on_false": "allow-unrelated",
          "source": "src/lattice.api.treeadmin.grpc/Security/LatticeTreeAdminApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "unauthenticated-exempt",
          "check": "Method is GetAuthScheme.",
          "on_true": "allow-discovery",
          "on_false": "require-option",
          "source": "src/lattice.api.treeadmin.grpc/Security/LatticeTreeAdminApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "require-option",
          "check": "LatticeTreeAdminApiGrpcOptions.RequireAuthorization is true.",
          "on_true": "primary-authorizer",
          "on_false": "allow",
          "source": "src/lattice.api.treeadmin.grpc/Security/LatticeTreeAdminApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "primary-authorizer",
          "check": "ILatticeTreeAdminApiAuthorizer.IsAuthorizedAsync returns true for the primary target.",
          "on_true": "secondary-target",
          "on_false": "deny-permission-denied",
          "source": "src/lattice.api.treeadmin.grpc/Security/LatticeTreeAdminApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "secondary-target",
          "check": "Request names a second caller-supplied tree id distinct from the primary target.",
          "on_true": "secondary-authorizer",
          "on_false": "allow",
          "source": "src/lattice.api.treeadmin.grpc/Security/LatticeTreeAdminApiGrpcAuthInterceptor.cs"
        },
        {
          "id": "secondary-authorizer",
          "check": "ILatticeTreeAdminApiAuthorizer.IsAuthorizedAsync returns true for the secondary target.",
          "on_true": "allow",
          "on_false": "deny-permission-denied",
          "source": "src/lattice.api.treeadmin.grpc/Security/LatticeTreeAdminApiGrpcAuthInterceptor.cs"
        }
      ],
      "terminals": [
        {
          "id": "allow",
          "outcome": "The request proceeds."
        },
        {
          "id": "allow-discovery",
          "outcome": "The unauthenticated GetAuthScheme discovery call proceeds without authorization."
        },
        {
          "id": "allow-unrelated",
          "outcome": "The interceptor passes the call through unchanged because the method belongs to another service."
        },
        {
          "id": "deny-permission-denied",
          "outcome": "The call fails with gRPC status PermissionDenied."
        }
      ],
      "fail_closed": "DenyTreeAdminApiAuthorizer is the default; unrecognised methods map to Unknown and every caller-supplied tree target is authorized.",
      "sources": [
        "src/lattice.api.treeadmin.grpc/Security/ILatticeTreeAdminApiAuthorizer.cs",
        "src/lattice.api.treeadmin.grpc/Security/LatticeTreeAdminApiGrpcAuthInterceptor.cs"
      ]
    },
    {
      "id": "ilattice-access-gate",
      "nodes": [
        {
          "id": "bootstrap-admin",
          "check": "Subject id is in BootstrapAdministrators.",
          "on_true": "allow",
          "on_false": "control-plane",
          "source": "src/lattice.auth/PolicyAccessGate.cs"
        },
        {
          "id": "control-plane",
          "check": "Tree is reserved auth, tenant-admin capability, tenant/app registry, membership/schema/backup backing store, tag-* shared tag index tree, or * sentinel.",
          "on_true": "explicit-control-allow",
          "on_false": "strict-fence",
          "source": "src/lattice.auth/PolicyAccessGate.cs"
        },
        {
          "id": "explicit-control-allow",
          "check": "Compiled policy has an explicit matching allow.",
          "on_true": "allow",
          "on_false": "deny-control-plane",
          "source": "src/lattice.auth/PolicyAccessGate.cs"
        },
        {
          "id": "strict-fence",
          "check": "Write targets a strict-consistency tree with an unmet required policy epoch.",
          "on_true": "deny",
          "on_false": "snapshot-warm",
          "source": "src/lattice.auth/PolicyAccessGate.cs"
        },
        {
          "id": "snapshot-warm",
          "check": "The compiled policy snapshot is warm; a cold snapshot (first request on the silo, or an empty snapshot whose first committed rule is still being rebuilt) is warmed with EnsureWarmAsync before evaluation, so the request is never answered from the empty snapshot.",
          "on_true": "policy-evaluate",
          "on_false": "policy-evaluate",
          "source": "src/lattice.auth/PolicyAccessGate.cs#PolicyAccessGate"
        },
        {
          "id": "policy-evaluate",
          "check": "Policy evaluation returns allow or filtered allow.",
          "on_true": "tenant-enforcer",
          "on_false": "deny",
          "source": "src/lattice.auth/PolicyEvaluator.cs"
        },
        {
          "id": "tenant-enforcer",
          "check": "Tenancy is active and tenant isolation denies the request.",
          "on_true": "deny",
          "on_false": "allow",
          "source": "src/lattice.auth/PolicyAccessGate.cs"
        }
      ],
      "terminals": [
        {
          "id": "allow",
          "outcome": "The request proceeds."
        },
        {
          "id": "deny",
          "outcome": "The request is denied."
        },
        {
          "id": "deny-control-plane",
          "outcome": "Denied: a control-plane namespace without a bootstrap administrator or an explicit matching allow, independent of DefaultEffect."
        }
      ],
      "fail_closed": "Control-plane namespaces deny independently of DefaultEffect unless bootstrap or explicit allow applies.",
      "sources": [
        "src/lattice/ILatticeAccessGate.cs",
        "src/lattice.auth/PolicyAccessGate.cs",
        "src/lattice.auth/PolicyEvaluator.cs"
      ]
    },
    {
      "id": "lattice-auth-policy-evaluator",
      "nodes": [
        {
          "id": "all-trees-deny",
          "check": "All-trees grants are enabled, the target tree is not sys-auth-*, sys-tenant-*, sys-app-*, sys-membership-*, sys-schema-*, sys-backup-*, a tag-* shared tag index tree, _lattice_tenant_admin_* or the * sentinel, and the * bucket has a matching deny.",
          "on_true": "deny",
          "on_false": "collection-request",
          "source": "src/lattice.auth/PolicyEvaluator.cs#PolicyEvaluator"
        },
        {
          "id": "collection-request",
          "check": "The request has no exact key, the target tree has per-key rules, and the target is not the * sentinel.",
          "on_true": "range-uniform-allow",
          "on_false": "specific-tree",
          "source": "src/lattice.auth/PolicyEvaluator.cs#PolicyEvaluator.Evaluate"
        },
        {
          "id": "range-uniform-allow",
          "check": "The compiled policy finds that every key in the requested range resolves to one Allow after folding any all-trees match.",
          "on_true": "allow",
          "on_false": "filtered",
          "source": "src/lattice.auth/CompiledTree.cs#CompiledTree.TryResolveUniformRange"
        },
        {
          "id": "specific-tree",
          "check": "The target tree bucket has a matching operator rule (a rule whose id is not in the tenant: namespace) for a point request or a uniform whole-scope request; a matched operator verdict is final.",
          "on_true": "matched-effect",
          "on_false": "all-trees-allow",
          "source": "src/lattice.auth/PolicyEvaluator.cs#PolicyEvaluator.Evaluate"
        },
        {
          "id": "all-trees-allow",
          "check": "All-trees grants are enabled, the target tree is not sys-auth-*, sys-tenant-*, sys-app-*, sys-membership-*, sys-schema-*, sys-backup-*, a tag-* shared tag index tree, _lattice_tenant_admin_* or the * sentinel, and the * bucket has a matching allow.",
          "on_true": "allow",
          "on_false": "tenant-layer-applies",
          "source": "src/lattice.auth/PolicyEvaluator.cs"
        },
        {
          "id": "tenant-layer-applies",
          "check": "ITenantRuleLayer.IsActive, the compiled snapshot carries a tenant partition, and the target is a tenant-layer tree t/{tenant}/{name} (tenant not default; name not *, a/..., sys-... or _lattice_...) with tenant-tier rules of its own or of its tenant's tenant-wide scope.",
          "on_true": "tenant-wide-deny",
          "on_false": "default-effect",
          "source": "src/lattice.auth/PolicyEvaluator.cs"
        },
        {
          "id": "tenant-wide-deny",
          "check": "The owning tenant's tenant-wide (t/{tenant}/*) bucket has a matching deny.",
          "on_true": "deny",
          "on_false": "tenant-tree",
          "source": "src/lattice.auth/PolicyEvaluator.cs"
        },
        {
          "id": "tenant-tree",
          "check": "The tree's tenant bucket has a matching tenant-tier rule (key, then longest prefix, then tree; deny overrides allow at an equal tier; UserRuleBeatsGroupRuleAtEqualScope honoured).",
          "on_true": "tenant-matched-effect",
          "on_false": "tenant-wide-allow",
          "source": "src/lattice.auth/PolicyEvaluator.cs"
        },
        {
          "id": "tenant-wide-allow",
          "check": "The owning tenant's tenant-wide bucket has a matching allow.",
          "on_true": "allow",
          "on_false": "default-effect",
          "source": "src/lattice.auth/PolicyEvaluator.cs#PolicyEvaluator"
        },
        {
          "id": "default-effect",
          "check": "DefaultEffect is Allow.",
          "on_true": "allow",
          "on_false": "deny",
          "source": "src/lattice.auth/PolicyEvaluator.cs#PolicyEvaluator"
        }
      ],
      "terminals": [
        {
          "id": "allow",
          "outcome": "The request proceeds."
        },
        {
          "id": "deny",
          "outcome": "The request is denied."
        },
        {
          "id": "filtered",
          "outcome": "The decision carries a per-key filter; consumers that cannot safely narrow must refuse it."
        },
        {
          "id": "matched-effect",
          "outcome": "The matched rule effect (Allow or Deny) for the specific tree is the decision."
        },
        {
          "id": "tenant-matched-effect",
          "outcome": "The matched tenant-tier rule effect (Allow or Deny) for the tree is the decision."
        }
      ],
      "fail_closed": "DefaultEffect defaults to Deny, control-plane namespaces do not consult the all-trees tier, and a range is a plain allow only when every key in it resolves to the same allowing rule; the tenant layer is consulted only when no operator rule matches and never for a control-plane, app-owned or default-tenant tree, and with the layer inactive no tenant-tier rule is evaluated.",
      "sources": [
        "src/lattice.auth/CompiledTree.cs",
        "src/lattice.auth/LatticeAuthOptions.cs",
        "src/lattice.auth/PolicyEvaluator.cs",
        "src/lattice.auth/TenantRuleConfinement.cs",
        "src/lattice.auth/ITenantRuleLayer.cs"
      ]
    },
    {
      "id": "mcp-app-tool-authorization",
      "nodes": [
        {
          "id": "source-ready",
          "check": "The app MCP surface has providers plus registry projection, app source, and access gate collaborators.",
          "on_true": "resolve-tenant",
          "on_false": "not-advertised",
          "source": "src/lattice.api.mcp.apps/AppMcpToolSource.cs"
        },
        {
          "id": "resolve-tenant",
          "check": "The caller's credential and asserted active tenant resolve to a tenant context.",
          "on_true": "enabled-app",
          "on_false": "not-advertised",
          "source": "src/lattice.api.mcp.apps/AppMcpToolSource.cs"
        },
        {
          "id": "enabled-app",
          "check": "The registry snapshot has an enabled app install whose ceiling is pinned to its installed version.",
          "on_true": "tool-activation",
          "on_false": "not-advertised",
          "source": "src/lattice.api.mcp.apps/AppMcpToolSource.cs"
        },
        {
          "id": "tool-activation",
          "check": "The manifest resolves and every declared tool pairs exactly with one provider implementation under a non-reserved slug.",
          "on_true": "role-held",
          "on_false": "not-advertised",
          "source": "src/lattice.api.mcp.apps/AppMcpToolActivation.cs"
        },
        {
          "id": "role-held",
          "check": "The caller holds the tool's declared role by binding (its group closure contains a group the install binds to the role, and the role confers an operation and a scope), and the access gate, asked only after the binding holds, refuses none of the role's operations on at least one resolved scope. A key-filtered answer is tested at a representative key of the scope, so it can only narrow, never grant; the caller's other rules never add a role.",
          "on_true": "coarse-authorizer",
          "on_false": "not-advertised",
          "source": "src/lattice.apps/Registry/AppRoleGate.cs#AppRoleGate.IsHeldAsync"
        },
        {
          "id": "coarse-authorizer",
          "check": "The shared MCP coarse authorizer admits the namespaced tool name for this HTTP context.",
          "on_true": "advertise-and-invoke",
          "on_false": "not-advertised",
          "source": "src/lattice.api.mcp/Discovery/LatticeApiMcpSessionConfigurator.cs"
        }
      ],
      "terminals": [
        {
          "id": "advertise-and-invoke",
          "outcome": "The namespaced app tool is advertised; invocation re-runs the same role decision against the current registry before calling the implementation under the caller credential."
        },
        {
          "id": "not-advertised",
          "outcome": "The app tool is absent from tools/list and therefore unreachable from tools/call; if a stale session invokes it, the namespaced tool throws an authorization McpException."
        }
      ],
      "fail_closed": "A missing collaborator, unvalidated tenant, disabled app, unpinned ceiling, bad tool pairing, lost role binding, a deny on the role, or MCP coarse-authorizer denial withholds the app tool and the invocation path re-checks current state; a key-filtered answer can only narrow a bound role, never grant one.",
      "sources": [
        "src/lattice.api.mcp/Discovery/ILatticeApiMcpAppToolSource.cs",
        "src/lattice.api.mcp/Discovery/LatticeApiMcpSessionConfigurator.cs",
        "src/lattice.api.mcp.apps/AppMcpNamespacedTool.cs",
        "src/lattice.apps/Registry/AppRoleGate.cs#AppRoleGate.IsHeldAsync",
        "src/lattice.api.mcp.apps/AppMcpToolActivation.cs",
        "src/lattice.apps/Registry/AppRoleGate.cs",
        "src/lattice.apps/Registry/AppRoleGrantEvaluator.cs",
        "src/lattice.api.mcp.apps/AppMcpToolSource.cs"
      ]
    },
    {
      "id": "mcp-authorization-gate",
      "nodes": [
        {
          "id": "http-authorization",
          "check": "LatticeApiMcpOptions.RequireAuthorization is true.",
          "on_true": "aspnet-authenticated",
          "on_false": "credential",
          "source": "src/lattice.api.mcp/LatticeMcpServiceCollectionExtensions.cs"
        },
        {
          "id": "aspnet-authenticated",
          "check": "ASP.NET Core endpoint authorization authenticates the caller.",
          "on_true": "credential",
          "on_false": "deny-http",
          "source": "src/lattice.api.mcp/LatticeMcpServiceCollectionExtensions.cs"
        },
        {
          "id": "credential",
          "check": "The MCP credential bridge resolves a non-null LatticeCredential for the session.",
          "on_true": "permission-resolver",
          "on_false": "advertise-no-tools",
          "source": "src/lattice.api.mcp/Discovery/LatticeApiMcpSessionConfigurator.cs"
        },
        {
          "id": "permission-resolver",
          "check": "The MCP permission resolver grants at least one facade group from effective permissions.",
          "on_true": "group-registered",
          "on_false": "advertise-capabilities-only",
          "source": "src/lattice.api.mcp/Discovery/LatticeApiMcpSessionConfigurator.cs"
        },
        {
          "id": "group-registered",
          "check": "A registered MCP tool module contributes the requested group.",
          "on_true": "group-granted",
          "on_false": "not-advertised",
          "source": "src/lattice.api.mcp/Discovery/ILatticeApiMcpToolGroup.cs"
        },
        {
          "id": "group-granted",
          "check": "The session access set contains the group, which any one operation in the group's capability mask grants.",
          "on_true": "tool-minimum",
          "on_false": "not-advertised",
          "source": "src/lattice.api.mcp/Discovery/LatticeApiMcpGroupCapabilityMap.cs"
        },
        {
          "id": "tool-minimum",
          "check": "The granted operations intersect the tool's per-tool operation minimum: mutating data tools and mutating repository-context tools require Write, Delete, RangeDelete, CrdtApply, AtomicWrite or BulkLoad; tree-admin schema tools require Read (schema reads, schema operation status and list, and compliance scans), Read or SchemaAdmin (probe_capabilities), or SchemaAdmin (every other schema tool); every other tool uses its group's coarse mask.",
          "on_true": "write-opt-in",
          "on_false": "not-advertised",
          "source": "src/lattice.api.mcp/Discovery/LatticeApiMcpSessionConfigurator.cs#LatticeApiMcpSessionConfigurator.AddPermittedGroupToolsAsync"
        },
        {
          "id": "write-opt-in",
          "check": "The requested mutating tool was contributed because its module was registered with its write opt-in (for example AddDataTools(enableWrites: true)), or the requested tool is read-only.",
          "on_true": "coarse-authorizer",
          "on_false": "not-registered",
          "source": "src/lattice.api.mcp/LatticeMcpDataToolsServiceCollectionExtensions.cs"
        },
        {
          "id": "coarse-authorizer",
          "check": "The invocation gate resolves the HttpContext and ILatticeApiMcpAuthorizer returns true.",
          "on_true": "stamp-and-invoke",
          "on_false": "deny-mcp",
          "source": "src/lattice.api.mcp/Discovery/McpToolAuthorizationGate.cs"
        }
      ],
      "terminals": [
        {
          "id": "advertise-capabilities-only",
          "outcome": "The session is offered only the capabilities tool."
        },
        {
          "id": "advertise-no-tools",
          "outcome": "The session is offered no tools."
        },
        {
          "id": "deny-http",
          "outcome": "ASP.NET Core endpoint authorization rejects the HTTP request before MCP handling."
        },
        {
          "id": "deny-mcp",
          "outcome": "The tool invocation fails with an authorization McpException."
        },
        {
          "id": "not-advertised",
          "outcome": "The tool is not listed for the session."
        },
        {
          "id": "not-registered",
          "outcome": "The tool does not exist on the server."
        },
        {
          "id": "stamp-and-invoke",
          "outcome": "The caller credential and active tenant are stamped and the tool handler runs, subject to the facade access gate."
        }
      ],
      "fail_closed": "The endpoint requires authentication by default, DenyAllMcpAuthorizer denies by default, missing HttpContext or authorizer denies, unauthenticated sessions get no tools, data write tools are absent unless explicitly enabled, and any tool withheld by the per-tool minimum is unreachable at tools/call because the session tool collection serves both.",
      "sources": [
        "src/lattice.api.mcp/LatticeApiMcpOptions.cs",
        "src/lattice.api.mcp/LatticeMcpServiceCollectionExtensions.cs",
        "src/lattice.api.mcp/Security/ILatticeApiMcpAuthorizer.cs",
        "src/lattice.api.mcp/Discovery/McpToolAuthorizationGate.cs",
        "src/lattice.api.mcp/Discovery/LatticeApiMcpSessionConfigurator.cs",
        "src/lattice.api.mcp/Discovery/CredentialStampingTool.cs",
        "src/lattice.api.mcp/Discovery/AuthorizedMetaTool.cs",
        "src/lattice.api.mcp/LatticeMcpDataToolsServiceCollectionExtensions.cs",
        "src/lattice.api.mcp/Discovery/ILatticeApiMcpToolGroup.cs",
        "src/lattice.api.mcp/Tools/Data/DataToolGroup.cs"
      ]
    },
    {
      "id": "mcp-discovery-group-grant",
      "nodes": [
        {
          "id": "allow-rule",
          "check": "The caller rule effect is Allow.",
          "on_true": "rule-scope",
          "on_false": "rule-ignored",
          "source": "src/lattice.api.mcp/Discovery/AuthAdminMcpPermissionResolver.cs#AuthAdminMcpPermissionResolver.GroupIsGranted"
        },
        {
          "id": "rule-scope",
          "check": "The rule scope TreeId equals LatticeScope.ClusterWideTreeId.",
          "on_true": "match-all-operations",
          "on_false": "match-tree-scoped-operations",
          "source": "src/lattice.api.mcp/Discovery/AuthAdminMcpPermissionResolver.cs#AuthAdminMcpPermissionResolver.CarriedOperations"
        },
        {
          "id": "match-all-operations",
          "check": "rule.Operations intersects the group capability mask.",
          "on_true": "group-discoverable",
          "on_false": "rule-ignored",
          "source": "src/lattice.api.mcp/Discovery/AuthAdminMcpPermissionResolver.cs#AuthAdminMcpPermissionResolver.GroupIsGranted"
        },
        {
          "id": "match-tree-scoped-operations",
          "check": "rule.Operations with the cluster-wide-only bits (LatticeOperation.Telemetry and LatticeOperation.AppInstall) masked out intersects the group capability mask.",
          "on_true": "group-discoverable",
          "on_false": "rule-ignored",
          "source": "src/lattice.api.mcp/Discovery/AuthAdminMcpPermissionResolver.cs#AuthAdminMcpPermissionResolver.ClusterWideOnlyOperations"
        }
      ],
      "terminals": [
        {
          "id": "group-discoverable",
          "outcome": "The tool group is advertised to the session; discovery is not an authorization decision and the call-time gate re-checks every invocation."
        },
        {
          "id": "rule-ignored",
          "outcome": "The rule contributes nothing; the next rule is evaluated, and a group no rule grants is not advertised."
        }
      ],
      "fail_closed": "Deny rules are not consulted at discovery and stay the call-time gate job; a tree-scoped rule never confers the scopeless Telemetry or AppInstall capability, for group discovery or for per-tool minimums.",
      "sources": [
        "src/lattice.api.mcp/Discovery/AuthAdminMcpPermissionResolver.cs#AuthAdminMcpPermissionResolver.GroupIsGranted",
        "src/lattice.api.mcp/Discovery/AuthAdminMcpPermissionResolver.cs#AuthAdminMcpPermissionResolver.CarriedOperations",
        "src/lattice.api.mcp/Discovery/AuthAdminMcpPermissionResolver.cs#AuthAdminMcpPermissionResolver.ClusterWideOnlyOperations"
      ]
    },
    {
      "id": "mcp-region-catalog-tenant-scope",
      "nodes": [
        {
          "id": "tenant-asserted",
          "check": "LatticeActiveTenantContext is active with a non-null tenant that is not the reserved default tenant.",
          "on_true": "tenancy-active",
          "on_false": "unscoped",
          "source": "src/lattice.api.mcp/Remote/LatticeApiMcpRegionCatalog.cs#LatticeApiMcpRegionCatalog.ResolveTenantScopeAsync"
        },
        {
          "id": "tenancy-active",
          "check": "An ITenantRegionVisibilityResolver is registered and IsActive.",
          "on_true": "context-resolver",
          "on_false": "unscoped",
          "source": "src/lattice.api.mcp/Remote/LatticeApiMcpRegionCatalog.cs#LatticeApiMcpRegionCatalog.ResolveTenantScopeAsync"
        },
        {
          "id": "context-resolver",
          "check": "An ITenantContextResolver is registered.",
          "on_true": "assertion-validates",
          "on_false": "refused",
          "source": "src/lattice.api.mcp/Remote/LatticeApiMcpRegionCatalog.cs#LatticeApiMcpRegionCatalog.ResolveTenantScopeAsync"
        },
        {
          "id": "assertion-validates",
          "check": "ITenantContextResolver resolves the current tenant and it equals the asserted tenant.",
          "on_true": "scoped",
          "on_false": "refused",
          "source": "src/lattice.api.mcp/Remote/LatticeApiMcpRegionCatalog.cs#LatticeApiMcpRegionCatalog.ResolveTenantScopeAsync"
        }
      ],
      "terminals": [
        {
          "id": "refused",
          "outcome": "The catalog advertises the current region alone with no tenantScope annotation; the asserted value is never echoed."
        },
        {
          "id": "scoped",
          "outcome": "The catalog advertises the current region plus peers in the tenant allowed-union-resident set, annotated with the validated tenant; standing that cannot be established degrades to the current region alone."
        },
        {
          "id": "unscoped",
          "outcome": "The catalog advertises the full routing topology, subject to region identity verification."
        }
      ],
      "fail_closed": "A tenant-asserted call whose assertion does not validate, or whose standing cannot be established, never falls back to the full routing topology.",
      "sources": [
        "src/lattice.api.mcp/Remote/LatticeApiMcpRegionCatalog.cs#LatticeApiMcpRegionCatalog",
        "src/lattice.api.mcp/Remote/LatticeApiMcpRegionCatalog.cs#LatticeApiMcpRegionCatalog.ResolveTenantScopeAsync"
      ]
    },
    {
      "id": "mcp-telemetry-tool-capability-gate",
      "nodes": [
        {
          "id": "system-origin",
          "check": "LatticeSystemOrigin.IsActive is true.",
          "on_true": "range-guardrails",
          "on_false": "gate-registered",
          "source": "src/lattice.api.telemetry/TelemetryAccessAuthorizer.cs#TelemetryAccessAuthorizer.AuthorizeClusterTelemetryAsync"
        },
        {
          "id": "gate-registered",
          "check": "An ILatticeAccessGate is registered.",
          "on_true": "gate-authorize",
          "on_false": "range-guardrails",
          "source": "src/lattice.api.telemetry/TelemetryAccessAuthorizer.cs#TelemetryAccessAuthorizer.AuthorizeClusterTelemetryAsync"
        },
        {
          "id": "gate-authorize",
          "check": "ILatticeAccessGate.AuthorizeAsync for LatticeOperation.Telemetry on LatticeScope.ClusterWideTreeId returns Allowed.",
          "on_true": "key-filter",
          "on_false": "deny-capability",
          "source": "src/lattice.api.telemetry/TelemetryAccessAuthorizer.cs#TelemetryAccessAuthorizer.AuthorizeClusterTelemetryAsync"
        },
        {
          "id": "key-filter",
          "check": "The allow decision carries a KeyFilter.",
          "on_true": "deny-capability",
          "on_false": "range-guardrails",
          "source": "src/lattice.api.telemetry/TelemetryAccessAuthorizer.cs#TelemetryAccessAuthorizer.AuthorizeClusterTelemetryAsync"
        },
        {
          "id": "range-guardrails",
          "check": "The tool is lattice_telemetry_query_range and TelemetryRangeGuardrails.TryValidateRange rejects the range.",
          "on_true": "deny-range",
          "on_false": "metric-policy",
          "source": "src/lattice.api.mcp.telemetry/TelemetryToolHandlers.cs#TelemetryToolHandlers.QueryRangeAsync"
        },
        {
          "id": "metric-policy",
          "check": "For query, query_range, and metric_metadata, TelemetryMetricAccessPolicy (via TelemetryQueryAuthorizer or IsAdmitted) admits the query or named metric; list_metrics always passes and filters names by IsAdmitted.",
          "on_true": "allow",
          "on_false": "deny-metric",
          "source": "src/lattice.api.mcp.telemetry/TelemetryToolHandlers.cs#TelemetryToolHandlers"
        }
      ],
      "terminals": [
        {
          "id": "allow",
          "outcome": "The backend request is issued; backend failures are returned in the result Error field."
        },
        {
          "id": "deny-capability",
          "outcome": "The result Error field carries the fixed capability-denied message; no backend call is made and no subject id or gate reason is echoed."
        },
        {
          "id": "deny-metric",
          "outcome": "The result Error field carries the metric-access denial message."
        },
        {
          "id": "deny-range",
          "outcome": "The result Error field carries the range guardrail violation message."
        }
      ],
      "fail_closed": "Every telemetry tool checks the cluster-wide Telemetry capability at call time before any backend call; discovery is not relied on. A key-filtered allow is refused. With no access gate registered the capability check admits, matching the authorization-off default.",
      "sources": [
        "src/lattice.api.mcp.telemetry/TelemetryToolHandlers.cs#TelemetryToolHandlers.QueryAsync",
        "src/lattice.api.mcp.telemetry/TelemetryToolHandlers.cs#TelemetryToolHandlers.QueryRangeAsync",
        "src/lattice.api.mcp.telemetry/TelemetryToolHandlers.cs#TelemetryToolHandlers.ListMetricsAsync",
        "src/lattice.api.mcp.telemetry/TelemetryToolHandlers.cs#TelemetryToolHandlers.MetricMetadataAsync",
        "src/lattice.api.telemetry/TelemetryAccessAuthorizer.cs#TelemetryAccessAuthorizer.AuthorizeClusterTelemetryAsync",
        "src/lattice.api.mcp.telemetry/LatticeMcpTelemetryServiceCollectionExtensions.cs#AddTelemetryTools"
      ]
    },
    {
      "id": "membership-providers",
      "nodes": [
        {
          "id": "credential-present",
          "check": "LatticeCredentialContext is active.",
          "on_true": "cache",
          "on_false": "anonymous",
          "source": "src/lattice.membership/MembershipContext.cs"
        },
        {
          "id": "cache",
          "check": "Resolution cache has a fresh subject.",
          "on_true": "return-cached",
          "on_false": "select-authenticator",
          "source": "src/lattice.membership/MembershipContext.cs"
        },
        {
          "id": "select-authenticator",
          "check": "A registered authenticator CanHandle returns true.",
          "on_true": "authenticate",
          "on_false": "anonymous",
          "source": "src/lattice.membership/MembershipContext.cs"
        },
        {
          "id": "authenticate",
          "check": "Authenticator returns a principal.",
          "on_true": "directory-groups",
          "on_false": "anonymous",
          "source": "src/lattice.membership/MembershipContext.cs"
        },
        {
          "id": "directory-groups",
          "check": "Group merge mode requires directory groups.",
          "on_true": "merge-directory",
          "on_false": "map-subject",
          "source": "src/lattice.membership/MembershipContext.cs"
        }
      ],
      "terminals": [
        {
          "id": "anonymous",
          "outcome": "The caller resolves to LatticeSubject.Anonymous."
        },
        {
          "id": "map-subject",
          "outcome": "The principal maps to a LatticeSubject without a directory group merge."
        },
        {
          "id": "merge-directory",
          "outcome": "The principal maps to a LatticeSubject with directory groups merged."
        },
        {
          "id": "return-cached",
          "outcome": "The cached subject is returned."
        }
      ],
      "fail_closed": "No credential, no handler, invalid token, or unmapped principal resolves to LatticeSubject.Anonymous.",
      "sources": [
        "src/lattice.membership/MembershipContext.cs",
        "src/lattice.membership/JwtCredentialAuthenticator.cs",
        "src/lattice.membership.entra/EntraCredentialAuthenticator.cs",
        "src/lattice.membership.entra.graph/EntraGraphIdentityDirectory.cs",
        "src/lattice.membership.oidc/OidcCredentialAuthenticator.cs"
      ]
    },
    {
      "id": "replication-peer-status-authorization",
      "nodes": [
        {
          "id": "service-match",
          "check": "Method starts with the replication peer-status gRPC service prefix.",
          "on_true": "operation-classified",
          "on_false": "allow-unrelated",
          "source": "src/lattice.api.replication.grpc/Security/LatticeReplicationApiGrpcAuthInterceptor.cs#LatticeReplicationApiGrpcAuthInterceptor"
        },
        {
          "id": "operation-classified",
          "check": "The method classifies to LatticeReplicationApiOperation.GetPeerStatus.",
          "on_true": "require-option",
          "on_false": "deny-grpc",
          "source": "src/lattice.api.replication.grpc/Security/LatticeReplicationApiGrpcAuthInterceptor.cs#LatticeReplicationApiGrpcAuthInterceptor.DescribeCall"
        },
        {
          "id": "require-option",
          "check": "LatticeReplicationApiGrpcOptions.RequireAuthorization is true.",
          "on_true": "transport-authorizer",
          "on_false": "service-stamps",
          "source": "src/lattice.api.replication.grpc/Security/LatticeReplicationApiGrpcAuthInterceptor.cs#LatticeReplicationApiGrpcAuthInterceptor"
        },
        {
          "id": "transport-authorizer",
          "check": "ILatticeReplicationApiAuthorizer admits GetPeerStatus and the optional tree-filter target id.",
          "on_true": "service-stamps",
          "on_false": "deny-grpc",
          "source": "src/lattice.api.replication.grpc/Security/LatticeReplicationApiGrpcAuthInterceptor.cs#LatticeReplicationApiGrpcAuthInterceptor"
        },
        {
          "id": "service-stamps",
          "check": "The gRPC service stamps the resolved credential and asserted active tenant, then invokes ILatticeReplicationStatus.GetPeerStatusAsync.",
          "on_true": "tenant",
          "on_false": "deny-grpc",
          "source": "src/lattice.api.replication.grpc/LatticeReplicationStatusGrpcService.cs#LatticeReplicationStatusGrpcService.GetPeerStatus"
        },
        {
          "id": "tenant",
          "check": "The status facade resolves an initialized active tenant.",
          "on_true": "tree-filter",
          "on_false": "deny-tenant",
          "source": "src/lattice.api.replication/LatticeReplicationStatus.cs#LatticeReplicationStatus.EnsureTenantResolvesAsync"
        },
        {
          "id": "tree-filter",
          "check": "The query names a tree filter.",
          "on_true": "filter-authorized",
          "on_false": "read-rows",
          "source": "src/lattice.api.replication/LatticeReplicationStatus.cs#LatticeReplicationStatus.GetPeerStatusAsync"
        },
        {
          "id": "filter-authorized",
          "check": "The replication access check admits Replication over the effective tree filter.",
          "on_true": "read-rows",
          "on_false": "allow-empty",
          "source": "src/lattice.api.replication/LatticeReplicationStatus.cs#LatticeReplicationStatus.GetPeerStatusAsync"
        },
        {
          "id": "read-rows",
          "check": "Every returned row either matches the authorized filter or passes the per-row Replication authorization probe.",
          "on_true": "allow-page",
          "on_false": "skip-row",
          "source": "src/lattice.api.replication/LatticeReplicationStatus.cs#LatticeReplicationStatus.IsVisibleAsync"
        },
        {
          "id": "skip-row",
          "check": "There are more telemetry rows to scan after skipping unauthorized rows.",
          "on_true": "read-rows",
          "on_false": "allow-page",
          "source": "src/lattice.api.replication/LatticeReplicationStatus.cs#LatticeReplicationStatus.GetPeerStatusAsync"
        }
      ],
      "terminals": [
        {
          "id": "allow-empty",
          "outcome": "The facade returns an empty page for an unauthorized tree filter without reading statistics."
        },
        {
          "id": "allow-page",
          "outcome": "The facade returns only authorized peer-status rows and a continuation derived from a returned row."
        },
        {
          "id": "allow-unrelated",
          "outcome": "The interceptor passes the call through unchanged because the method belongs to another service."
        },
        {
          "id": "deny-grpc",
          "outcome": "The gRPC call fails before the status facade is invoked."
        },
        {
          "id": "deny-tenant",
          "outcome": "The call fails closed because the active tenant cannot be resolved or validated."
        }
      ],
      "fail_closed": "Disabling the transport authorizer does not bypass the facade's tenant and per-tree Replication checks; unauthorized tree filters return empty and unauthorized rows are skipped rather than disclosed.",
      "sources": [
        "src/lattice.api.replication.grpc/Security/LatticeReplicationApiGrpcAuthInterceptor.cs#LatticeReplicationApiGrpcAuthInterceptor",
        "src/lattice.api.replication.grpc/LatticeReplicationStatusGrpcService.cs#LatticeReplicationStatusGrpcService",
        "src/lattice.api.replication/LatticeReplicationStatus.cs#LatticeReplicationStatus",
        "src/lattice.api.replication/ReplicationAccessAuthorizer.cs#ReplicationAccessAuthorizer"
      ]
    },
    {
      "id": "state-facade-unfiltered-read-visibility",
      "nodes": [
        {
          "id": "visibility-enabled",
          "check": "LatticeApiStateOptions.ReadVisibility is not Disabled and a real ILatticeAccessGate (not NullLatticeAccessGate) is registered.",
          "on_true": "subject-anonymous",
          "on_false": "serve",
          "source": "src/lattice.api.state/LatticeStateVisibilityFilter.cs#LatticeStateVisibilityFilter.Enabled"
        },
        {
          "id": "subject-anonymous",
          "check": "The resolved caller subject is anonymous.",
          "on_true": "hide",
          "on_false": "target-is-view",
          "source": "src/lattice.api.state/LatticeStateVisibilityFilter.cs#LatticeStateVisibilityFilter.ResolveTreeReadAccessAsync"
        },
        {
          "id": "target-is-view",
          "check": "The effective (tenant-scoped) tree id is a materialised-view tree.",
          "on_true": "view-source-resolved",
          "on_false": "tree-grant-unfiltered",
          "source": "src/lattice.api.state/LatticeStateQuery.cs#LatticeStateQuery.IsUnfilteredTreeReadHiddenAsync"
        },
        {
          "id": "tree-grant-unfiltered",
          "check": "The access gate allows RangeRead on the tree and returns no key filter.",
          "on_true": "serve",
          "on_false": "hide",
          "source": "src/lattice.api.state/LatticeStateVisibilityFilter.cs#LatticeStateVisibilityFilter.ResolveTreeReadAccessAsync"
        },
        {
          "id": "view-source-resolved",
          "check": "The view's source tree resolves from the local IViewCatalog or the durable view registry.",
          "on_true": "source-grant-unfiltered",
          "on_false": "hide",
          "source": "src/lattice.api.state/LatticeStateViewSource.cs#LatticeStateViewSource.ResolveAsync"
        },
        {
          "id": "source-grant-unfiltered",
          "check": "The access gate allows RangeRead on the view's source tree and returns no key filter.",
          "on_true": "serve",
          "on_false": "hide",
          "source": "src/lattice.api.state/LatticeStateViewSource.cs#LatticeStateViewSource.ResolveReadAccessAsync"
        }
      ],
      "terminals": [
        {
          "id": "hide",
          "outcome": "The read is hidden without reading backing data: GetTreeStructure returns TreeNotFound with no roots, GetDeadLetterCount returns 0, ListDeadLetters returns an empty page and ListTagValues returns an empty catalog page."
        },
        {
          "id": "serve",
          "outcome": "The read proceeds to the topology walk, the dead-letter store or the tag catalog."
        }
      ],
      "fail_closed": "An anonymous subject, an unresolvable view source, a denied grant or any partial (key-filtered) grant hides the read; this layer runs inside the facade whatever the gRPC interceptor decided. ListIndexTags applies the same unfiltered test to every covered tree and additionally empties the union when any covered tree is outside the active tenant's enumeration set.",
      "sources": [
        "src/lattice.api.state/LatticeStateQuery.cs#LatticeStateQuery.IsUnfilteredTreeReadHiddenAsync",
        "src/lattice.api.state/LatticeStateQuery.cs#LatticeStateQuery.ListIndexTagsAsync",
        "src/lattice.api.state/LatticeStateVisibilityFilter.cs",
        "src/lattice.api.state/LatticeStateViewSource.cs",
        "docs/lattice.api.state/security.md"
      ]
    },
    {
      "id": "telemetry-facade-capability-gate",
      "nodes": [
        {
          "id": "cluster-wide",
          "check": "TelemetryAccessAuthorizer.AuthorizeClusterTelemetryAsync admits the caller: system origin, no access gate registered, or an unfiltered Allow for LatticeOperation.Telemetry on LatticeScope.ClusterWideTreeId.",
          "on_true": "allow-cluster-wide",
          "on_false": "tenant-resolved",
          "source": "src/lattice.api.telemetry/TelemetryAccessAuthorizer.cs#TelemetryAccessAuthorizer.AuthorizeClusterTelemetryAsync"
        },
        {
          "id": "tenant-resolved",
          "check": "ITenantContextResolver resolves the caller's validated active tenant without refusing it, and that tenant is neither the uninitialised value nor the reserved default tenant.",
          "on_true": "tenant-capability",
          "on_false": "deny",
          "source": "src/lattice.api.telemetry/TelemetryTenantScopeResolver.cs#TelemetryTenantScopeResolver.AuthorizeAsync"
        },
        {
          "id": "tenant-capability",
          "check": "ILatticeAccessGate.AuthorizeAsync for LatticeOperation.Telemetry on that tenant's capability id (LatticeScope.TenantCapability, _lattice_tenant_admin_{tenant}) returns an unfiltered Allow.",
          "on_true": "allow-tenant",
          "on_false": "deny",
          "source": "src/lattice.api.telemetry/TelemetryAccessAuthorizer.cs#TelemetryAccessAuthorizer.AuthorizeTenantTelemetryAsync"
        }
      ],
      "terminals": [
        {
          "id": "allow-cluster-wide",
          "outcome": "A cluster-wide TelemetryAccessGrant: the query is pinned to the caller's active tenant unless a validated platform operator asked to widen it."
        },
        {
          "id": "allow-tenant",
          "outcome": "A tenant-confined TelemetryAccessGrant: every query is pinned to that tenant whatever was requested, a widening request is reported as downgraded, and platform-operator validation is not consulted."
        },
        {
          "id": "deny",
          "outcome": "QueryAsync throws the cluster-wide LatticeAuthorizationDeniedException before any backend call; GetCatalogAsync returns the empty catalogue."
        }
      ],
      "fail_closed": "The tenant capability id is a control-plane namespace, so an unmatched request is denied whatever the data-plane default effect, the all-trees tier never reaches it, and a grant for one tenant never matches another's id. An unattributable caller, the default tenant, a key-filtered allow and a refusal on both scopes all deny with the same cluster-wide refusal. The tenant authorized is the tenant pinned, taken from the resolver and never from a request field. The MCP telemetry tools do not use this path and stay cluster-wide only.",
      "sources": [
        "src/lattice.api.telemetry/TelemetryTenantScopeResolver.cs#TelemetryTenantScopeResolver.AuthorizeAsync",
        "src/lattice.api.telemetry/TelemetryAccessAuthorizer.cs#TelemetryAccessAuthorizer.AuthorizeTenantTelemetryAsync",
        "src/lattice.api.telemetry/TelemetryAccessAuthorizer.cs#TelemetryAccessAuthorizer.AuthorizeClusterTelemetryAsync",
        "src/lattice.api.telemetry/LatticeTelemetry.cs#LatticeTelemetry.QueryAsync",
        "src/lattice.auth/LatticeScope.cs#LatticeScope.TenantCapability"
      ]
    },
    {
      "id": "tenancy-admission",
      "nodes": [
        {
          "id": "rate-limit",
          "check": "Tenant rate limiter accepts the operation.",
          "on_true": "usage-view",
          "on_false": "deny-quota-exceeded",
          "source": "src/lattice.tenancy/LatticeTenantAdmissionController.cs"
        },
        {
          "id": "usage-view",
          "check": "A warm tenant usage view exists.",
          "on_true": "quota-evaluate",
          "on_false": "allow-fail-open-warmup",
          "source": "src/lattice.tenancy/LatticeTenantAdmissionController.cs"
        },
        {
          "id": "quota-evaluate",
          "check": "Quota evaluation admits every bounded dimension.",
          "on_true": "allow",
          "on_false": "deny-quota-exceeded",
          "source": "src/lattice.tenancy/LatticeTenantAdmissionController.cs"
        }
      ],
      "terminals": [
        {
          "id": "allow",
          "outcome": "The request proceeds."
        },
        {
          "id": "allow-fail-open-warmup",
          "outcome": "The operation is admitted because the tenant usage view is not yet warm."
        },
        {
          "id": "deny-quota-exceeded",
          "outcome": "The operation is refused with LatticeQuotaExceededException."
        }
      ],
      "fail_closed": "Quota breaches throw LatticeQuotaExceededException; unknown or not-yet-warm tenants admit until the first sample lands.",
      "sources": [
        "src/lattice.tenancy/LatticeTenantAdmissionController.cs",
        "src/lattice.tenancy/TenantQuotaEvaluator.cs"
      ]
    },
    {
      "id": "tenant-enumeration-filter",
      "nodes": [
        {
          "id": "owner",
          "check": "Tree owner is platform-owned or equals active tenant.",
          "on_true": "include",
          "on_false": "exclude",
          "source": "src/lattice.tenancy/TenantEnumerationFilter.cs"
        }
      ],
      "terminals": [
        {
          "id": "exclude",
          "outcome": "The tree id is excluded from the enumeration."
        },
        {
          "id": "include",
          "outcome": "The tree id is included in the enumeration."
        }
      ],
      "fail_closed": "An uninitialized tenant owns no tenant trees and observes only platform-owned ids.",
      "sources": [
        "src/lattice.tenancy/TenantEnumerationFilter.cs"
      ]
    },
    {
      "id": "tenant-region-visibility",
      "nodes": [
        {
          "id": "tenant-present",
          "check": "Tenant id is initialized.",
          "on_true": "registry-read",
          "on_false": "unresolved",
          "source": "src/lattice.tenancy/TenantRegionVisibilityResolver.cs"
        },
        {
          "id": "registry-read",
          "check": "Registry read succeeds and tenant record exists.",
          "on_true": "project-map",
          "on_false": "unresolved",
          "source": "src/lattice.tenancy/TenantRegionVisibilityResolver.cs"
        }
      ],
      "terminals": [
        {
          "id": "project-map",
          "outcome": "The tenant region visibility map is projected from the registry record."
        },
        {
          "id": "unresolved",
          "outcome": "Visibility resolves to Unresolved and every region lookup misses."
        }
      ],
      "fail_closed": "Unknown standing resolves to Unresolved rather than a permissive topology.",
      "sources": [
        "src/lattice.tenancy/TenantRegionVisibilityResolver.cs"
      ]
    }
  ]
}
