nodejs/node · error · GitFailedException

Couldn't determine commit position for %s

Error message

Couldn't determine commit position for %s

What it means

GitGetCommitPosition looks first for the Cr-Commit-Position footer and parses a branch/position out of it, then falls back to the git-svn-id footer. If neither footer is present on the commit, MB has no way to derive a position and raises GitFailedException.

Source

Thrown at deps/v8/tools/release/git_recipes.py:291

    its SVN revision value is returned.
    """
    git_log = self.GitLog(format='%B', n=1, git_hash=git_hash, **kwargs)
    footer_map = GetCommitMessageFooterMap(git_log)

    # Search for commit position metadata
    value = footer_map.get(COMMIT_POSITION_FOOTER_KEY)
    if value:
      match = COMMIT_POSITION_RE.match(value)
      if match:
        return match.group(2)

    # Extract the svn revision from 'git-svn' metadata
    value = footer_map.get(GIT_SVN_ID_FOOTER_KEY)
    if value:
      match = GIT_SVN_ID_RE.match(value)
      if match:
        return match.group(1)
    raise GitFailedException("Couldn't determine commit position for %s" %
                             git_hash)

  def GitGetHashOfTag(self, tag_name, **kwargs):
    return self.Git("rev-list -1 " + tag_name).strip().encode("ascii", "ignore")

View on GitHub (pinned to 1b2de5e052)

Solutions

  1. Use a SHA that lives on the official V8/Chromium history where footers are present.
  2. If working locally, ensure commits carry Cr-Commit-Position (e.g. via git-footers / cl footers).
  3. For tags, dereference to the underlying commit first (`git rev-list -1 <tag>`).
Defensive patterns

Strategy: validation

Validate before calling

# Confirm footers are present before asking for the commit position.
footers = git_footers(git_hash)  # whatever helper you use
assert (COMMIT_POSITION_FOOTER_KEY in footers
        or GIT_SVN_ID_FOOTER_KEY in footers), (
    f'{git_hash} has no Cr-Commit-Position or git-svn-id footer')

Try / catch

try:
    pos = repo.GitGetCommitPosition(git_hash)
except GitFailedException as e:
    log.warning('no commit position for %s; not on official history?', git_hash)
    raise

Prevention

When it happens

Trigger: Asking for the commit position of a SHA whose commit message lacks both Cr-Commit-Position and git-svn-id trailers.

Common situations: Local/non-Google commits without injected footers; a commit made before footer injection was introduced; a rebased commit that stripped trailers; querying a tag object rather than a commit.

Related errors


AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13). Data as JSON: /api/errors/03885e5e39985a4c. Report an issue: GitHub.