Fission-AI/OpenSpec · error · Error

${verificationError instanceof Error ? verificationError.mes

Error message

${verificationError instanceof Error ? verificationError.message : String(verificationError)} Could not restore the staged source at ${stagedSource} (${restoreError instanceof Error ? restoreError.message : String(restoreError)}).

What it means

Error "${verificationError instanceof Error ? verificationError.message : String(verificationError)} Could not restore the staged source at ${stagedSource} (${restoreError instanceof Error ? restoreError.message : String(restoreError)})." thrown in Fission-AI/OpenSpec.

Source

Thrown at src/core/archive.ts:545

          );
        }
        if ((copyError as NodeJS.ErrnoException).code === 'EEXIST') {
          throw new ArchiveBlockedError(
            'archive_target_exists',
            `Archive '${path.basename(dest)}' already exists.`
          );
        }
        throw copyError;
      }
      try {
        await options.verifyCopiedDestination?.(stagedSource);
        await assertCopiedDirectoryUnchanged(stagedSource, dest, stagedFingerprint);
      } catch (verificationError) {
        await fs.rm(dest, { recursive: true, force: true }).catch(() => undefined);
        try {
          await fs.rename(stagedSource, src);
        } catch (restoreError) {
          throw new Error(
            `${verificationError instanceof Error ? verificationError.message : String(verificationError)} ` +
              `Could not restore the staged source at ${stagedSource} ` +
              `(${restoreError instanceof Error ? restoreError.message : String(restoreError)}).`
          );
        }
        throw verificationError;
      }
      try {
        await fs.rm(stagedSource, { recursive: true, force: true });
      } catch (cleanupError) {
        // Recursive removal may already have deleted part of the source. The
        // destination is now the only complete copy, so never erase it while
        // trying to make this failed move look atomic.
        throw new MoveDestinationRetainedError(
          `Copied ${src} to ${dest}, but could not remove the staged source at ` +
            `${stagedSource} completely ` +
            `(${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}). ` +
            'The complete destination was retained for recovery.'

View on GitHub (pinned to 6926ccb18a)

When it happens

Trigger: Thrown at src/core/archive.ts:545 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/d802e4ee4be752ba. Report an issue: GitHub.