{"record":{"id":"4887e77844b69403","repo":"can1357/oh-my-pi","slug":"formatverificationfailure-verification-release","errorCode":null,"errorMessage":"${formatVerificationFailure(verification, release.version)}; reinstall with: ${installerHint()}","messagePattern":"(.+?); reinstall with: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/cli/update-cli.ts","lineNumber":1502,"sourceCode":"\t\t\t`install of ${release.packages.pkg} failed with exit code ${installExit}; the existing install was left untouched`,\n\t\t);\n\t}\n\n\tconst removeExit = await steps.removeOld();\n\tif (removeExit !== 0) {\n\t\tconsole.log(chalk.yellow(`Warning: could not remove the old ${PACKAGE} package; remove it manually later.`));\n\t}\n\n\tlet verification = await steps.verify();\n\tif (!verification.ok) {\n\t\t// Removing the old package may have taken the shared bin link with it;\n\t\t// reinstalling the new package restores the link.\n\t\tif ((await steps.install()) === 0) {\n\t\t\tverification = await steps.verify();\n\t\t}\n\t}\n\tif (!verification.ok) {\n\t\tthrow new Error(\n\t\t\t`${formatVerificationFailure(verification, release.version)}; reinstall with: ${installerHint()}`,\n\t\t);\n\t}\n\tprintVerifiedVersion(release.version);\n}\n\n/**\n * Update via package manager.\n *\n * Returns the PATH-resolved launcher check so the caller can repair a launcher\n * the manager left unusable, or `undefined` when a rename migration already\n * verified and reported its own result.\n */\nasync function updateViaBun(release: ReleaseInfo): Promise<InstalledVersionVerification | undefined> {\n\tconsole.log(chalk.dim(\"Updating via bun...\"));\n\tlet verification: InstalledVersionVerification | undefined;\n\tif (release.packages.pkg !== PACKAGE) {\n\t\tawait migrateRenamedInstall(release, packageManagerMigrationSteps(\"bun\", release));","sourceCodeStart":1484,"sourceCodeEnd":1520,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/cli/update-cli.ts#L1484-L1520","documentation":"Thrown at the end of the rename migration when, even after a repair reinstall attempt, `steps.verify()` still reports the installed version doesn't match the released version. The message pairs the verification failure with a concrete `installerHint()` command so the user can fix the install manually.","triggerScenarios":"After migrating to the renamed package, the verification check fails; a repair pass (`steps.install()` followed by re-verify) is attempted and either the repair install fails or verification still returns {ok:false}.","commonSituations":"Stale global bin shim/symlink still pointing at the old package, multiple package managers (npm + bun) each having installed a copy and PATH resolving the wrong one, npm prefix mismatch between install and verification, broken PATH ordering.","solutions":["Run the printed installer command from the message to reinstall cleanly","Check which binary is on PATH: `which omp` / `where omp` and remove stale shims from the old package","Uninstall both old and new package names, then install the new one once: npm uninstall -g <old> <new> && npm install -g <new>","Align npm/bun global prefixes so install and PATH agree, then re-run `omp update`"],"exampleFix":"// before: stale shim from the old package name shadows the new install\n$ which omp\n/usr/local/bin/omp  # old install\n// after\nnpm uninstall -g <old-pkg> && npm install -g <new-pkg>\nhash -r  # clear shell command cache\nomp --version","handlingStrategy":"fallback","validationCode":"# confirm which install is actually on PATH before/after migrating\nwhich omp && omp --version\nnpm ls -g --depth=0 | grep -E 'old-pkg|new-pkg'","typeGuard":null,"tryCatchPattern":"try {\n  await runUpdate();\n} catch (err) {\n  if (String(err?.message).includes(\"reinstall with:\")) {\n    // follow the embedded installerHint() command, then re-verify\n    console.error(err.message);\n    return;\n  }\n  throw err;\n}","preventionTips":["Remove the old package name after a rename migration to avoid stale shims","Keep a single package manager owning the global install (npm or bun, not both)","Run `hash -r` (or restart the shell) after global installs so PATH resolution refreshes","Compare `npm config get prefix` with the directory of the binary on PATH"],"tags":["update-verification","rename-migration","installation","updater"],"backgroundTag":"post-install-version-verification-failed","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}