{"record":{"id":"62fb5795f66d5b07","repo":"Fission-AI/OpenSpec","slug":"path-changed-while-archive-was-reading-filepath","errorCode":null,"errorMessage":"Path changed while archive was reading ${filePath}.","messagePattern":"Path changed while archive was reading (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/core/archive.ts","lineNumber":712,"sourceCode":"\nasync function fingerprintPath(filePath: string): Promise<string> {\n  try {\n    const stat = await fs.lstat(filePath, { bigint: true });\n    const digest = async (): Promise<string> =>\n      createHash('sha256').update(await fs.readFile(filePath)).digest('hex');\n    if (stat.isSymbolicLink()) {\n      const link = await fs.readlink(filePath);\n      try {\n        const referentBefore = await fs.stat(filePath, { bigint: true });\n        const hash = await digest();\n        const referentAfter = await fs.stat(filePath, { bigint: true });\n        const entryAfter = await fs.lstat(filePath, { bigint: true });\n        if (\n          statIdentity(stat) !== statIdentity(entryAfter) ||\n          statIdentity(referentBefore) !== statIdentity(referentAfter) ||\n          link !== (await fs.readlink(filePath))\n        ) {\n          throw new Error(`Path changed while archive was reading ${filePath}.`);\n        }\n        return `symlink:${statIdentity(stat)}:${link}:${statIdentity(referentAfter)}:${hash}`;\n      } catch (error) {\n        if ((error as NodeJS.ErrnoException).code === 'ENOENT') {\n          return `symlink:${statIdentity(stat)}:${link}:missing`;\n        }\n        throw error;\n      }\n    }\n    if (stat.isFile()) {\n      const hash = await digest();\n      const after = await fs.lstat(filePath, { bigint: true });\n      if (statIdentity(stat) !== statIdentity(after)) {\n        throw new Error(`Path changed while archive was reading ${filePath}.`);\n      }\n      return `file:${statIdentity(after)}:${hash}`;\n    }\n    return `other:${statIdentity(stat)}`;","sourceCodeStart":694,"sourceCodeEnd":730,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/archive.ts#L694-L730","documentation":"Error \"Path changed while archive was reading ${filePath}.\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/archive.ts:712 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"}