{"record":{"id":"cbb3ff90cb7fa687","repo":"coleam00/Archon","slug":"failed-to-inspect-volume-volume-detail","errorCode":null,"errorMessage":"Failed to inspect volume '${volume}': ${detail}","messagePattern":"Failed to inspect volume '(.+?)': (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/isolation/src/backends/container.ts","lineNumber":515,"sourceCode":"      const detail = extractDockerError(err);\n      if (/no such (object|container)/i.test(detail)) return 'missing';\n      throw new Error(`Failed to inspect container '${nameOrId}': ${detail}`);\n    }\n  }\n\n  private async getContainerId(nameOrId: string): Promise<string> {\n    const { stdout } = await this.docker(['inspect', '-f', '{{.Id}}', nameOrId]);\n    return stdout.trim();\n  }\n\n  private async volumeExists(volume: string): Promise<boolean> {\n    try {\n      await this.docker(['volume', 'inspect', volume]);\n      return true;\n    } catch (err) {\n      const detail = extractDockerError(err);\n      if (/no such volume/i.test(detail)) return false;\n      throw new Error(`Failed to inspect volume '${volume}': ${detail}`);\n    }\n  }\n\n  /**\n   * Run a `docker rm`/`volume rm` and swallow ONLY the idempotent not-found case\n   * (the resource is already gone). Returns `undefined` on success or not-found,\n   * or the error detail string on a genuine failure the caller must surface.\n   */\n  private async removeIgnoringNotFound(args: string[]): Promise<string | undefined> {\n    try {\n      await this.docker(args);\n      return undefined;\n    } catch (err) {\n      const detail = extractDockerError(err);\n      if (/no such (container|volume)/i.test(detail)) {\n        log.debug({ args, detail }, 'isolation.container_destroy_already_gone');\n        return undefined;\n      }","sourceCodeStart":497,"sourceCodeEnd":533,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/isolation/src/backends/container.ts#L497-L533","documentation":"volumeExists() runs `docker volume inspect <volume>`; 'no such volume' is normalized to false, but any other failure is thrown wrapped in this message because the code cannot distinguish missing from broken.","triggerScenarios":"`docker volume inspect` fails with a non-'no such volume' error — daemon unreachable, permission denied on the socket, or a malformed volume name.","commonSituations":"Docker daemon down or restarting during resumeEnv; DOCKER_HOST pointing at an unreachable remote; volume name containing invalid characters; partial daemon startup after host reboot.","solutions":["Run `docker volume inspect <name>` manually to see the raw error","Confirm the daemon is up (`docker info`) and DOCKER_HOST is correct","Fix socket permissions or docker group membership","Retry resume once daemon access is restored"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"const { execSync } = require('child_process');\ntry { execSync('docker info', { stdio: 'ignore' }); } catch { throw new Error('Docker daemon not reachable'); }","typeGuard":null,"tryCatchPattern":"try {\n  const ok = await backend.volumeExists(vol);\n} catch (err) {\n  if (String(err).startsWith('Failed to inspect volume')) {\n    // not 'false' (missing) — daemon failure; surface to operator\n  }\n  throw err;\n}","preventionTips":["Verify daemon health before resume operations","Use only valid volume names (lowercase alphanumerics, dash, underscore)","Avoid restarting the daemon mid-resume"],"tags":["docker","volume","daemon"],"backgroundTag":"docker-inspect-failed","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}