{"record":{"id":"3373129868db6620","repo":"oraios/serena","slug":"unsupported-luau-roblox-security-level-security","errorCode":null,"errorMessage":"Unsupported Luau Roblox security level: {security_level}. Expected one of: {', '.join(sorted(SUPPORTED_ROBLOX_SECURITY_LEVELS))}","messagePattern":"Unsupported Luau Roblox security level: (.+?)\\. Expected one of: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/luau_lsp.py","lineNumber":252,"sourceCode":"                    \"Please build from source: https://github.com/JohnnyMorganz/luau-lsp\"\n                )\n            if system == \"Darwin\":\n                return \"luau-lsp-macos.zip\"\n            if system == \"Windows\":\n                return \"luau-lsp-win64.zip\"\n            raise RuntimeError(f\"Unsupported operating system: {system}\")\n\n    @staticmethod\n    def _get_platform_type(custom_settings: SolidLSPSettings.CustomLSSettings) -> str:\n        platform_type = custom_settings.get(\"platform\", \"roblox\")\n        if platform_type not in SUPPORTED_PLATFORMS:\n            raise ValueError(f\"Unsupported Luau platform: {platform_type}. Expected one of: {', '.join(sorted(SUPPORTED_PLATFORMS))}\")\n        return platform_type\n\n    @staticmethod\n    def _get_roblox_security_level(custom_settings: SolidLSPSettings.CustomLSSettings) -> str:\n        security_level = custom_settings.get(\"roblox_security_level\", \"PluginSecurity\")\n        if security_level not in SUPPORTED_ROBLOX_SECURITY_LEVELS:\n            raise ValueError(\n                f\"Unsupported Luau Roblox security level: {security_level}. \"\n                f\"Expected one of: {', '.join(sorted(SUPPORTED_ROBLOX_SECURITY_LEVELS))}\"\n            )\n        return security_level\n\n    @classmethod\n    def _get_workspace_configuration(cls, custom_settings: SolidLSPSettings.CustomLSSettings) -> dict[str, dict[str, str]]:\n        return {\"platform\": {\"type\": cls._get_platform_type(custom_settings)}}\n\n    def _create_dependency_provider(self) -> LanguageServerDependencyProvider:\n        return self.DependencyProvider(self._custom_settings, self._ls_resources_dir)\n\n    def __init__(self, config: LanguageServerConfig, repository_root_path: str, solidlsp_settings: SolidLSPSettings):\n        super().__init__(config, repository_root_path, None, \"luau\", solidlsp_settings)\n        self.server_ready = threading.Event()\n\n    def _create_base_initialize_params(self) -> dict:","sourceCodeStart":234,"sourceCodeEnd":270,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/luau_lsp.py#L234-L270","documentation":"luau_lsp validates the 'roblox_security_level' custom setting against SUPPORTED_ROBLOX_SECURITY_LEVELS when resolving support files. The security level is passed to the Roblox API type definitions, so an unknown level would produce an invalid server configuration; hence a ValueError is raised with the list of accepted levels.","triggerScenarios":"Setting CustomLSSettings for luau_lsp with roblox_security_level set to a value not in SUPPORTED_ROBLOX_SECURITY_LEVELS (e.g. 'Maximum', 'LocalSecurity', a misspelled 'Pluginsecurity') — the check runs in _get_roblox_security_level called from _resolve_support_files.","commonSituations":"Guessing security level names instead of using the Roblox API security level enum values; casing mistakes; copying a value from Roblox docs that does not match the exact expected constant.","solutions":["Check SUPPORTED_ROBLOX_SECURITY_LEVELS in src/solidlsp/language_servers/luau_lsp.py for exact values","Set roblox_security_level to a valid level (default 'PluginSecurity')","Remove the roblox_security_level key to use the default"],"exampleFix":"// before\n{\"luau_lsp\": {\"roblox_security_level\": \"Maximum\"}}\n// after\n{\"luau_lsp\": {\"roblox_security_level\": \"PluginSecurity\"}}","handlingStrategy":"validation","validationCode":"SUPPORTED_ROBLOX_SECURITY_LEVELS = {\"PluginSecurity\"}  # check luau_lsp.py for exact set\nlevel = settings.get(\"roblox_security_level\", \"PluginSecurity\")\nif level not in SUPPORTED_ROBLOX_SECURITY_LEVELS:\n    raise ValueError(f\"roblox_security_level must be one of {sorted(SUPPORTED_ROBLOX_SECURITY_LEVELS)}\")","typeGuard":"def is_valid_security_level(v) -> bool:\n    return isinstance(v, str) and v in SUPPORTED_ROBLOX_SECURITY_LEVELS","tryCatchPattern":"try:\n    ls = SolidLSP(\"luau\")\nexcept ValueError as e:\n    if \"security level\" in str(e):\n        logger.error(\"Fix custom_settings['roblox_security_level']: %s\", e)\n    raise","preventionTips":["Use the exact Roblox security level constants (default 'PluginSecurity')","Watch string casing — 'Pluginsecurity' will fail","Keep Luau settings minimal and rely on defaults unless needed"],"tags":["luau","roblox","configuration","validation"],"backgroundTag":"invalid-config-value","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}