{"record":{"id":"af2a24861a7e4c71","repo":"deepseek-ai/deepseek-harness","slug":"movefileexw-code-win32-win32code-path","errorCode":null,"errorMessage":"MoveFileExW ${code} (Win32 ${win32Code}): ${path} -> ${dest}","messagePattern":"MoveFileExW (.+?) \\(Win32 (.+?)\\): (.+?) -> (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/session/session-persistence-jsonl/src/win32.ts","lineNumber":119,"sourceCode":"    error.path = path\n    throw error\n  } catch (error) {\n    if (isENOENT(error)) return false\n    throw error\n  }\n}\n\n/**\n * Publish `existing` at `replacement` with Windows write-through rename\n * semantics. The destination must not already exist; the move must stay within\n * the volume (no copy fallback flag is set).\n * @param existing - the synced staging path to move.\n * @param replacement - the final path, which must not already exist.\n */\nexport async function publishNewFileWin32(existing: string, replacement: string): Promise<void> {\n  const api = await win32()\n  const ok = api.moveFileExW(toNamespacedPath(existing), toNamespacedPath(replacement), MOVEFILE_WRITE_THROUGH)\n  if (ok === 0) throw win32Error('MoveFileExW', api.getLastError(), existing, replacement)\n}\n\n/**\n * Create `target` and its missing ancestors with durable Windows namespace\n * publication. Each missing directory is first created as a random staging\n * sibling, then moved to its final name with `MOVEFILE_WRITE_THROUGH`; races\n * with another creator are accepted only after verifying the winner is a\n * directory.\n * @param target - the absolute directory path to create durably when absent.\n */\nexport async function ensureDurableDirectoryWin32(target: string): Promise<void> {\n  const absolute = resolve(target)\n  const root = parse(absolute).root\n  await assertDirectory(root)\n\n  const segments = absolute.slice(root.length).split(/[\\\\/]+/).filter(part => part.length > 0)\n  let current = root\n  for (const segment of segments) {","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/session/session-persistence-jsonl/src/win32.ts#L101-L137","documentation":"Error \"MoveFileExW ${code} (Win32 ${win32Code}): ${path} -> ${dest}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/session/session-persistence-jsonl/src/win32.ts:119 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Close handles to source and destination; check the Win32 error code and retry the move."],"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"}