Skip to content

[Bug]: Azure DevOps reviewer votes are ignored, so review state and the Review filter are wrong #31165

Open

Description

@Tabonx

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

Steps to reproduce

  1. Open the Pull requests page for a project on Azure DevOps.
  2. Find a PR you reviewed and voted on. It still sits in the review-requested group.
  3. Set the Review filter to Approved, Changes requested, or Review required.

Expected behavior

  • A reviewer who voted is no longer counted as requested.
  • PRs carry a review state, as they do on GitHub and GitLab.
  • The Review filter works.

Actual behavior

The provider reads the name of each reviewer and ignores the vote. az repos pr show and az repos pr list both return reviewers[].vote, so the data is already there. As a result:

  • reviewRequestLogins holds every reviewer, including those who voted, so a PR stays in the Reviewing group and the mobile badge permanently (azureDevOpsPullRequestJson.ts, toPullRequest).
  • reviewDecision is never set, so PRs show no verdict and never reach the top merge-readiness tier.
  • The web Review filter compares reviewDecision with the selected value (pullRequestList.logic.ts), so Approved, Changes requested and Review required return an empty list, and No reviews returns everything. The server deliberately lets undefined decisions through, so web and server disagree.
  • Azure records a vote as a system comment such as <name> voted 10, and the activity decoder drops system comments. A vote therefore never wakes watch_pull_request, whose description promises review notifications.

#28085 adds casting a vote but does not read votes back.

Impact

Review state on Azure DevOps is missing or wrong in the list, in the detail view, and for agents watching a PR.

Version or commit

a21d788752

Environment

macOS, azure-cli 2.90, azure-devops extension 1.0.8, T3 Code built from a21d788752

Workaround

Check votes on the Azure DevOps website.

Activity

  1. Tabonx commented on Nov 19, 2026

    @Tabonx
    ContributorAuthor

    Another case, from watch_pull_request on an Azure DevOps PR. Names and IDs are replaced with examples.

    An agent thread watched PR 1234 in example-org/Example Repo and relied on auto-complete to continue a chain of stacked PRs. Timeline (UTC):

    Time Event
    10:43:45 Reviewer votes 10 (approved)
    10:46:44 watch_pull_request starts, returns watching: true
    10:46 to 10:57 Watcher reads the PR every 2 minutes, all 7 reads succeed
    10:56:50 Required build policy succeeds
    10:56:53 Auto-complete merges the PR
    10:57:16 Watch ends with reason: merged, wakes: 0

    The thread was never woken.

    What I found:

    • In this case the vote came before the watch started, so it was part of the baseline. But a vote after the start would not wake the thread either: decodeThreadsJson skips every comment with commentType: "system" (azureDevOpsPullRequestJson.ts), so the watch never sees a vote as a remark. The tool description says the watch wakes on "new comments or reviews", and on Azure a vote is the review. On GitHub, an approving review with an empty body does wake the watch. fix(azure-devops): reviewer votes set review state, leave Reviewing, and show in activity #31198 turns VoteUpdate threads into review activity entries, which should close this gap for the watch too.
    • The missing wake on merge was a separate bug, fixed in fix(server): watched PRs wake the agent when they merge #26271. The server here ran a build from before that commit, which ended merged watches without a wake. On current main, an auto-complete merge set through az rest or --auto-complete does not match the agent close-command pattern, so the merge wakes the thread.
    • The passed build was never reported because the PR merged 3 seconds later, and the reactor stops evaluating a PR once it is no longer open. With fix(server): watched PRs wake the agent when they merge #26271, the merge wake covers this.

    One small follow-up outside this issue: the watch_pull_request description still lists only failed checks, passed required checks, comments or reviews, and conflicts. It does not say that a merge or close also wakes the thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions