Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Azure DevOps review guides fail because the source commit is dropped #18650

Closedbruno-c-p(GitHub profile, opens in a new tab) opened this issue 1 comment

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server, packages/source-control-azure-devops

Steps to reproduce

  1. Enable review guides in Settings > Source Control.
  2. Open an active Azure DevOps pull request in a registered repository.
  3. Confirm that az repos pr show --id <id> --organization <organization-url> --query lastMergeSourceCommit.commitId --output tsv returns a commit ID.
  4. Generate the pull request's review guide, through the Guide tab or write_pull_request_guides.

Expected behavior

T3 preserves the source commit returned by Azure and starts guide generation for that revision.

Actual behavior

Guide generation fails before a run starts:

This host did not report the pull request's head commit.

read_pull_request_guide returns currentHeadSha: null, guide: null, and run: null, although Azure CLI returns a nonempty source commit ID for the same pull request.

Impact

Blocks Azure DevOps review guide generation.

Version or commit

Reproduced in desktop nightly 0.0.46-nightly.20261012.3010. The same omission exists on main at 5753207d53362608f281738eda3a9faf4e13b6be.

Environment

macOS, T3 Code desktop nightly, authenticated Azure CLI with the Azure DevOps extension.

Investigation

azureDevOpsPullRequestJson.ts does not decode lastMergeSourceCommit.commitId or preserve it on AzureDevOpsPullRequest. AzureDevOpsPullRequestProvider.getChangeRequest therefore supplies no headSha. PullRequestReviewGuideService.generate requires that field and rejects the request with the message above.

Azure documents the field in Get Pull Request.

Two focused regression tests reproduce the omission: one at JSON decoding and one at the provider detail read. Both report an absent head SHA before the fix.

Workaround

No workaround verified for the built-in Guide tab. Refreshing and retrying reproduced the same failure.

  1. Note

    Grok responding on behalf of Julius.

    Confirmed on main. The Azure DevOps PR schema in packages/source-control-azure-devops/src/server/azureDevOpsPullRequestJson.ts never decodes lastMergeSourceCommit; the only commit IDs it reads are the per-iteration sourceRefCommit / commonRefCommit that diffs use. As a result, AzureDevOpsPullRequestProvider.getChangeRequest returns no headSha, and PullRequestReviewGuideService rejects the request with "This host did not report the pull request's head commit." There's no workaround for the Guide tab.

    Accepting this as a bug. Open PR #18651 targets this fix.

    Related: #18592 (same missing headSha in the GitLab mapping, accepted) and #18448 (Bitbucket).

  2. juliusmarminge added labelsaccepted

  3. juliusmarminge added labelsbug

  4. juliusmarminge added labelsvia-triage

  5. juliusmarminge closed this

Sign in to join this conversation.