{"record":{"id":"1f891143c776a7c4","repo":"Fission-AI/OpenSpec","slug":"the-change-specs-changed-while-archive-was-awaitin","errorCode":null,"errorMessage":"The change specs changed while archive was awaiting confirmation.","messagePattern":"The change specs changed while archive was awaiting confirmation\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/core/archive.ts","lineNumber":1531,"sourceCode":"          // The confirmation may stay open while another editor changes a main\n          // spec. Never apply the proposal built before the prompt to a newer\n          // baseline: in particular, a stale retirement decision must not\n          // delete a requirement added while the prompt was waiting.\n          if (prepareError === undefined) {\n            try {\n              const currentRetirementMarker = readRetireCapabilitiesMarker(changeDir);\n              if (\n                currentRetirementMarker.declared !== retirementMarker.declared ||\n                currentRetirementMarker.invalidReason !== retirementMarker.invalidReason\n              ) {\n                throw new Error(\n                  `The ${METADATA_FILENAME} retirement authorization changed while archive was awaiting confirmation.`\n                );\n              }\n              const currentUpdates = await findSpecUpdates(changeDir, mainSpecsDir);\n              const currentById = new Map(currentUpdates.map((update) => [update.id, update]));\n              if (currentUpdates.length !== prepared.length) {\n                throw new Error('The change specs changed while archive was awaiting confirmation.');\n              }\n              for (const proposed of prepared) {\n                const current = currentById.get(proposed.update.id);\n                if (!current) {\n                  throw new Error(\n                    `The delta for '${proposed.update.id}' changed while archive was awaiting confirmation.`\n                  );\n                }\n                if (\n                  (await fingerprintPath(current.source)) !== proposed.sourceFingerprint ||\n                  (await fingerprintPath(current.target)) !== proposed.targetFingerprint\n                ) {\n                  throw new Error(\n                    `Spec inputs for '${proposed.update.id}' changed while archive was awaiting confirmation. ` +\n                      'No files were changed; review the new content and rerun.'\n                  );\n                }\n                const rebuilt = await buildUpdatedSpec(current, changeName!, { silent: true });","sourceCodeStart":1513,"sourceCodeEnd":1549,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/archive.ts#L1513-L1549","documentation":"Thrown after the confirmation prompt when the set of spec updates recomputed from the change directory differs in size from the set prepared before the prompt. Means the change's delta files themselves changed (added or removed spec deltas) while waiting for confirmation, so the pre-prompt proposal no longer matches the change's actual content and must not be applied.","triggerScenarios":"Thrown at src/core/archive.ts:1531 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run the archive after the change specs stabilize","Review the deltas that changed and confirm they are intentional"],"exampleFix":null,"handlingStrategy":"validation","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"}