Fission-AI/OpenSpec · error · Error
Archive rollback would overwrite a concurrent change at ${sn
Error message
Archive rollback would overwrite a concurrent change at ${snapshot.target}. What it means
Error "Archive rollback would overwrite a concurrent change at ${snapshot.target}." thrown in Fission-AI/OpenSpec.
Source
Thrown at src/core/archive.ts:937
snapshot.displacedPath = undefined;
continue;
}
try {
const current = await fs.lstat(snapshot.target);
const unchangedSymlink =
snapshot.symlink !== undefined &&
current.isSymbolicLink() &&
(await fs.readlink(snapshot.target)) === snapshot.symlink;
// Re-read to confirm the target still holds the snapshot content; a
// mismatch means a concurrent edit, and rollback throws below rather
// than overwrite it (CodeQL js/file-system-race is intentional here).
const unchangedFile =
snapshot.symlink === undefined &&
snapshot.content !== undefined &&
current.isFile() &&
(await fs.readFile(snapshot.target)).equals(snapshot.content);
if (unchangedSymlink || unchangedFile) continue;
throw new Error(
`Archive rollback would overwrite a concurrent change at ${snapshot.target}.`
);
} catch (error) {
if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error;
}
} else {
let current;
try {
current = await fs.lstat(snapshot.target);
} catch (error) {
if (
(error as NodeJS.ErrnoException).code === 'ENOENT' &&
!snapshot.existed
) {
continue;
}
throw error;
}View on GitHub (pinned to 6926ccb18a)
When it happens
Trigger: Thrown at src/core/archive.ts:937 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/5cf43abdb78da5b0.
Report an issue: GitHub.