{"record":{"id":"5ce07c061b7d52b6","repo":"deepseek-ai/deepseek-harness","slug":"replacefilew-code-win32-win32code-path","errorCode":null,"errorMessage":"ReplaceFileW ${code} (Win32 ${win32Code}): ${path}","messagePattern":"ReplaceFileW (.+?) \\(Win32 (.+?)\\): (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/fs/fs-local/src/win32.ts","lineNumber":132,"sourceCode":"  }\n}\n\n/**\n * Replace a Windows file while preserving the replaced file's ACL and other replace metadata.\n * @param replaced - existing destination file.\n * @param replacement - closed staging file on the same volume.\n */\nexport async function replaceFileWin32(replaced: string, replacement: string): Promise<void> {\n  const api = await win32()\n  if (api.replaceFileW(\n    toNamespacedPath(replaced),\n    toNamespacedPath(replacement),\n    null,\n    0,\n    null,\n    null,\n  ) === 0) {\n    throw win32Error('ReplaceFileW', api.getLastError(), replaced)\n  }\n}\n","sourceCodeStart":114,"sourceCodeEnd":135,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/fs/fs-local/src/win32.ts#L114-L135","documentation":"Error \"ReplaceFileW ${code} (Win32 ${win32Code}): ${path}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/fs/fs-local/src/win32.ts:132 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Close handles to the target file and retry; check the Win32 error code for sharing or access violations."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}