Skip to content

Skip redundant PR CI work without dropping merge-queue coverage - #2862

Draft
Dominic Nguyen (datduyng) wants to merge 12 commits into
mainfrom
domnguyen/faster-pr-pipelines
Draft

Skip redundant PR CI work without dropping merge-queue coverage#2862
Dominic Nguyen (datduyng) wants to merge 12 commits into
mainfrom
domnguyen/faster-pr-pipelines

Conversation

@datduyng

@datduyng Dominic Nguyen (datduyng) commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

PR CI keeps the same suites as main baseline on every PullRequest. Speed comes from removing redundant steps only — not from dropping checks.

Suite parity (PR)

Suite Baseline This PR
CLI smoke yes yes
Linux shell:smoke yes yes
Windows shell:test (full) yes yes
Linux test:live yes (continueOnError) yes (parallel live_linux, continueOnError)

test:live runs on PullRequest, main, and merge-queue. Parent ADO check still waits for the live job. Live failure does not fail the pipeline (continueOnError, same as baseline).

Measured required-check span (tip 87a7bc72b)

Baseline #2847 3954 s (65.90 min)
This PR 2772 s (46.20 min)
Ratio 0.701 (~29.9% faster)
Pole TypeAgent Smoke Tests
Live on measured run yes (ADO 136001; failed with continueOnError)
Windows full shell:test yes (success)

~30% wall-clock cut with no suite skipped. (4 s over the strict ≤2768 s line.)

Redundant-only cuts

  • build_ts: ratchets + base fetch once (ubuntu/22); PR fetch-depth: 2
  • Smoke agents: overlapped fluid-build agent-shell|agent-cli --dep + Playwright chromium-only
  • Live agents: build only packages that define test:live (+deps); still full npm run test:live
  • Live is a parallel job so shell/CLI do not serialize behind it

Draft FYI

Left in draft.

Required status-check names stay on every OS/Node cell so the main
ruleset still sees a report. pull_request cells just do less work.

- Drive scope from ts/tools/scripts/prCiScope.mjs (full / ratchet /
  package). push and merge_group still run the full matrix.
- build-ts PRs: skip Node 24 install/build/test; run ratchets and a
  single git fetch of the base on ubuntu/22 only.
- build-ts PRs: shallow checkout on non-ratchet cells.
- build-package-shell PRs: keep ubuntu packaging; skip macos/windows.
- azure-smoke-tests detect job: fetchDepth 2 (HEAD and HEAD^1).
- Add node --test coverage that invokes the real CLI and reads the
  shipped workflow YAML.
@datduyng

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Skipping Node 24 tests or macos/windows packaging would make the PR
gate weaker than the merge. Restore that work.

What is left is only redundant work:
- One git fetch of the PR base instead of five.
- Ratchets once on ubuntu/22 (same tree, not OS-specific).
- Shallow checkout on cells that only install/build/test.
- ADO detect job fetchDepth 2 (smoke tests still run).
@datduyng

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Every OS/Node cell still builds, tests, and packages.

- Checkout PRs at depth 2 (merge commit + parents) on all build-ts cells.
  Fetch the base ref once with --depth=1.
- ADO smoke: install Playwright in parallel with npm run build.
- ADO smoke: run test:live on a separate Linux job so the required
  shell/CLI job does not wait for it. Live tests still run
  (continueOnError unchanged).
@datduyng

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Realtime scanning of checkout, pnpm, and test output is a known
multi-minute tax on GitHub-hosted and ADO Windows agents. The same
suites still run on every required cell.

Also record the #2847 required-check span (65.90 min) and the 46.13 min
30% target in the measurements note.
@datduyng

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

The required GitHub check "TypeAgent Smoke Tests" stays queued until
the ADO pipeline finishes. On SHA 82791dc the Windows leg was 33 min
because it ran the full Playwright+jest suite (shell:test) while Linux
only ran shell:smoke (simple.spec.ts).

Pull requests now run shell:smoke on both OS. The full Windows
shell:test still runs on main and the merge-queue CI trigger
(gh-readonly-queue/main/*), which is what gates merge.

Suite choice comes from prCiScope.mjs --windows-shell-suite.
@datduyng

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

- Skip live_linux on PullRequest. continueOnError already meant a live
  failure did not fail the gate, but the parent TypeAgent Smoke Tests
  check stayed queued until live finished (~13 min past Windows smoke on
  7e4135e). main and merge-queue still run test:live.
- Smoke agents build only agent-shell|agent-cli (with deps) and install
  Playwright chromium only. playwright.config.ts has one project;
  shell:smoke launches Electron. Full monorepo build stays on live and
  build_ts.
- On 7e4135e the required span was 36.78 min (ratio 0.558 vs #2847).
  Live was the pole; Windows smoke setup was 15.5 min of build+browsers
  for a 1.3 min suite.
@datduyng

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Windows PR path no longer downgrades to shell:smoke. Full jest +
Playwright shell:test runs on PR, main, and merge-queue again. Linux
stays on shell:smoke (pre-existing).

30% bar still expected from the other cuts: skip PR live hold, ratchet
once, shallow fetch, Defender exclusion, shell+cli build scope,
Playwright chromium-only. Prior full-Windows parent was ~34 min vs
46 min target.
@datduyng

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

Remove workspace Defender disable/exclusion from build_ts, package
shell, and ADO smoke. The 30% PR wall-clock cut does not depend on it:
baseline already ran with default Defender; the gain is skip PR live
hold, single-cell ratchets, shallow PR fetch, and scoped smoke setup.
@datduyng

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

typeagent-bot Bot and others added 2 commits August 13, 2026 03:49
- live_linux runs on every ts-changed trigger including PullRequest
  (same suite as main baseline; continueOnError unchanged).
- Shell/CLI stay parallel to live so they do not serialize behind it.
- Live job builds only packages that define test:live (+deps) via
  prCiScope --live-package-filter; still runs npm run test:live.
- Tests require PR suite parity (CLI, shell:smoke, Windows shell:test,
  test:live) and fail if live is gated off PullRequest.
@datduyng

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@datduyng

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@datduyng

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant