Skip to content

perf(azure-devops): overlap work item and workflow reads - #39803

Draft
Adamulek123 wants to merge 2 commits into
pingdotgg:mainfrom
Adamulek123:perf/azure-issue-detail-overlap
Draft

Adamulek123 wants to merge 2 commits into
pingdotgg:mainfrom
Adamulek123:perf/azure-issue-detail-overlap

Conversation

@Adamulek123

@Adamulek123 Adamulek123 commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

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 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.

Built by GPT-6.2 Sol in Codex.

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 20, 2026
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

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.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Suggested reviewers: juliusmarminge, macroscopeapp

Merge Risk: Minimal · previous review 738ed

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: Passed 4

Check name Status Explanation
Title check Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed 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
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 7085c47 and 738ed23.

Files selected for processing: 2

  • packages/source-control-azure-devops/src/server/AzureDevOpsIssueTracker.test.ts
  • packages/source-control-azure-devops/src/server/AzureDevOpsIssueTracker.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 20, 2026
@Adamulek123
Adamulek123 marked this pull request as draft November 20, 2026 16:50
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

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.

Before After
0bc9b57b93 acd4bf84fc
Before: live Azure measurement After: live Azure measurement

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.

Measurement script · Raw measurements · Complete driver and seed scripts

Not shown:

  • Browser rendering and click-to-visible latency were not measured; captures show real server RPC measurement output.
  • Custom workflows were not exercised; the live test project uses the Basic process.
  • The author's fixed 40/120 ms fixture timings were not reproduced; these measurements include live Azure CLI startup and service latency.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 20, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

The automated pipeline stopped on this pull request and will not merge it:

not finished after 6 rounds

It stays open for a person to finish or close.

@juliusmarminge juliusmarminge added takeover:blocked Takeover blocked; reason in the PR body and removed takeover:ready Takeover done; auto-lands when gates pass labels Nov 20, 2026

This branch has not been deployed

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

Labels

size:M 30-99 changed lines (additions + deletions). takeover:blocked Takeover blocked; reason in the PR body vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants