{"record":{"id":"95f9c5680af23d5f","repo":"warpdotdev/warp","slug":"atomic-write-failed","errorCode":"atomic_write_failed","errorMessage":"atomic_write_failed","messagePattern":"atomic_write_failed","errorType":"exception","errorClass":"MergeError","httpStatus":null,"severity":"error","filePath":"resources/bundled/skills/tui-migrate-setup/scripts/merge_mcp_config.py","lineNumber":467,"sourceCode":"        if destination_config.exists:\n            backup = _backup_path(destination)\n            _write_restricted_file(backup, destination_config.raw, exclusive=True)\n            backup_created = True\n\n        os.replace(stage_path, destination)\n        stage_path = None\n        os.chmod(destination, 0o600, follow_symlinks=False)\n        if hasattr(os, \"O_DIRECTORY\"):\n            directory_fd = os.open(destination.parent, os.O_RDONLY | os.O_DIRECTORY)\n            try:\n                os.fsync(directory_fd)\n            finally:\n                os.close(directory_fd)\n        return backup_created\n    except MergeError:\n        raise\n    except OSError as error:\n        raise MergeError(\"atomic_write_failed\") from error\n    finally:\n        if stage_descriptor is not None:\n            os.close(stage_descriptor)\n        if stage_path is not None:\n            try:\n                stage_path.unlink()\n            except FileNotFoundError:\n                pass\n            except OSError:\n                pass\n\n\ndef _summary(\n    plan: MergePlan, *, status: str, backup_created: bool = False\n) -> dict[str, Any]:\n    return {\n        \"status\": status,\n        \"fingerprint\": plan.fingerprint,","sourceCodeStart":449,"sourceCodeEnd":485,"githubUrl":"https://github.com/warpdotdev/warp/blob/e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc/resources/bundled/skills/tui-migrate-setup/scripts/merge_mcp_config.py#L449-L485","documentation":"Error \"atomic_write_failed\" thrown in warpdotdev/warp.","triggerScenarios":"Thrown at resources/bundled/skills/tui-migrate-setup/scripts/merge_mcp_config.py:467 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"}