A failed required build normally leaves the PR active and waiting; the reset message indicates that an actual completion attempt failed, but Microsoft does not document concurrent PR completion as the cause or provide a setting that preserves auto-complete after every such failure.
Answers to the specific questions
- Is reset the default after a failed completion attempt?
Azure DevOps can clear auto-complete after a completion attempt returns an error, as your message demonstrates, but the documentation does not define every failure condition that triggers that reset. Importantly, an ordinary failed or pending policy is not documented as automatically clearing auto-complete. Auto-complete is designed to wait until required reviewers and branch policies pass; historical release notes explicitly state that if a build fails or approval is missing, the PR remains active until policies pass.^1^ - Can concurrency or policy changes cause it?
Your sequence is possible at the policy-state level, but the evidence does not establish a race-condition defect. If PR A completes and updatesmaster, PR B’s previously successful build can become invalid depending on its build-expiration setting:- Immediately when the protected branch is updated: the policy status becomes failed; an automatic policy queues another build.
- After n hours: the old result expires when its age exceeds the threshold.
- Never: a target-branch update does not invalidate the result.
- Are required policies evaluated at completion?
Yes, in the supported behavioral sense: completion is permitted only when the PR currently meets all required policies, and existing policies are enforced during completion.^3^ Microsoft does not publicly document the internal locking or exact evaluation sequence immediately before the target-ref update. The API model exposescompletionQueueTime,mergeStatus,mergeFailureType, andmergeFailureMessage, showing that completion and merge failure are tracked separately, but these fields do not establish a concurrency cause.^4^ - Can reset be disabled so that Azure DevOps retries indefinitely?
No such setting is documented. After a reset, enable auto-complete again manually or through automation:
Azure DevOps CLI PR commands apply to Azure DevOps Services, not Azure DevOps Server.^3^ Azure Repos does have a narrower retry mechanism for expired policy builds: when all other policies pass and auto-complete is enabled, it can queue up to five expired builds per PR and retries each build only once. That is not a general retry mechanism for failed completion attempts.^5^az repos pr update \ --id <PR_ID> \ --auto-complete true
How to verify this incident
Correlate these timestamps for both PRs:
- In each PR, open Overview → View checks and record the build policy’s status, expiration state, and Build ID.
- For Azure DevOps Services, capture policy evaluations:
az repos pr policy list \ --id <PR_ID> \ --output table - Open Repos → Branches → master → More options → Branch policies → Build validation and record:
- Required or Optional
- Automatic or Manual
- Build-expiration setting
- Referenced pipeline
- Compare:
- PR A’s completion time
- the target-branch update
- PR B’s policy-status change
- any policy automation update
- PR B’s completion attempt and reset message
- If the incident must be reproduced, subscribe to Pull request merge attempted, Pull request updated, and build-completed service-hook events. Azure DevOps emits a merge-attempt event whether the attempt succeeds or fails, with failure details available for failed attempts.^6^
If PR B’s build became invalid immediately after PR A updated master, this is consistent with the configured expiration behavior. If the policy remained approved until the merge attempt and no policy configuration changed, retain the service-hook payloads, PR API state, Build ID, and timestamps for an Azure DevOps support case; the public documentation is insufficient to determine the server-side ordering.
References
- Team Foundation Server 2017 Release Notes
- Set and manage branch policies
- Complete, abandon, or revert pull requests - Azure Repos | Microsoft Learn
- GitPullRequest interface-Property Details
- Link GitHub commits and pull requests to Azure Boards work items - Sprint 144 Update
- Team Foundation Server 2018 Update 2 Release Notes