stablyai/orca · error

Unsupported historical tree entry: ${entry}

Error message

Unsupported historical tree entry: ${entry}

What it means

materializePackage() parses each 'git ls-tree -r' entry with the regex /^(\d+) (\w+) ([a-f0-9]+)\t(.+)$/ and requires match[2] to be 'blob'. It throws on any entry that isn't a blob — submodules (commit), trees, or any malformed line — because the materializer only knows how to cat-file a blob.

Source

Thrown at config/scripts/verify-skill-update-roundtrip.mjs:88

      return { tag: `v${release.appVersion}`, snapshot }
    }
  }
  throw new Error(`No historical released snapshot is available for ${name}`)
}

async function materializePackage(name, tag, destination) {
  const prefix = `skills/${name}/`
  const entries = execFileSync('git', ['ls-tree', '-r', '-z', tag, '--', `skills/${name}`])
    .toString('utf8')
    .split('\0')
    .filter(Boolean)
  if (entries.length === 0) {
    throw new Error(`${tag} does not contain ${name}`)
  }
  for (const entry of entries) {
    const match = /^(\d+) (\w+) ([a-f0-9]+)\t(.+)$/.exec(entry)
    if (!match || match[2] !== 'blob') {
      throw new Error(`Unsupported historical tree entry: ${entry}`)
    }
    const relativePath = match[4].slice(prefix.length)
    const destinationPath = path.join(destination, ...relativePath.split('/'))
    await mkdir(path.dirname(destinationPath), { recursive: true })
    await writeFile(destinationPath, execFileSync('git', ['cat-file', 'blob', match[3]]))
    if (process.platform !== 'win32' && match[1] === '100755') {
      await chmod(destinationPath, 0o755)
    }
  }
}

async function seedPlacement(name, tag) {
  const canonical = path.join(home, '.agents', 'skills', name)
  await materializePackage(name, tag, canonical)
  const providerRoot = path.join(home, '.claude', 'skills')
  const provider = path.join(providerRoot, name)
  await mkdir(providerRoot, { recursive: true })
  await (shape === 'copy'

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Run 'git ls-tree -r <tag> -- skills/<name>' and look for any line whose type column is not 'blob' (e.g. commit entries = submodules).
  2. If a submodule is present historically, extend materializePackage to handle 'commit' entries or skip them deliberately.
  3. Confirm the git version used produces the standard ls-tree format (the AGENTS.md git-compat baseline is 2.25).
  4. Regenerate the snapshot from a tag whose tree contains only blobs.

Example fix

// before
if (!match || match[2] !== 'blob') {
  throw new Error(`Unsupported historical tree entry: ${entry}`)
}
// after — tolerate and skip submodule (commit) entries
if (!match) throw new Error(`Unsupported historical tree entry: ${entry}`)
if (match[2] === 'commit') continue // submodule pointer; nothing to materialize
if (match[2] !== 'blob') throw new Error(`Unsupported historical tree entry: ${entry}`)
Defensive patterns

Strategy: validation

Validate before calling

// Reject trees containing non-blob entries up front so the failure is clearer:
function assertTreeIsBlobsOnly(name, tag) {
  const entries = execFileSync('git', ['ls-tree', '-r', tag, '--', `skills/${name}`], { encoding: 'utf8' }).trim().split('\n').filter(Boolean)
  for (const e of entries) {
    const type = /^\d+ (\w+) /.exec(e)?.[1]
    if (type && type !== 'blob') {
      throw new Error(`Refusing to materialize: ${tag} skills/${name} contains ${type} entry: ${e}`)
    }
  }
}

Prevention

When it happens

Trigger: The skill tree at that tag contains a git submodule pointer (mode 160000, type commit); a nested directory entry leaks through (shouldn't with -r but could with tree objects); ls-tree output format change across git versions; the entry line contains characters that break the strict regex.

Common situations: Skill historically vendored a submodule; unusual file mode bits in the tree; git version producing a format the regex doesn't anticipate; corruption in the tree object.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/87392f7be7f0fb16. Report an issue: GitHub.