{"record":{"id":"17acfc4e0f8ed1ae","repo":"Fission-AI/OpenSpec","slug":"spec-updates-for-existing-and-mutation-upd","errorCode":null,"errorMessage":"Spec updates for '${existing}' and '${mutation.update.id}' resolve to the same target ${identity}. Replace the capability alias or combine the deltas before archiving.","messagePattern":"Spec updates for '(.+?)' and '(.+?)' resolve to the same target (.+?)\\. Replace the capability alias or combine the deltas before archiving\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/core/archive.ts","lineNumber":839,"sourceCode":"    const stat = await fs.stat(mutation.update.target, { bigint: true });\n    return `${stat.dev}:${stat.ino}`;\n  } catch (error) {\n    if ((error as NodeJS.ErrnoException).code === 'ENOENT') {\n      const parent = path.dirname(mutation.update.target);\n      const realParent = await fs.realpath(parent).catch(() => path.resolve(parent));\n      return `missing:${path.join(realParent, path.basename(mutation.update.target))}`;\n    }\n    throw error;\n  }\n}\n\nasync function assertDistinctMutationTargets(mutations: SpecMutation[]): Promise<void> {\n  const owners = new Map<string, string>();\n  for (const mutation of mutations) {\n    const identity = await mutationTargetIdentity(mutation);\n    const existing = owners.get(identity);\n    if (existing !== undefined) {\n      throw new Error(\n        `Spec updates for '${existing}' and '${mutation.update.id}' resolve to the same target ` +\n          `${identity}. Replace the capability alias or combine the deltas before archiving.`\n      );\n    }\n    owners.set(identity, mutation.update.id);\n  }\n}\n\nasync function captureSpecSnapshots(mutations: SpecMutation[]): Promise<SpecSnapshot[]> {\n  return Promise.all(\n    mutations.map(async ({ update, outcome, rebuilt }) => {\n      try {\n        const stat = await fs.lstat(update.target);\n        if (stat.isSymbolicLink()) {\n          let content: Buffer | undefined;\n          let contentExisted = false;\n          if (outcome === 'write') {\n            try {","sourceCodeStart":821,"sourceCodeEnd":857,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/archive.ts#L821-L857","documentation":"Error \"Spec updates for '${existing}' and '${mutation.update.id}' resolve to the same target ${identity}. Replace the capability alias or combine the deltas before archiving.\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/archive.ts:839 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"}