← Back to Pull requests

build,win: add pgo generate workflow #67438

Open
StefanStojanovic opened this pull request with 307 lines diff across 2 files
View on GitHub
StefanStojanovic StefanStojanovic commented on Nov 12, 2026 15:42 UTC
Author

This PR adds a Windows GitHub action that runs a PGO-instrumented build, executes workload scripts on a runner with the requested architecture (x64 or ARM64), and creates a branch that pushes the profdata file to the predefined location in the repository.

After the branch is created, you can open a PR to main or an LTS branch to include that change. Once that is done, the release CI will look for that file and use it for the release. This will also make release Windows builds more than twice as fast because the preparation step (instrumented build and workloads) will already be finished. Since we currently use x64-generated profdata in ARM64 releases, this will further improve performance on ARM64 Windows.

I've already tested the workflow in my Node.js fork, and everything worked as expected.

P.S. I've already tested this through the release CI and saw no issues there.

Diff: 307 lines (+307 / -0) across 2 files Reviewer: legendecas Review duration: 25930m
All Vouch review confidence checks passed
Residual risk 0.04 = Change Risk (0.39) × (1 − Review Confidence (0.91)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 307 lines diff across 2 files
0.39
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.94 · 2 substantive comment(s)
0.94
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
90%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.343
Real PR Conversation Timeline
4 items
nodejs-github-bot nodejs-github-bot commented on Nov 12, 2026 15:43 UTC
Bot

Review requested:

  • @nodejs/actions
  • legendecas legendecas commented on Nov 12, 2026 19:39 UTC
    Reviewer

    I'm not sure if we want to keep the generated data in the git and the repo history, even if its' not merged into the main branch. For each run and each platform, the generated data seems to be about ~10MB: https://github.com/JaneaSystems/node/actions/runs/42214152931

    StefanStojanovic StefanStojanovic commented on Nov 18, 2026 11:04 UTC
    Author

    Thanks for your feedback @legendecas. The original idea was to merge them into the branches we use to build releases, but the files are even bigger - a single profdata file is ~65 MB, and we'd have 2 of those added. Do you think it would be cleaner to make a separate repository just for profdata? The release job would then fetch it and check for the profdata it needs instead of looking for it in the Node.js repo. Do you have another idea on how to approach this?

    The workflow is straightforward, so once we agree on the complete PGO flow, I'll modify the last step to push the result where it is expected.

    Reviewers
    Assignees
    StefanStojanovic StefanStojanovic
    Labels
    risk: low confidence: 90.9% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 38.7% (MEDIUM) · Higher = larger blast radius
    38.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 90.9% · Lower = rushed or shallow review
    90.9%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 3.5% · Safe to merge
    3.5%
    Repository