{"record":{"id":"5f8ee443e5719966","repo":"stablyai/orca","slug":"name-canonical-placement-did-not-update-to-the","errorCode":null,"errorMessage":"${name} canonical placement did not update to the PR content","messagePattern":"(.+?) canonical placement did not update to the PR content","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/scripts/verify-skill-update-roundtrip.mjs","lineNumber":133,"sourceCode":"    await writeFile(\n      executable,\n      process.platform === 'win32' ? '@exit /b 0\\r\\n' : '#!/bin/sh\\nexit 0\\n'\n    )\n    if (process.platform !== 'win32') {\n      await chmod(executable, 0o755)\n    }\n  }\n}\n\nasync function packageDigestAt(pathValue) {\n  return packageDigest(await collectPackageFiles(pathValue))\n}\n\nasync function assertCurrentCanonical(name) {\n  const expected = currentSkill(name).packageDigest\n  const canonical = path.join(home, '.agents', 'skills', name)\n  if ((await packageDigestAt(canonical)) !== expected) {\n    throw new Error(`${name} canonical placement did not update to the PR content`)\n  }\n}\n\nfunction execSkills(args) {\n  const executable = process.platform === 'win32' ? (process.env.ComSpec ?? 'cmd.exe') : 'npx'\n  const cliArgs = ['--yes', `skills@${cliVersion}`, ...args]\n  execFileSync(\n    executable,\n    process.platform === 'win32' ? ['/d', '/s', '/c', 'npx.cmd', ...cliArgs] : cliArgs,\n    {\n      cwd: process.cwd(),\n      env: {\n        ...process.env,\n        HOME: home,\n        USERPROFILE: home,\n        CODEX_HOME: path.join(home, '.codex'),\n        CLAUDE_CONFIG_DIR: path.join(home, '.claude'),\n        XDG_STATE_HOME: stateHome,","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/verify-skill-update-roundtrip.mjs#L115-L151","documentation":"assertCurrentCanonical() computes a package digest of the installed canonical placement (~/.agents/skills/<name>) and compares it to currentSkill(name).packageDigest from the manifest. It throws when they differ — meaning the 'skills update <name> --global' command did not bring the canonical install up to the manifest's declared digest.","triggerScenarios":"The update command failed silently or partially; the manifest digest is stale relative to what the published package actually contains; the update wrote to a different canonical path; file-mode or line-ending normalization makes the recomputed digest differ.","commonSituations":"Published skill package and manifest digest out of sync; autocrlf rewriting line endings so the on-disk files hash differently than the recorded digest; update command has a bug that skips the canonical placement; HOME/stateHome env misdirection causing install into the wrong directory.","solutions":["Confirm current-manifest.json packageDigest matches the published package the CLI downloads.","Run the update manually and inspect ~/.agents/skills/<name> to see what was actually written.","Ensure autocrlf is set as declared (--autocrlf=false avoids CRLF rewrites that change the digest).","Verify HOME / stateHome in the sandbox point where the script expects (the script sets these up; external overrides break it).","Re-run the manifest digest-generation step to keep it in sync with the package."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Sanity-check the manifest digest against a freshly computed one before running updates:\nimport { createHash } from 'node:crypto'\nasync function recomputeDigest(skillDir) { /* same algorithm the manifest generator uses */ }\n// If recomputeDigest(canonicalDir) !== manifest.packageDigest, the manifest is stale —\n// regenerate it rather than letting the round-trip fail.","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Regenerate current-manifest.json's packageDigest whenever the skill content changes, in the same commit.","Run with --autocrlf=false to avoid CRLF rewrites changing the on-disk digest.","Don't let external tools (formatters, editors) touch the sandbox dir mid-run."],"tags":["skill-update","digest","canonical-install","ci-gate","line-endings"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}