You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(azure-devops): overlap work item and workflow reads - #39803
Opening an Azure DevOps issue waits for the workflow metadata command to finish before starting the work-item command. The metadata is needed to classify the returned item, so it adds a command round to detail loading even though both commands can start from the same issue reference.
Change
Start the workflow and item reads together. Decode and verify the item's project after both reads, then load the discussion, history, and linked PRs. A workflow error still takes precedence and interrupts the item read if it is running.
Scope
This is a focused Azure DevOps adapter fix for issue detail loading through the existing shared server path.
Verification
I ran the production tracker and JSON decoders against a controlled CLI fixture with a custom workflow, comments, history, and a linked PR. With 40 ms of simulated delay per command, median detail time fell from 139.3 ms to 94.4 ms. With 120 ms per command it fell from 376.7 ms to 253.9 ms. Three concurrent detail reads sharing four simulated command slots completed in 234.2 ms before and 188.3 ms after. Each repeated comparison uses 16 samples per revision.
Healthy details returned identical outputs and used five commands and 2,378 bytes of CLI output. The no-delay control was 0.60 ms before and 0.63 ms after. The largest increase in post-GC retained heap in the detail workloads was 0.20 MiB. A failed workflow read can now start one speculative item command. The gated regression test verifies that it is canceled, and the fixture checks failure precedence and project ownership.
Compared 9cc4018c75f and 738ed2300d5. Scoped format and lint, package typecheck, and all 200 Azure DevOps package tests passed. Azure CLI process startup, live Azure timing, and browser timing were unmeasured.
Error and reread
With 40 ms of simulated delay per command, a failed workflow read followed by one successful explicit reread took 189.3 ms on main and 141.2 ms here (20 samples per revision, six and seven commands). With three concurrent reads and a shared four-command limit, the same recovery batch took 277.2 ms on main and 281.9 ms here, with 18 and 21 commands.
With the workflow still failing on reread, that three-issue batch took 94.2 ms on main and 187.9 ms here, with six and 12 command attempts. The additional work-item commands were canceled locally after admission. In this fixture their occupancy delayed other workflow reads, and the original error still took precedence. These are simulated command slots and controlled CLI replies.
Reviewing files that changed from the base of the PR and between 738ed23 and acd4bf8.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
getIssue now reads the work item while loading workflow types. It decodes the work item after workflow types are available. A new test checks that a workflow rate-limit error interrupts a pending work-item read.
Changes: Azure DevOps issue loading
Layer / File(s)
Summary
Separate work-item reading and decoding packages/source-control-azure-devops/src/server/AzureDevOpsIssueTracker.ts
readWorkItem performs the raw CLI read. decodeWorkItem handles decode failures and returns not-found for missing or cross-project items.
Load issue data concurrently packages/source-control-azure-devops/src/server/AzureDevOpsIssueTracker.ts, packages/source-control-azure-devops/src/server/AzureDevOpsIssueTracker.test.ts
getIssue starts workflow-type loading alongside the raw work-item read. The test verifies that a workflow rate-limit error interrupts a pending work-item read.
Issue-detail loading now overlaps workflow and work-item reads and should be faster. Workflow-failure precedence and project ownership checks are kept. No concrete merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "perf(azure-devops): overlap work item and workflow reads" matches the main change. The getIssue flow now starts the work-item read and the workflow-type read concurrently, rather than waiti…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description follows the template's Problem, Change, Scope, and Verification sections. It explains that the workflow and work-item reads ran in sequence, and that the change runs them together and …
Full details: Title check
Explanation
The title "perf(azure-devops): overlap work item and workflow reads" matches the main change. The getIssue flow now starts the work-item read and the workflow-type read concurrently, rather than waiting for workflow metadata first. The title is specific, uses a conventional commit prefix, and names the Azure DevOps scope.
Full details: Description check
Explanation
The description follows the template's Problem, Change, Scope, and Verification sections. It explains that the workflow and work-item reads ran in sequence, and that the change runs them together and verifies project ownership after both reads. Scope names a focused Azure DevOps adapter fix, but it does not link an issue that shows the bug or explain why no issue is needed. Verification is detailed: it gives timings, sample counts, commit comparisons, and test results, and it lists what was not measured. The template's title and agent-model line are not fully addressed: the title is not stated in the description, and the description says 'Built by GPT-6.2 Sol in Codex', which fulfills the agent line. The missing issue link is the main gap.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
Live Azure measurement on the same Linux machine with isolated real T3 servers. Seed an edited Issue in Doing with two comments and one linked PR; run three alternating blocks per side, each containing one warmup, 16 sequential detail loads and 16 batches of three concurrent loads.
Sequential median of block medians: 2566.7 → 2043.1 ms, a 523.6 ms / 20.4% improvement, exceeding the largest block-median range of 65.7 ms. Three-concurrent batches: 3854.7 → 3475.2 ms, a 379.5 ms / 9.8% improvement, exceeding the largest block-median range of 144.2 ms. Individual samples have wider ranges, shown in the captures and raw data; the comparison uses repeated block medians.
All 390 responses matched byte-for-byte: 3 states, 2 comments, 2 events and 1 linked PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:M30-99 changed lines (additions + deletions).takeover:blockedTakeover blocked; reason in the PR bodyvouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Opening an Azure DevOps issue waits for the workflow metadata command to finish before starting the work-item command. The metadata is needed to classify the returned item, so it adds a command round to detail loading even though both commands can start from the same issue reference.
Change
Start the workflow and item reads together. Decode and verify the item's project after both reads, then load the discussion, history, and linked PRs. A workflow error still takes precedence and interrupts the item read if it is running.
Scope
This is a focused Azure DevOps adapter fix for issue detail loading through the existing shared server path.
Verification
I ran the production tracker and JSON decoders against a controlled CLI fixture with a custom workflow, comments, history, and a linked PR. With 40 ms of simulated delay per command, median detail time fell from 139.3 ms to 94.4 ms. With 120 ms per command it fell from 376.7 ms to 253.9 ms. Three concurrent detail reads sharing four simulated command slots completed in 234.2 ms before and 188.3 ms after. Each repeated comparison uses 16 samples per revision.
Healthy details returned identical outputs and used five commands and 2,378 bytes of CLI output. The no-delay control was 0.60 ms before and 0.63 ms after. The largest increase in post-GC retained heap in the detail workloads was 0.20 MiB. A failed workflow read can now start one speculative item command. The gated regression test verifies that it is canceled, and the fixture checks failure precedence and project ownership.
Compared
9cc4018c75fand738ed2300d5. Scoped format and lint, package typecheck, and all 200 Azure DevOps package tests passed. Azure CLI process startup, live Azure timing, and browser timing were unmeasured.Error and reread
With 40 ms of simulated delay per command, a failed workflow read followed by one successful explicit reread took 189.3 ms on main and 141.2 ms here (20 samples per revision, six and seven commands). With three concurrent reads and a shared four-command limit, the same recovery batch took 277.2 ms on main and 281.9 ms here, with 18 and 21 commands.
With the workflow still failing on reread, that three-issue batch took 94.2 ms on main and 187.9 ms here, with six and 12 command attempts. The additional work-item commands were canceled locally after admission. In this fixture their occupancy delayed other workflow reads, and the original error still took precedence. These are simulated command slots and controlled CLI replies.
Built by GPT-6.2 Sol in Codex.