Skip to content

Commit c0236be

Browse files
committed
ci(windows): run Windows MSVC tests on every PR and seed the cache from main
Prior to this change, the Windows MSVC lint and test job ran only on pull-request mirrors labeled test:windows. Most PRs never ran it, and main broke on Windows across five PRs before an unrelated labeled PR exposed 15 failing tests (#4861). The job also ran cold every time: the cache-seed job ran only on pushes to the windows branch, and GitHub scopes caches by branch, so pull-request mirrors could never restore that cache. Rust cache hits were 0% and each run took about 40 minutes. Now, every pull-request mirror runs the Windows lint and test job without a label. Pushes to main run the cache-seed job, which reports failures normally there, so a Windows break on main shows up within one merge. Main runs are not cancelled by later pushes, so each seed finishes. Pull-request runs restore the main cache but no longer save their own, since no other branch can restore it and saving it only evicts the main cache. Release-binary builds stay on the windows branch. The checks remain non-required for merging. CI.md, the Windows build skill, the principal engineer reviewer agent, and the gator gate skill no longer refer to the test:windows label. Signed-off-by: Kris Hicks <khicks@nvidia.com>
1 parent 92434dc commit c0236be

6 files changed

Lines changed: 34 additions & 29 deletions

File tree

‎.agents/skills/build-openshell-mxc-windows/SKILL.md‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -204,16 +204,16 @@ order:
204204
The GitHub Actions jobs layer architecture-specific `Swatinem/rust-cache`
205205
entries for Cargo registry and dependency target artifacts with sccache's GHA
206206
backend for cacheable Rust compiler outputs. Failed runs also save their usable
207-
dependency artifacts. Pull-request mirrors labeled `test:windows` run Clippy for the
208-
Windows-supported workspace and e2e crates plus Rust tests. Pushes to `windows` and
209-
manual dispatches on that branch run the same lint and test commands in a cache-seed job,
210-
followed by a dependent release-binary build job. The seed and PR jobs use the
211-
same cache namespaces, but pull-request mirrors cannot restore the
212-
`windows` branch cache because GitHub scopes caches by branch. Merge queues do
213-
not run this workflow. Release-branch seed
214-
and build jobs use job-level `continue-on-error: true`; opt-in PR jobs report
215-
failures normally. Applying the label alone does not start a run: re-run all
216-
jobs in the current mirror push run, or push a new mirrored commit. The binaries are not uploaded or published.
207+
dependency artifacts. Every pull-request mirror runs Clippy for the
208+
Windows-supported workspace and e2e crates plus Rust tests. Pushes to `main` and
209+
`windows` run the same lint and test commands in a cache-seed job; `windows`
210+
pushes and manual dispatches on that branch follow it with a dependent
211+
release-binary build job. GitHub scopes caches by branch, so pull-request
212+
mirrors restore the `main` cache and do not save their own. `main` runs are not
213+
cancelled by later pushes, so each seed finishes. Merge queues do not run this
214+
workflow. Release-branch seed and build jobs use job-level
215+
`continue-on-error: true`; `main` seed and PR jobs report failures normally. The
216+
binaries are not uploaded or published.
217217

218218
The ARM64 check/build steps in this x64-host contract are cross-builds. The
219219
wrapper discovers and adds host-native LLVM and Ninja to `PATH`, requires the

‎.claude/agents/principal-engineer-reviewer.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ When reviewing code or diffs:
6161
6. When suggesting a change, show the concrete fix — don't just describe it.
6262
7. If something is good, say so briefly. Positive signal is useful too.
6363
8. When behavior, commands, or development workflows change, consult the `sync-agent-infra` maintenance map and verify that related skills were updated. Apply its full consistency checklist when the changes add, remove, or rename skills or crates; change workflow relationships or skill coverage; modify issue or PR templates; or change agent cross-references. Report missing companion updates or drift as a warning.
64-
9. For pull request reviews, determine whether the changes affect Windows support. Changes to Windows or MSVC CI and `mise` tasks, Windows lock-file platform entries, the MXC driver, or `cfg(windows)` implementations and tests require the `test:windows` label. Report that requirement explicitly to the caller so the PR workflow can apply the label; label routing is review metadata, not a code-review finding.
64+
9. For pull request reviews, determine whether the changes affect Windows support. Changes to Windows or MSVC CI and `mise` tasks, Windows lock-file platform entries, the MXC driver, or `cfg(windows)` implementations and tests require passing x64 and ARM64 `Windows MSVC` checks, which run on every PR but are not required for merging. Report that requirement explicitly to the caller; check routing is review metadata, not a code-review finding.
6565
10. When the task includes a prior review feedback ledger, treat trusted resolved
6666
or explicitly waived findings as durable across later revisions. Do not
6767
re-raise the same finding with different wording unless the new diff

‎.github/workflows/windows-msvc.yml‎

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Windows MSVC
33
on:
44
push:
55
branches:
6+
- main
67
- windows
78
- "pull-request/[0-9]+"
89
workflow_dispatch:
@@ -12,7 +13,8 @@ permissions:
1213

1314
concurrency:
1415
group: ${{ github.workflow }}-${{ github.ref }}
15-
cancel-in-progress: true
16+
# Let main runs finish so they seed the cache that pull-request mirrors restore.
17+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1618

1719
env:
1820
# sccache cannot cache incremental Rust compilations, and rust-cache removes
@@ -27,21 +29,20 @@ jobs:
2729
contents: read
2830
pull-requests: read
2931
outputs:
30-
should_run: ${{ github.ref == 'refs/heads/windows' || steps.gate.outputs.should_run == 'true' }}
32+
should_run: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/windows' || steps.gate.outputs.should_run == 'true' }}
3133
steps:
3234
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3335

3436
- id: gate
35-
if: github.ref != 'refs/heads/windows'
37+
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/windows'
3638
uses: ./.github/actions/pr-gate
37-
with:
38-
required_label: test:windows
3939

4040
pr-check:
4141
name: PR lint and test (${{ matrix.arch }})
4242
needs: pr_metadata
4343
if: >-
4444
needs.pr_metadata.outputs.should_run == 'true' &&
45+
github.ref != 'refs/heads/main' &&
4546
github.ref != 'refs/heads/windows' &&
4647
github.event_name != 'workflow_dispatch'
4748
strategy:
@@ -92,7 +93,9 @@ jobs:
9293
with:
9394
shared-key: windows-msvc-${{ matrix.arch }}
9495
cache-targets: "true"
95-
cache-on-failure: "true"
96+
# Other mirrors cannot restore this branch's cache, so saving it only
97+
# evicts the main cache they do restore.
98+
save-if: "false"
9699
cache-bin: "false"
97100
- name: Lint Windows-supported crates
98101
run: mise run --skip-tools windows:lint:${{ matrix.arch }}
@@ -105,11 +108,11 @@ jobs:
105108
cache-seed:
106109
name: Seed cache (${{ matrix.arch }})
107110
# Keep release-branch Windows validation advisory while the lane matures.
108-
continue-on-error: true
111+
continue-on-error: ${{ github.ref == 'refs/heads/windows' }}
109112
needs: pr_metadata
110113
if: >-
111114
needs.pr_metadata.outputs.should_run == 'true' &&
112-
github.ref == 'refs/heads/windows'
115+
(github.ref == 'refs/heads/main' || github.ref == 'refs/heads/windows')
113116
strategy:
114117
fail-fast: false
115118
matrix:
@@ -156,7 +159,7 @@ jobs:
156159
cache-bin: "false"
157160
- name: Lint Windows-supported crates
158161
# Keep the seed workload identical to the pull-request workload so the
159-
# windows-branch cache reflects the same lint and test commands.
162+
# seeded cache reflects the same lint and test commands.
160163
run: mise run --skip-tools windows:lint:${{ matrix.arch }}
161164
- name: Test
162165
run: mise run --skip-tools windows:test:${{ matrix.arch }}
@@ -168,6 +171,7 @@ jobs:
168171
name: Build binaries (${{ matrix.arch }})
169172
continue-on-error: true
170173
needs: cache-seed
174+
if: github.ref == 'refs/heads/windows'
171175
strategy:
172176
fail-fast: false
173177
matrix:

‎CI.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,12 @@ For an intentional minor-train incompatibility, record the Buf finding,
6767
linked issue, consumer impact, and migration plan in the PR. Keep the finding
6868
visible; do not disable the job or add a broad Buf ignore rule.
6969

70-
Windows PR checks are opt-in: add `test:windows`, then select **Re-run all jobs**
71-
on the current Windows MSVC run. Subsequent mirrored commits run them automatically.
72-
Windows checks are not required for merging and do not run in merge queues.
73-
Main and manual runs also build release binaries, with `continue-on-error: true`
74-
so Windows failures do not fail the workflow.
70+
Windows MSVC lint and tests run on every mirrored PR commit. They are not
71+
required for merging and do not run in merge queues. Pushes to `main` run the
72+
same lint and tests to seed the Rust caches that PR runs restore; PR runs do not
73+
save caches. Pushes to `windows` and manual runs on that branch also build
74+
release binaries, with `continue-on-error: true` so Windows failures do not fail
75+
the workflow.
7576

7677
### Advisory compatibility review
7778

‎scripts/agents/gator/bin/review_feedback_ledger_test.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,9 @@ rg -q 'alone is not a process blocker' \
449449
"$GATOR_DIR/skills/gator-gate/SKILL.md"
450450
rg -q '`test_dispatch_required`' \
451451
"$GATOR_DIR/skills/gator-gate/SKILL.md"
452-
rg -q 'Apply `test:windows` whenever a PR affects Windows support' \
452+
rg -q 'treat both Windows checks as required gates' \
453453
"$GATOR_DIR/skills/gator-gate/SKILL.md"
454-
rg -q 'require the `test:windows` label' \
454+
rg -q 'require passing x64 and ARM64 `Windows MSVC` checks' \
455455
"$GATOR_DIR/../../../.claude/agents/principal-engineer-reviewer.md"
456456
rg -q 'attacker_or_operator_prerequisite' \
457457
"$GATOR_DIR/skills/gator-gate/references/review-findings-schema.md"

‎scripts/agents/gator/skills/gator-gate/SKILL.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ Use `test:e2e` for Helm, Agent Sandbox CRDs, Kubernetes scheduling, namespace, w
944944

945945
Add `test:e2e-kubernetes` for gateway high availability or Kubernetes Secrets and Vault credential driver storage. It runs only the HA and credential-driver suites, so apply it alongside `test:e2e` when other Kubernetes coverage is also needed.
946946

947-
Apply `test:windows` whenever a PR affects Windows support. This includes Windows or MSVC CI and `mise` tasks, Windows lock-file platform entries, the MXC driver, and `cfg(windows)` implementations or tests in otherwise cross-platform crates. Apply it alongside any applicable E2E label; it is not a substitute for runtime coverage.
947+
Windows MSVC checks run on every PR without a label. When a PR affects Windows support, treat both Windows checks as required gates. This includes Windows or MSVC CI and `mise` tasks, Windows lock-file platform entries, the MXC driver, and `cfg(windows)` implementations or tests in otherwise cross-platform crates. The Windows checks are not a substitute for runtime coverage.
948948

949949
After applying a `test:*` label, read the bot comment that is posted by the E2E Label Help workflow and follow its instructions.
950950

@@ -996,7 +996,7 @@ Required gates include at least:
996996
- `OpenShell / Trivy Changes`
997997
- `OpenShell / E2E` when `test:e2e` is applied
998998
- `OpenShell / GPU E2E` when `test:e2e-gpu` is applied
999-
- Both x64 and ARM64 `Windows MSVC / PR lint and test` checks when `test:windows` is applied
999+
- Both x64 and ARM64 `Windows MSVC / PR lint and test` checks when the PR affects Windows support
10001000

10011001
If checks are pending, wait a reasonable interval and re-check.
10021002

0 commit comments

Comments
 (0)