{"record":{"id":"7fb8370d17c00cc4","repo":"Fission-AI/OpenSpec","slug":"main-spec-p-update-id-changed-while-archive-w","errorCode":null,"errorMessage":"Main spec '${p.update.id}' changed while archive was securing it for retirement.","messagePattern":"Main spec '(.+?)' changed while archive was securing it for retirement\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/core/archive.ts","lineNumber":1803,"sourceCode":"                    (await fingerprintSpecInputs(p.update)) !==\n                    `${p.sourceFingerprint}\\n${p.targetFingerprint}`\n                  ) {\n                    throw new Error(\n                      `Spec inputs for '${p.update.id}' changed before archive could retire them.`\n                    );\n                  }\n                  mutationAttempts.add(p.update.target);\n                },\n                verifyDisplaced: async (displacedPath) => {\n                  await assertRetirementAuthorization(\n                    changeDir,\n                    retirementAuthorizationFingerprint!\n                  );\n                  if (\n                    (await fingerprintMovablePath(displacedPath)) !==\n                    p.targetMovableFingerprint\n                  ) {\n                    throw new Error(\n                      `Main spec '${p.update.id}' changed while archive was securing it for retirement.`\n                    );\n                  }\n                },\n                ...(isStoreSelectedRoot(root) ? { displayPath: p.update.target } : {}),\n              }\n            );\n            if (!retired) continue;\n            const retirementSnapshot = specSnapshotsByTarget.get(p.update.target);\n            if (retirementSnapshot === undefined || displacedPath === undefined) {\n              throw new Error(\n                `Could not track the displaced main spec for '${p.update.id}' during retirement.`\n              );\n            }\n            retirementSnapshot.displacedPath = displacedPath;\n            retirementSnapshot.displacedFingerprint = p.targetMovableFingerprint;\n            wroteAny = true;\n            // A rename applied on the way to the retirement still happened;","sourceCodeStart":1785,"sourceCodeEnd":1821,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/archive.ts#L1785-L1821","documentation":"Error \"Main spec '${p.update.id}' changed while archive was securing it for retirement.\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/archive.ts:1803 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6926ccb18afa4ff621112813e9968334576ee11a","analyzedAt":"2026-08-25T12:29:45.729Z","schemaVersion":2},"datasetVersion":"2026-08-25T16:17:27.014Z"}