{"record":{"id":"c53b186f719ae111","repo":"paperclipai/paperclip","slug":"ssh-fixture-prerequisites-are-incomplete-status","errorCode":null,"errorMessage":"SSH fixture prerequisites are incomplete: ${status.ssh.reason ?? \"unknown reason\"}","messagePattern":"SSH fixture prerequisites are incomplete: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli/src/commands/env-lab.ts","lineNumber":196,"sourceCode":"  parts.push(shellQuoteArgument(invocation.entry), \"env-lab down\");\n  if (opts.instance !== undefined) {\n    parts.push(\"--instance\", shellQuoteArgument(opts.instance));\n  }\n  return parts.join(\" \");\n}\n\nexport async function envLabDoctorCommand(opts: { instance?: string; json?: boolean }) {\n  const status = await collectEnvLabDoctorStatus(opts);\n\n  if (opts.json) {\n    printJson(status);\n    return;\n  }\n\n  if (status.ssh.supported) {\n    p.log.success(\"SSH fixture prerequisites are installed.\");\n  } else {\n    p.log.warn(`SSH fixture prerequisites are incomplete: ${status.ssh.reason ?? \"unknown reason\"}`);\n  }\n\n  if (status.ssh.state && status.ssh.running) {\n    p.log.success(\"SSH env-lab fixture is running.\");\n    summarizeFixture(status.ssh.state);\n    p.log.message(`Private key: ${pc.dim(status.ssh.state.clientPrivateKeyPath)}`);\n    p.log.message(`Known hosts: ${pc.dim(status.ssh.state.knownHostsPath)}`);\n  } else if (status.ssh.state) {\n    p.log.warn(\"SSH env-lab fixture state exists, but the process is not running.\");\n    p.log.message(`State: ${pc.dim(status.statePath)}`);\n  } else {\n    p.log.info(\"SSH env-lab fixture is not running.\");\n    p.log.message(`State: ${pc.dim(status.statePath)}`);\n  }\n\n  // The cleanup hint runs the same CLI that prints it, so it stops the correct\n  // version. The bundled build runs `dist/index.js`; a source checkout runs\n  // `src/index.ts` through the checked-out tsx runner. The hint uses absolute","sourceCodeStart":178,"sourceCodeEnd":214,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/cli/src/commands/env-lab.ts#L178-L214","documentation":"env-lab doctor calls getSshEnvLabSupport() (packages/adapter-utils/src/ssh.ts), which checks platform policy and required commands. supported=false happens when: the platform is macOS without PAPERCLIP_ENABLE_DARWIN_SSH_ENV_LAB=1 (fixture disabled there by default), or one of ssh/sshd/ssh-keygen is not on PATH (reason: 'Missing required command: <cmd>'). The doctor prints the reason so you know exactly which prerequisite is missing.","triggerScenarios":"Running `paperclipai env-lab doctor` on macOS without the opt-in env var; on a slim Docker image or minimal Linux that lacks openssh client/server binaries.","commonSituations":"CI containers without openssh-server; dev machines where only the ssh client is installed; macOS users hitting the default-off fixture gate.","solutions":["Install the missing binaries: apt-get install -y openssh-client openssh-server (or apk/yum equivalents) so ssh, sshd and ssh-keygen are all on PATH.","On macOS, opt in explicitly: export PAPERCLIP_ENABLE_DARWIN_SSH_ENV_LAB=1 before running env-lab commands.","Re-run `paperclipai env-lab doctor` and confirm it now prints 'SSH fixture prerequisites are installed.'","Use `paperclipai env-lab doctor --json` to capture the exact reason string in scripts."],"exampleFix":"# before\n$ paperclipai env-lab doctor\n! SSH fixture prerequisites are incomplete: Missing required command: sshd\n\n# after\n$ sudo apt-get install -y openssh-server openssh-client\n$ paperclipai env-lab doctor\n√ SSH fixture prerequisites are installed.","handlingStrategy":"validation","validationCode":"import { execFileSync } from \"node:child_process\";\nconst required = [\"ssh\", \"sshd\", \"ssh-keygen\"];\nconst missing = required.filter((c) => {\n  try { execFileSync(\"which\", [c], { stdio: \"ignore\" }); return false; } catch { return true; }\n});\nif (missing.length > 0) throw new Error(`Install openssh first; missing: ${missing.join(\", \")}`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Provision containers/CI images with openssh-client + openssh-server before running env-lab.","On macOS, export PAPERCLIP_ENABLE_DARWIN_SSH_ENV_LAB=1 if you actually want the fixture.","Gate env-lab usage on `paperclipai env-lab doctor --json` parsing supported === true in scripts."],"tags":["env-lab","ssh","prerequisites","cli","doctor"],"backgroundTag":"missing-system-dependency","analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}