{"record":{"id":"0f8c7a600a076272","repo":"Fission-AI/OpenSpec","slug":"original-rollback-also-failed-rollbackerrors","errorCode":null,"errorMessage":"${original} Rollback also failed: ${rollbackErrors.map(({ message }) => message).join(' ')}","messagePattern":"(.+?) Rollback also failed: (.+?)\\) => message\\)\\.join\\(' '\\)\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/core/archive.ts","lineNumber":2017,"sourceCode":"                  ? rollbackError\n                  : new Error(String(rollbackError))\n              );\n            }\n            if (changeArchived) {\n              try {\n                await moveDirectory(archivePath, changeDir);\n                changeArchived = false;\n              } catch (rollbackError) {\n                rollbackErrors.push(\n                  rollbackError instanceof Error\n                    ? rollbackError\n                    : new Error(String(rollbackError))\n                );\n              }\n            }\n            if (rollbackErrors.length > 0) {\n              const original = error instanceof Error ? error.message : String(error);\n              throw new Error(\n                `${original} Rollback also failed: ${rollbackErrors.map(({ message }) => message).join(' ')}`\n              );\n            }\n            throw error;\n          }\n        }\n      }\n    }\n\n      // The destination was checked before the merge, so anything claiming it now\n    // appeared while we were working. Report that as the collision it is: a raw\n    // ENOTEMPTY from rename would otherwise degrade to a bare `archive_error`.\n      if (!changeArchived) {\n        await assertArchiveDestinationAvailable(archivePath, archiveName);\n        archiveClaim = await claimArchiveDestination(archivePath, archiveName);\n        await assertArchiveDestinationAvailable(archivePath, archiveName);\n\n        // Create archive directory if needed","sourceCodeStart":1999,"sourceCodeEnd":2035,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/archive.ts#L1999-L2035","documentation":"Aggregated failure message for archive rollback: one or more rollback steps (restoring snapshots, moving the archived directory back to the change dir) failed, and the collected rollback error messages are joined onto the original failure. Signals the workspace may be left in a partially archived state requiring manual recovery.","triggerScenarios":"Thrown at src/core/archive.ts:2017 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect each rollback error to see which restores failed","Manually restore from the retained backups/archived copy as guided by the messages"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6926ccb18afa4ff621112813e9968334576ee11a","analyzedAt":"2026-08-25T12:29:45.729Z","contentChangedAt":"2026-08-25T12:29:45.729Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}