{"record":{"id":"e488fb8d6bf96b0e","repo":"stablyai/orca","slug":"tag-does-not-contain-name","errorCode":null,"errorMessage":"${tag} does not contain ${name}","messagePattern":"(.+?) does not contain (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/scripts/verify-skill-update-roundtrip.mjs","lineNumber":83,"sourceCode":"    if (typeof revision !== 'number' || revision >= current.releaseRevision) {\n      continue\n    }\n    const snapshot = registry.skills[name]?.find((entry) => entry.releaseRevision === revision)\n    if (snapshot) {\n      return { tag: `v${release.appVersion}`, snapshot }\n    }\n  }\n  throw new Error(`No historical released snapshot is available for ${name}`)\n}\n\nasync function materializePackage(name, tag, destination) {\n  const prefix = `skills/${name}/`\n  const entries = execFileSync('git', ['ls-tree', '-r', '-z', tag, '--', `skills/${name}`])\n    .toString('utf8')\n    .split('\\0')\n    .filter(Boolean)\n  if (entries.length === 0) {\n    throw new Error(`${tag} does not contain ${name}`)\n  }\n  for (const entry of entries) {\n    const match = /^(\\d+) (\\w+) ([a-f0-9]+)\\t(.+)$/.exec(entry)\n    if (!match || match[2] !== 'blob') {\n      throw new Error(`Unsupported historical tree entry: ${entry}`)\n    }\n    const relativePath = match[4].slice(prefix.length)\n    const destinationPath = path.join(destination, ...relativePath.split('/'))\n    await mkdir(path.dirname(destinationPath), { recursive: true })\n    await writeFile(destinationPath, execFileSync('git', ['cat-file', 'blob', match[3]]))\n    if (process.platform !== 'win32' && match[1] === '100755') {\n      await chmod(destinationPath, 0o755)\n    }\n  }\n}\n\nasync function seedPlacement(name, tag) {\n  const canonical = path.join(home, '.agents', 'skills', name)","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/verify-skill-update-roundtrip.mjs#L65-L101","documentation":"materializePackage() runs 'git ls-tree -r -z <tag> -- skills/<name>' to enumerate the historical skill's files at that tag. If the command returns zero entries, the tag's tree has no path under skills/<name>, so there is nothing to check out for the round-trip.","triggerScenarios":"The skill did not exist at that tag under the expected path skills/<name>; the skill lived at a different path historically; the tag string is wrong (typo, missing 'v'); git is running in a worktree or shallow clone that lacks the tag's tree.","commonSituations":"Skill was relocated between releases (e.g. skills/foo moved to skills/bar); shallow CI clone that doesn't have the historical tag object; tag ref typo; running the script from a directory that isn't the repo root so git resolves paths against the wrong tree.","solutions":["Run 'git ls-tree -r <tag> -- skills/<name>' manually to confirm the skill exists at that path in that tag.","If the skill moved, point materializePackage at the historical path or pick a tag where the skill lived at the current path.","Ensure the script runs in a full (non-shallow) checkout or fetch the tag depth first.","Verify the script's working directory is the repo root before invoking git."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Pre-check the tree before delegating to materializePackage:\nimport { execFileSync } from 'node:child_process'\nfunction tagHasSkill(name, tag) {\n  const out = execFileSync('git', ['ls-tree', '-r', '--name-only', tag, '--', `skills/${name}`], { encoding: 'utf8' })\n  return out.trim().length > 0\n}\nif (!tagHasSkill(targetName, historicalTag)) {\n  throw new Error(`Tag ${historicalTag} lacks skills/${targetName}; pick a different baseline tag`)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run the round-trip only in a full (unshallow) checkout, or fetch the tag with sufficient depth.","Pin the historical baseline tag to one known to contain the skill at the current path.","When relocating a skill, retire the old path's round-trip and add a new one for the new path."],"tags":["git","skill-update","history","shallow-clone","test-fixture"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}