Fission-AI/OpenSpec · error · Error
${copyError instanceof Error ? copyError.message : String(co
Error message
${copyError instanceof Error ? copyError.message : String(copyError)} Could not restore the staged source at ${stagedSource} (${restoreError instanceof Error ? restoreError.message : String(restoreError)}). What it means
Error "${copyError instanceof Error ? copyError.message : String(copyError)} 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:523
);
}
let destIsOurs = false;
let stagedFingerprint: string;
try {
stagedFingerprint = await fingerprintDirectoryContents(stagedSource);
await fs.mkdir(dest, { mode: 0o700 });
destIsOurs = true;
await copyDirContents(stagedSource, dest);
await options.verifyCopiedDestination?.(stagedSource);
await assertCopiedDirectoryUnchanged(stagedSource, dest, stagedFingerprint);
} catch (copyError) {
if (destIsOurs) {
await fs.rm(dest, { recursive: true, force: true }).catch(() => undefined);
}
try {
await fs.rename(stagedSource, src);
} catch (restoreError) {
throw new Error(
`${copyError instanceof Error ? copyError.message : String(copyError)} ` +
`Could not restore the staged source at ${stagedSource} ` +
`(${restoreError instanceof Error ? restoreError.message : String(restoreError)}).`
);
}
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);View on GitHub (pinned to 6926ccb18a)
When it happens
Trigger: Thrown at src/core/archive.ts:523 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/d7a4a6a434011fe1.
Report an issue: GitHub.