{"record":{"id":"8812d8db9bc0ca99","repo":"Fission-AI/OpenSpec","slug":"archive-path-outside-root","errorCode":"archive_path_outside_root","errorMessage":"Refusing to archive through a path outside the OpenSpec root: ${managedDir}","messagePattern":"Refusing to archive through a path outside the OpenSpec root: (.+?)","errorType":"exception","errorClass":"ArchiveBlockedError","httpStatus":null,"severity":"error","filePath":"src/core/archive.ts","lineNumber":1126,"sourceCode":"  private async run(\n    changeName: string | undefined,\n    options: ArchiveOptions,\n    root: ResolvedOpenSpecRoot,\n    json: boolean\n  ): Promise<ArchiveResult | null> {\n    const changesDir = root.changesDir;\n    const archiveDir = root.archiveDir;\n    const mainSpecsDir = root.specsDir;\n\n    for (const [allowedDirectory, managedDir] of [\n      [root.path, changesDir],\n      [changesDir, archiveDir],\n      [root.path, mainSpecsDir],\n    ] as const) {\n      try {\n        FileSystemUtils.assertPathWithin(allowedDirectory, managedDir);\n      } catch {\n        throw new ArchiveBlockedError(\n          'archive_path_outside_root',\n          `Refusing to archive through a path outside the OpenSpec root: ${managedDir}`\n        );\n      }\n    }\n\n    // Get change name interactively if not provided\n    if (!changeName) {\n      if (json) {\n        throw new ArchiveBlockedError(\n          'archive_change_name_required',\n          'A change name is required: archive --json is non-interactive.',\n          withStoreFlag(root, 'openspec archive <change-name> --json')\n        );\n      }\n      const selectedChange = await this.selectChange(changesDir, root, options);\n      if (!selectedChange) {\n        console.log('No change selected. Aborting.');","sourceCodeStart":1108,"sourceCodeEnd":1144,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/archive.ts#L1108-L1144","documentation":"Error \"Refusing to archive through a path outside the OpenSpec root: ${managedDir}\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/archive.ts:1126 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"}