Skip to content

ci: Windows burn-down - #1335

Merged
AnthonyRonning merged 3 commits into
masterfrom
ci/windows-burndown
Oct 28, 2026
Merged

AnthonyRonning merged 3 commits into
masterfrom
ci/windows-burndown

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

This PR applies the owner-approved items 1–10 from the 2026-10-27 Windows CI audit. The diff is 27 files, +381/−845, with four scripts deleted. Per the audit's estimate, each Agent master push saves about 100 runner-minutes (roughly $6–8). Agent PRs also get Windows compile coverage on every change.

Cut

  • windows-app-typecheck.ps1 (63 lines). Its cargo check -p maple-agent-app --all-targets is a subset of Windows Clippy (--workspace --all-targets). It cost 10–12 min on 59% of Agent PRs (11.3 of the lane's 12.4 min). In three days it caught nothing that Clippy or the Linux and macOS lanes missed.
  • The bespoke updater harness:
    • windows-updater-tests.ps1 (194 lines), test_windows_updater_workflow.py (196 lines), the receipts artifact and the hand-copied 66-name test list.
    • Replaced by a plain cargo test -p maple-agent-updater --locked, which runs every test that list named.
  • install-windows-minisign.ps1 (51 lines). The same updater .sig is still checked with the pinned minisign by:
    • verify-windows-desktop-artifacts (master, ci_evidence);
    • verify-windows-desktop-release-artifacts (gates latest.json);
    • latest-json.sh.
  • Research Windows sccache. It had 0 hits out of 891 on the first 16-core build, because the key bakes in C:\a vs D:\a. It held 777 MB. Contract C4 drops Windows-sccache- in lockstep.
  • The Agent Dev Windows chain on master pushes (about 40 runner-min per push). It now runs on workflow_dispatch only.
  • research-desktop-windows-verify is folded into research-desktop-windows: same verifier, same checks, one job fewer.
  • The Git Bash smoke in Agent windows-build. Nothing in the chain launches bash from Python.

Moved

Lane / job Before After
agent-windows (Clippy, Blacksmith) Windows paths only (16% of Agent PRs) Every Agent PR, about 4 min (≈$0.13); labels unchanged
agent-windows-updater 59% of Agent PRs plus every master push, 10–21 min Updater crate, windows_bootstrap.rs and Windows toolchain paths (12% of Agent PRs), plus nightly and ci:windows/ci:full. Matrix lane on maple-windows-2025-16core with rust-cache. The tests themselves take about 41 s
agent-full-windows Every Agent master push, about 47 min Nightly (which saves its cache) and ci:windows/ci:full, on the free windows-2025
research-desktop-windows Blacksmith, about 28 min; ci:windows/ci:package/ci:full maple-windows-2025-16core, about 13 min (estimate); ci:package/ci:full plus its own paths
desktop-build build-windows (signed Research, master) maple-windows-2025-16core (23.3 min) Free windows-2025 (44.6 min measured on 4-core), saving about $270/month. The release preflight still needs it green on the release commit
release.yml build-windows maple-windows-2025-16core Unchanged

Fixed

  • Artifact Signing installer. It retries 4 rounds with backoff and falls back to https://cdn.powershellgallery.com/packages/artifactsigning.0.1.8.nupkg. It keeps the same pinned 0.1.8, checks the same SHA-256 after every download, and throws naming both URLs.
    • desktop-build and release build-windows now install the module before the compile.
    • On 10-27 this download caused 3 of 5 Research Windows failures and both Agent signing failures, each after a ~35-min compile.
    • What is signed, and how, is unchanged.
    • Still after the compile: the module's own NuGet fetches and the Azure login.

What stays

  • The Prod consumer gate, on every Agent master push: Build Windows binary (prod), Signed Windows (prod), and Verify downloaded Windows (prod) with its fresh install, repeat install and uninstall smoke.
    • The artifact maple-agent-prod-windows-x86_64-RUN is unchanged.
    • publisher.py and ci_evidence.py are unchanged.
    • Contract C2 now evaluates the matrix per event, so a push that drops Prod fails the test.
  • Agent windows-build keeps the PE-metadata parser fixture and the restricted-job host-spawn test, which nothing else in the chain re-runs. It stays on maple-windows-2025-16core.
  • macOS and Linux Dev/Prod are unchanged.

Guardrails

  • The policy test pins the set of workflows that may run on pull_request/merge_group.
  • It names the GitHub larger runner by its exact label, maple-windows-2025-16core.
  • It decides which jobs write GitHub's cache store by vendor, so a future larger runner cannot save there unlisted.
  • AGENTS.md "CI rules for agents" now says:
    • never use [skip ci]/[ci skip];
    • never write tests that assert script or YAML text;
    • never hand-copy test-name lists;
    • change checks only through lanes.py.

Quarantine switch

Set the repository variable CI_QUARANTINE (Settings → Secrets and variables → Actions → Variables) to comma-separated lane ids, for example agent-windows-updater. No PR is needed.

  • A quarantined lane still runs, and its own check shows its real result.
  • ci-ok turns its failure into a ::warning:: naming the lane. In the nix/windows matrices, it reads the run's job results so a failing neighbour still blocks.
  • An unknown id fails plan. So does repo, which enforces the workflow policy and the release contracts.
  • The nightly report lists every active quarantine, so the ci-nightly issue stays open until the variable is cleared.
  • The variable is empty by default, so nothing changes until it is set.

Accepted residuals

  • The native updater tests no longer run on master pushes (nightly only). A Cargo.lock or workspace Cargo.toml bump no longer selects them on a PR, although Windows Clippy still compiles everything.
  • The required-name, no-ignored and non-empty-suite guards are gone, so a cfg change that empties a suite would pass silently. native_reparse_fixtures_are_available still fails without the symlink privilege.
  • cargo test fails fast: a lib failure skips the bootstrap test binary.
  • The tests now run in parallel. The old harness used --test-threads=1, and this PR's run is their first parallel run on 16 cores.
  • The harness's check that powershell.exe carries a valid Microsoft signature is gone. The Authenticode test comments now say what is still checked.
  • A wrong-key Windows updater .sig would be attached to a GitHub Release before verify-windows-desktop-release-artifacts fails. latest.json stays blocked, and desktop-build's verify job catches the same key drift on every Research master push.

Not in this PR

  • Deleting agent-windows-signature-probe.yml and windows_signature_reference.py. This waits for the Windows owner's historical-signature fixture test.
  • signing-credentials-check.yml, the dead secrets and the settings clicks.
  • The ruleset that requires ci-ok.

Owner follow-ups

  1. Require ci-ok in its own ruleset, with no bypass. It would have blocked PR #1330 (third-party notice removal) and PR #1322 (Windows installer permissions, merged with [skip ci]).
  2. Set CI_QUARANTINE only for known master breakage, and clear it when the lane is fixed.
  3. Delete signing-credentials-check.yml and the dead secrets.
  4. Retire the signature probe after the Windows owner's historical-signature fixture lands.
  5. Require a signed version-to-version upgrade proof on Windows before enabling Windows auto-updates.
  6. Decide the Agent windows-build runner (Blacksmith or 16-core) after warm measurements. The audit's default is Blacksmith unless warm 16-core is at least 25% faster.

What this PR's run proves

This PR carries the labels ci:windows and ci:package.

  • Without labels:
    • agent-windows: Clippy on Blacksmith.
    • agent-windows-updater: the Authenticode comment edit is in the updater crate, so this is the first parallel run on 16-core. Expect 88 lib + 5 windows_bootstrap_native tests passed, 0 ignored.
    • research-desktop-windows: on 16-core, with its in-job verify.
    • repo: actionlint, policy, contracts C1–C7, release gates and publisher tests.
  • ci:windows adds agent-full-windows on the free windows-2025, about 47 min uncached.
  • ci:package adds agent-package-windows and the Research desktop packages.
  • Proven only after merge:
    • the Prod-only Windows chain and the publisher inventory, on the next Agent master push;
    • Dev and Prod together, on a manual agent-desktop-build.yml dispatch;
    • desktop-build build-windows on windows-2025 without sccache, on the next Research master push;
    • release build-windows without sccache or minisign, on the next release;
    • the nightly cache saves.

Locally, all of these pass:

  • plan.py lint;
  • the scripts/ci suite (499 tests);
  • the publisher tests (133);
  • test_ci_evidence.py (21);
  • test-release-gates.sh (31/31);
  • actionlint;
  • nix flake check --no-update-lock-file.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@AnthonyRonning AnthonyRonning added ci:windows Run Windows checks on this PR ci:package Build unsigned packages on this PR labels Oct 27, 2026
AnthonyRonning and others added 3 commits October 28, 2026 00:22
- agent-windows (Windows Clippy, Blacksmith) runs on every Agent PR; the
  Windows app typecheck script, which Clippy covers, is gone.
- agent-windows-updater is a plain windows-matrix lane:
  `cargo test -p maple-agent-updater --locked` on maple-windows-2025-16core
  with its own rust-cache, for updater paths, the Windows bootstrap and the
  Windows toolchain, on PRs, nightly and by label. The bespoke harness, its
  receipts artifact, the hand-copied test-name list and its text test are
  deleted.
- agent-full-windows runs nightly and by label (ci:windows, ci:full) on the
  free windows-2025 (GITHUB_WINDOWS_FREE); the nightly run saves its cache.
- research-desktop-windows moves to maple-windows-2025-16core, drops
  ci:windows, and verifies its own proofs in the build job, replacing
  research-desktop-windows-verify.
- Policy: GITHUB_HOSTED names the exact larger-runner label; a test pins
  the workflows that run on pull requests; AGENTS.md forbids skip-CI
  titles, script- or YAML-text tests and hand-copied test lists.
- CI_QUARANTINE (repository variable): quarantined lanes still run and show
  their result, but ci-ok reports their failure as a warning. Unknown ids
  fail the plan; the nightly report lists active quarantines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner-approved changes to the Windows producer and release workflows. The
Prod job names, artifact names and ci_evidence jobs are unchanged.

- agent-desktop-build.yml: the Dev Windows chain (build, sign, verify) runs
  only on a manual dispatch; master pushes build, sign and verify Prod as
  before, including the install, repeat-install and uninstall smoke. The
  build drops two in-chain duplicates: the PE-metadata fixture (the same job
  then checks the real binary's .maple section) and the Git Bash check (the
  setup action already needs Git Bash). The restrictive-job host-spawn test
  stays: nothing else in the chain checks it.
- desktop-build.yml build-windows goes back to the free windows-2025, and the
  Research Windows sccache is gone from it and from release.yml (the C:\a vs
  D:\a key never hit). release.yml build-windows stays on the 16-core runner.
- install-windows-artifact-signing.ps1 retries the PowerShell Gallery and its
  CDN, four rounds with backoff, and accepts only the same pinned SHA-256.
  Both Research build-windows jobs install it before compiling.
- install-windows-minisign.ps1 is deleted. It only re-verified the fresh
  updater signature, which the Linux verifiers and latest-json.sh check
  before any latest.json names it.
- test_contracts.py evaluates the variant matrix per event, so C2 now fails
  if a push stops building a Prod job; the Windows sccache prefix is dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- agent-desktop-build.yml windows-build keeps the PE-metadata fixture: its
  hermetic parser tests run nowhere else in the publisher's chain.
- research-desktop-windows also selects the verifier and _common.sh, which
  only it runs in Git Bash.
- CI_QUARANTINE refuses repo, the lane that enforces the contracts.
- The GitHub-store writer policy uses lanes.cache_store, so a future larger
  runner cannot save there unlisted.
- A green night with only quarantines reads as passed.
- Docs: runner wording, the fail-fast covers the module download only.
- Updater test comments no longer cite the deleted harness.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AnthonyRonning
AnthonyRonning merged commit ba50f24 into master Oct 28, 2026
69 of 73 checks passed
@AnthonyRonning
AnthonyRonning deleted the ci/windows-burndown branch October 28, 2026 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:package Build unsigned packages on this PR ci:windows Run Windows checks on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant