{"record":{"id":"86f262f91b685000","repo":"paperclipai/paperclip","slug":"installed-cli-smoke-check-reported-reportedversi","errorCode":null,"errorMessage":"Installed CLI smoke check reported ${reportedVersion || \"no version\"}; expected ${expectedVersion}.","messagePattern":"Installed CLI smoke check reported (.+?); expected (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/install.ts","lineNumber":178,"sourceCode":"export async function resolveGitHubRef(repo: string, ref: string, runCommand: CommandRunner): Promise<string> {\n  const result = await runGitHubCurl([\"--fail\", \"--silent\", \"--show-error\", \"--location\", \"--header\", \"Accept: application/vnd.github+json\", \"--header\", \"User-Agent: paperclipai-install\", `https://api.github.com/repos/${repo}/commits/${encodeURIComponent(ref)}`], runCommand, { maxBuffer: 4 * 1024 * 1024 });\n  let sha: unknown;\n  try { sha = (JSON.parse(result.stdout) as { sha?: unknown }).sha; } catch { throw new Error(`GitHub returned an invalid response while resolving ${repo}@${ref}.`); }\n  if (typeof sha !== \"string\" || !/^[0-9a-f]{40}$/i.test(sha)) throw new Error(`GitHub did not return a full commit SHA for ${repo}@${ref}.`);\n  return sha.toLowerCase();\n}\n\nfunction payloadEntrypoint(payloadPath: string): string {\n  return path.join(payloadPath, \"node_modules\", \"paperclipai\", \"dist\", \"index.js\");\n}\n\nexport async function smokePayload(payloadPath: string, expectedVersion: string, runCommand: CommandRunner): Promise<void> {\n  const entrypoint = payloadEntrypoint(payloadPath);\n  if (!fs.existsSync(entrypoint)) throw new Error(`Installed package is missing its CLI entrypoint: ${entrypoint}`);\n  const result = await runCommand(process.execPath, [entrypoint, \"--version\"], { maxBuffer: 1024 * 1024 });\n  const reportedVersion = result.stdout.trim().split(/\\s+/)[0];\n  if (reportedVersion !== expectedVersion) {\n    throw new Error(`Installed CLI smoke check reported ${reportedVersion || \"no version\"}; expected ${expectedVersion}.`);\n  }\n}\n\nexport async function installNpmPayload(\n  version: string,\n  runCommand: CommandRunner,\n  paths = resolveInstallStorePaths(),\n): Promise<{ payloadPath: string; reused: boolean }> {\n  const payloadPath = payloadPathFor(paths, \"npm\", version);\n  if (fs.existsSync(payloadPath)) {\n    await smokePayload(payloadPath, version, runCommand);\n    return { payloadPath, reused: true };\n  }\n  const sourceRoot = path.dirname(payloadPath);\n  fs.mkdirSync(sourceRoot, { recursive: true, mode: 0o700 });\n  const sourceStat = fs.lstatSync(sourceRoot);\n  if (!sourceStat.isDirectory() || sourceStat.isSymbolicLink()) {\n    throw new Error(`Refusing to install into unsafe payload root ${sourceRoot}.`);","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/paperclipai/paperclip/blob/67001ec6eb96ae601aa27bc91d9b2415d665334a/cli/src/commands/install.ts#L160-L196","documentation":"Error \"Installed CLI smoke check reported ${reportedVersion || \"no version\"}; expected ${expectedVersion}.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at cli/src/commands/install.ts:178 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":"67001ec6eb96ae601aa27bc91d9b2415d665334a","analyzedAt":"2026-08-12T12:05:45.408Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}