Skip to content

[Research – do not merge] CI 10% probe: W1 base-layer change - #14633

Closed
Don Syme (dsyme) wants to merge 5 commits into
microsoft:mainfrom
dsyme:research/ci-10pct-layer
Closed

Don Syme (dsyme) wants to merge 5 commits into
microsoft:mainfrom
dsyme:research/ci-10pct-layer

Conversation

@dsyme

Copy link
Copy Markdown
Contributor

Research only. Do not merge. I'll close it once the run is measured.

Same stack as #14606 (#14630 + #14631, plus the research-only change-classification commit), with one probe commit: W1 base-layer change (src/Layers/W1/BaseApp).

Measures job-min per Pull Request Build run for this PR type, for the 10% ledger on #14597. Results go on #14606.

Related to #14597

Don Syme (dsyme) and others added 5 commits November 26, 2026 18:25
Re-wires the BuildOptimization test selection (microsoft#7392) that was dropped when
test projects moved to Invoke-PerProjectTestRun, and computes PR changes from
the PR merge commit so base-branch changes missing from a stale PR branch are
no longer treated as PR changes. Non-PR events still run every test app.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added Build: Automation Workflows and other setup in .github folder Build: scripts & configs Build scripts and configuration files labels Nov 26, 2026
@github-actions github-actions Bot added the From Fork Pull request is coming from a fork label Nov 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Could not find linked issues in the pull request description. Please make sure the pull request description contains a line that contains 'Fixes #' followed by the issue number being fixed. Use that pattern for every issue you want to link.

@github-actions github-actions Bot added the Team: Integrations GitHub request for Integrations area label Nov 26, 2026
@dsyme
Don Syme (dsyme) marked this pull request as ready for review November 26, 2026 18:39
@dsyme
Don Syme (dsyme) requested a review from a team November 26, 2026 18:39

Context "Select-TestAppsToRun" {
BeforeAll {
$selectCache = Join-Path ([System.IO.Path]::GetTempPath()) "BuildOptimization_Select_$([System.Guid]::NewGuid()).json"
Describe "PullRequestBuildScope" {
BeforeAll {
Import-Module "$PSScriptRoot\..\PullRequestBuildScope.psm1" -Force
$countries = @('AT', 'AU', 'CA', 'CH', 'CZ', 'DE', 'FR', 'MX', 'NZ', 'US')

Context "Get-PullRequestTestBuildModes" {
BeforeAll {
$modes = @('IntegrationTests', 'UncategorizedTests', 'LegacyTestsBucket1', 'LegacyTestsBucket2')
'{ "LegacyTests-Bucket1": [ "Tests-ERM" ] }' | Set-Content (Join-Path $root 'build/scripts/TestConfiguration.json')

$eventFile = Join-Path $root 'event.json'
$saved = @($env:GITHUB_EVENT_NAME, $env:GITHUB_EVENT_PATH, $env:GITHUB_STEP_SUMMARY)
if: github.event_name == 'pull_request'
shell: pwsh
run: |
Import-Module ./build/scripts/PullRequestBuildScope.psm1 -Force

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$\textbf{🟡\ Medium\ Severity\ —\ Security}$

This pull_request workflow step imports and executes the module from the checked-out pull request before initialization, so a contributor can run arbitrary repository code in a job that declares id-token: write and other elevated GitHub permissions. Move this logic to a trusted, pinned action or isolate it in a least-privileged workflow that does not expose write-capable tokens.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v10.0.7

@dsyme

Copy link
Copy Markdown
Contributor Author

Closing without merging: the W1 base-layer probe completed successfully (run 45877716069). It selected W1 only, but the layer change triggered the full-test fallback within that scope, including both legacy buckets. It used 152.9 GitHub-hosted job-min (1,154.3 across all runners). A cheaper W1 layer test profile is a separate follow-up, not a saving demonstrated here. See #14597.

This branch was successfully deployed

1 active deployment
triage — 0dd26d98 Deployed Nov 26, 2026 by dsyme via Classify team ownership #12246
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build: Automation Workflows and other setup in .github folder Build: scripts & configs Build scripts and configuration files From Fork Pull request is coming from a fork Team: Integrations GitHub request for Integrations area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants