{"record":{"id":"914a4d067be7eddd","repo":"Fission-AI/OpenSpec","slug":"change-directory-contents-changed-during-the-fallb","errorCode":null,"errorMessage":"Change directory contents changed during the fallback copy from ${stagedSource} to ${destination}.","messagePattern":"Change directory contents changed during the fallback copy from (.+?) to (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/core/archive.ts","lineNumber":461,"sourceCode":"    }\n  };\n\n  await visit(root, '');\n  return hash.digest('hex');\n}\n\nasync function assertCopiedDirectoryUnchanged(\n  stagedSource: string,\n  destination: string,\n  expectedFingerprint: string\n): Promise<void> {\n  const sourceFingerprint = await fingerprintDirectoryContents(stagedSource);\n  const destinationFingerprint = await fingerprintDirectoryContents(destination);\n  if (\n    sourceFingerprint !== expectedFingerprint ||\n    destinationFingerprint !== expectedFingerprint\n  ) {\n    throw new Error(\n      `Change directory contents changed during the fallback copy from ${stagedSource} to ${destination}.`\n    );\n  }\n}\n\n/**\n * Move a directory from src to dest. On Windows, fs.rename() can fail with\n * EPERM, and cross-device moves fail with EXDEV. When the source can first be\n * renamed to a private sibling, fall back to a verified copy-then-remove. A\n * source that cannot be staged is left untouched rather than copied and deleted\n * through a path another process may still be editing.\n */\nclass MoveDestinationRetainedError extends Error {}\nclass RetirementBackupsRetainedError extends Error {}\n\nasync function moveDirectory(\n  src: string,\n  dest: string,","sourceCodeStart":443,"sourceCodeEnd":479,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/archive.ts#L443-L479","documentation":"Error \"Change directory contents changed during the fallback copy from ${stagedSource} to ${destination}.\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/archive.ts:461 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":"6926ccb18afa4ff621112813e9968334576ee11a","analyzedAt":"2026-08-25T12:29:45.729Z","schemaVersion":2},"datasetVersion":"2026-08-25T16:17:27.014Z"}