{"record":{"id":"16c0cb77474a2def","repo":"Fission-AI/OpenSpec","slug":"path-changed-while-archive-was-reading-entrypath","errorCode":null,"errorMessage":"Path changed while archive was reading ${entryPath}.","messagePattern":"Path changed while archive was reading (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/core/archive.ts","lineNumber":420,"sourceCode":"    updateHashField('directory-mode', (before.mode & 0o7777n).toString());\n    const entries = (await fs.readdir(dir, { withFileTypes: true })).sort((a, b) =>\n      a.name < b.name ? -1 : a.name > b.name ? 1 : 0\n    );\n\n    for (const entry of entries) {\n      const entryPath = path.join(dir, entry.name);\n      const relativePath = path.join(relativeDir, entry.name);\n      const stat = await fs.lstat(entryPath, { bigint: true });\n      updateHashField('path', relativePath);\n\n      if (stat.isDirectory()) {\n        updateHashField('type', 'directory');\n        await visit(entryPath, relativePath);\n      } else if (stat.isSymbolicLink()) {\n        const target = await fs.readlink(entryPath);\n        const after = await fs.lstat(entryPath, { bigint: true });\n        if (statIdentity(stat) !== statIdentity(after)) {\n          throw new Error(`Path changed while archive was reading ${entryPath}.`);\n        }\n        updateHashField('type', 'symlink');\n        updateHashField('target', target);\n      } else if (stat.isFile()) {\n        const contentFingerprint = await fingerprintFile(entryPath);\n        const after = await fs.lstat(entryPath, { bigint: true });\n        if (statIdentity(stat) !== statIdentity(after)) {\n          throw new Error(`Path changed while archive was reading ${entryPath}.`);\n        }\n        updateHashField('type', 'file');\n        updateHashField('mode', (stat.mode & 0o7777n).toString());\n        updateHashField('content-sha256', contentFingerprint);\n      } else {\n        updateHashField('type', 'other');\n        updateHashField('mode', stat.mode.toString());\n        updateHashField('size', stat.size.toString());\n      }\n    }","sourceCodeStart":402,"sourceCodeEnd":438,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/archive.ts#L402-L438","documentation":"Error \"Path changed while archive was reading ${entryPath}.\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/archive.ts:420 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"}