Fission-AI/OpenSpec · error · Error

Path changed while archive was reading ${entryPath}.

Error message

Path changed while archive was reading ${entryPath}.

What it means

Error "Path changed while archive was reading ${entryPath}." thrown in Fission-AI/OpenSpec.

Source

Thrown at src/core/archive.ts:420

    updateHashField('directory-mode', (before.mode & 0o7777n).toString());
    const entries = (await fs.readdir(dir, { withFileTypes: true })).sort((a, b) =>
      a.name < b.name ? -1 : a.name > b.name ? 1 : 0
    );

    for (const entry of entries) {
      const entryPath = path.join(dir, entry.name);
      const relativePath = path.join(relativeDir, entry.name);
      const stat = await fs.lstat(entryPath, { bigint: true });
      updateHashField('path', relativePath);

      if (stat.isDirectory()) {
        updateHashField('type', 'directory');
        await visit(entryPath, relativePath);
      } else if (stat.isSymbolicLink()) {
        const target = await fs.readlink(entryPath);
        const after = await fs.lstat(entryPath, { bigint: true });
        if (statIdentity(stat) !== statIdentity(after)) {
          throw new Error(`Path changed while archive was reading ${entryPath}.`);
        }
        updateHashField('type', 'symlink');
        updateHashField('target', target);
      } else if (stat.isFile()) {
        const contentFingerprint = await fingerprintFile(entryPath);
        const after = await fs.lstat(entryPath, { bigint: true });
        if (statIdentity(stat) !== statIdentity(after)) {
          throw new Error(`Path changed while archive was reading ${entryPath}.`);
        }
        updateHashField('type', 'file');
        updateHashField('mode', (stat.mode & 0o7777n).toString());
        updateHashField('content-sha256', contentFingerprint);
      } else {
        updateHashField('type', 'other');
        updateHashField('mode', stat.mode.toString());
        updateHashField('size', stat.size.toString());
      }
    }

View on GitHub (pinned to 6926ccb18a)

When it happens

Trigger: Thrown at src/core/archive.ts:420 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25). Data as JSON: /api/errors/16c0cb77474a2def. Report an issue: GitHub.