{"record":{"id":"0a71c9d9a077ea7d","repo":"warpdotdev/warp","slug":"ambiguous-wrapper","errorCode":"ambiguous_wrapper","errorMessage":"ambiguous_wrapper","messagePattern":"ambiguous_wrapper","errorType":"exception","errorClass":"MergeError","httpStatus":null,"severity":"error","filePath":"resources/bundled/skills/tui-migrate-setup/scripts/merge_mcp_config.py","lineNumber":154,"sourceCode":"        document = json.loads(raw.decode(\"utf-8\"))\n    except (UnicodeError, json.JSONDecodeError) as error:\n        raise MergeError(\"invalid_json\") from error\n    if not isinstance(document, dict):\n        raise MergeError(\"invalid_config_shape\")\n    return document\n\n\ndef _detect_wrapper(document: dict[str, Any]) -> tuple[tuple[str, ...], dict[str, Any]]:\n    matches: list[tuple[tuple[str, ...], dict[str, Any]]] = []\n    for wrapper_path in WRAPPER_PATHS:\n        value = _path_value(document, wrapper_path)\n        if value is not None:\n            if not isinstance(value, dict):\n                raise MergeError(\"invalid_wrapper_shape\")\n            matches.append((wrapper_path, value))\n\n    if len(matches) > 1:\n        raise MergeError(\"ambiguous_wrapper\")\n    if matches:\n        return matches[0]\n\n    # Warp accepts an unwrapped map. Require object-valued entries so unrelated\n    # application JSON does not silently become an MCP config.\n    if all(isinstance(value, dict) for value in document.values()):\n        return (), document\n    raise MergeError(\"unrecognized_wrapper\")\n\n\ndef load_config(path: Path) -> ParsedConfig:\n    raw, mode = _read_regular_file(path, missing_ok=True)\n    exists = mode is not None\n    if not exists:\n        return ParsedConfig(\n            document={},\n            servers={},\n            wrapper_path=(\"mcpServers\",),","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/warpdotdev/warp/blob/e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc/resources/bundled/skills/tui-migrate-setup/scripts/merge_mcp_config.py#L136-L172","documentation":"Error \"ambiguous_wrapper\" thrown in warpdotdev/warp.","triggerScenarios":"Thrown at resources/bundled/skills/tui-migrate-setup/scripts/merge_mcp_config.py:154 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc","analyzedAt":"2026-08-16T08:27:25.381Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}