Repository navigation
[Experiment] Measure x64 PR test compilation - #1948
Draft
Huzaifa Danish (huzaifa-d) wants to merge 3 commits into
Draft
Huzaifa Danish (huzaifa-d) wants to merge 3 commits into
Huzaifa Danish (huzaifa-d) wants to merge 3 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The expected tampered-bundle rejection leaves $LASTEXITCODE nonzero, failing the CI job and preventing compilation measurements and cache saving.
2 open issues
What changed in this PR
Temporary, do-not-merge diagnostics for MXC’s Windows x64 PR test compilation. Existing required checks and scheduled validation remain unchanged.
Changes:
- Compare eight variants covering caches, snapshots, parallelism, sccache, probe features, and isolated NVX builds.
- Verify runtime signatures before measuring test compilation.
- Add content-aware restoration, regression tests, and experiment guidance.
| File | Description |
|---|---|
| scripts/tests/x64-ci-snapshot-experiment.test.js | Tests timestamp preservation and restore safety. |
| scripts/tests/x64-ci-experiment-workflow.test.js | Checks experiment wiring and verification order. |
| scripts/ci/x64-ci-snapshot-experiment.ps1 | Preserves timestamps for unchanged runtime bundles. |
| docs/development/build-and-test/ci-validation-infrastructure.md | Documents experiment isolation and warm-cache measurements. |
| .github/workflows/Experimental.Windows.X64.Job.yml | Runs compilation variants and uploads timings. |
| .github/workflows/Build.yml | Calls the PR-only experiment after the Windows build. |
Review effort: Max
| $exitCode = $LASTEXITCODE | ||
| $watch.Stop() | ||
| Write-Host "MXC_EXPERIMENT_WORKSPACE_COMPILE_SECONDS=$($watch.Elapsed.TotalSeconds)" | ||
| if ($exitCode -ne 0) { throw 'Compiling workspace tests failed.' } |
Comment on lines
+60
to
+61
| SCCACHE_GHA_ENABLED: "off" | ||
| SCCACHE_CACHE_SIZE: 512M |
| - name: Point cargo at the MxcDependencies feed | ||
| uses: ./.github/actions/setup-cargo-feed | ||
|
|
||
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


📖 Description
Temporary diagnostic draft; do not merge. Compare x64 PR test compilation with separate workspace-cache, content-aware snapshot, Cargo concurrency, local sccache, filesystem-probe feature and isolated NVX-target experiments. Existing required checks and scheduled validation remain unchanged. The experimental cache keys include the exact PR commit; warm-cache measurements require a same-commit rerun. Signature verification and tamper rejection run before the experimental test builds.
🔗 References
N/A — temporary performance investigation.
🔍 Validation
node --test scripts\tests\x64-ci-snapshot-experiment.test.js scripts\tests\x64-ci-experiment-workflow.test.js scripts\tests\cargo-build-snapshot.test.js scripts\tests\w365-fixtures.test.js— passed, 42 tests.node --test scripts\tests\microvm-validation.test.js— passed, 76 tests.go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12 .github\workflows\Build.yml .github\workflows\Experimental.Windows.X64.Job.yml— passed.cargo --config ..\.azure-pipelines\.cargo\config.public.toml test --locked --offline --release --target x86_64-pc-windows-msvc -p mxc-sdk --no-default-features --features microvm --test nvx_bundle_integrity --color never -- --exact crate_staged_bundle_opens_and_rejects_an_unverified_library --nocapture— passed locally with an isolated target.cargo --config ..\.azure-pipelines\.cargo\config.public.toml test --locked --offline --release --target x86_64-pc-windows-msvc -p mxc-sdk --no-default-features --features microvm --test nvx_bundle_integrity --color never -- --exact signatures_reject_unsigned_tampered_and_other_publishers --nocapture— passed locally with an isolated target.gh run view 47457162720 --repo microsoft/mxc --attempt 1— passed; all eight x64 experiment variants passed.gh run view 47467439794 --repo microsoft/mxc --attempt 1— passed after a no-source-change PR push; all eight variants passed.gh run view 47467439794 --repo microsoft/mxc --attempt 2— passed on the same commit; all eight variants passed. The required and experimental workspace suites each reported 5,280 passed and 76 ignored results.The local-only sccache variant restored its cache on the same-commit rerun (100 hits, three misses); its minimal-feature NVX step fell from 291s to 45s. Its full experimental job fell from 1,695s to 1,322s, including its independent signature verifier. These are single runs on different VMs; the cache key changes on a new commit, so this is not evidence of faster new PR pushes. The normal and content-aware workspace-cache variants missed their caches on the rerun and preserved zero bundles, leaving their warm-cache comparison incomplete. Four-versus-eight Cargo jobs and probe feature variants had variable results; the probe feature sets are not equivalent. No production optimisation is established by this draft.
A separate local-only check built the same source tree at two different Git commits using fresh target directories and a shared local sccache. The second build had 178 Rust cache hits and no misses, and fell from 188s to 30s. The resulting Windows daemon carried the correct new commit in its version resource, and the minimal-feature NVX regression passed using the full-feature fixture and isolated local state. This is one local pair, not a hosted cross-commit PR-push result; source changes, procedural macro inputs and cache trust remain to be tested.
✅ Checklist
feature-acceptedCargo.lock, thedependency-feed-checkcheck passes (see pull request builds)📋 Issue Type
Microsoft Reviewers: Open in CodeFlow