Skip to content

arm64: enable the existing managed sandbox - #1510

Draft
Gautam Ahuja (ahuja-gautam) wants to merge 4 commits into
gautamahuja-microsoft-nvx-phase-1-prfrom
gautamahuja-microsoft-nvx-phase-2-pr
Draft

Gautam Ahuja (ahuja-gautam) wants to merge 4 commits into
gautamahuja-microsoft-nvx-phase-1-prfrom
gautamahuja-microsoft-nvx-phase-2-pr

Conversation

@ahuja-gautam

@ahuja-gautam Gautam Ahuja (ahuja-gautam) commented Nov 12, 2026 •

Copy link
Copy Markdown

Refs #1509

What and why

Current captured-snapshot status: actual Draft, base
3103f24c292f82907c77dda5cd9d8c105b608971, head
aacccd99e132233f4ae6e440b30aeadf941031f4, tree
14d9c35296ddc44615a009ec4816a5850027e182. This layer is four single-parent
commits on the captured NVX dev baseline
c9817ae73263a0c32498dd43ebeb089164af8cbe (the merged v6.1/1567 baseline),
not latest dev. Later observed 1ad73759... and its 09cd771c... pin
are not included or validated here.

The lower inherited OpenVMM pin is
73cf403574a8907ee94dab0ab9d648152b832b05, not historical 5d656d85... or
Phase 3's feature pin b09c5884.... All four Phase 2 patches replayed
identically (range-diff = and matching stable patch IDs), preserving
public-path admission, short-TEMP refusal, ARM debug ISA/config admission,
recovery hints, lower restore readers, and upstream fixture fixes.
The exact layer audit remains 60 existing-test changes, 21 additions.

The upper PR's published 24bdced0... selects b09c5884...; the whole stack
has 16 single-parent commits above captured c981 and no new merge commits.
Its integrated runtime evidence is applicable by preserved production-input
identity, not a claim of reexecution at each final head. Overall
qualification is not green
: the Windows privilege and host clock/service
failures and the proof limits below remain.

Historical initial-publication record: the frozen identities and
publication-only statements below describe the original snapshot, not the
current head or new qualification.

Historical captured-C5/413586/5d status (superseded): actual Draft, base
f925fcd32110a280ae89b515af4da51521c3b02d, head
41358684863a511d63f747c50f6368b4b6e214c0 (four single-parent commits).
The baseline is captured dev c5fdc8b850c63dcb0dddb1a1a6ede5a42a20d692,
not latest dev; later 24fa7233... and its PIT pin were not taken in.
This lower layer inherits OpenVMM
5d656d854a8daca0f23833666b0b71229fe2ab73, not Phase 3's separate 6036d7ee...
feature pin.

The current review fixes carry selected ISA through ARM Image-debug time
checks, validate its matching config with the existing watchdog guard before
scenarios start, and recommend the ARM distro producer plus namespaced
scratch output. X86 behavior and lower restore-option detection are preserved.
The exact layer audit is 60 existing-test changes, 21 additions; the
latest two-file config fix updates the valid ARM fixture and adds positive
and each-missing-detector refusal coverage.

Phase 2 of the three-phase ARM64 stack depends on
Phase 1 and enables the existing
managed sandbox with native local artifacts. This is publication of the frozen commit
cb017cf8aee13e5e7276236d1b0ab328e1b52e7f, not a rewrite or a rebase onto
current dev. The review delta is only
791efdd345d0f888f3db8e63d9398ce60e382f92..cb017cf8aee13e5e7276236d1b0ab328e1b52e7f
(40 files), not the combined Phase 1 and Phase 2 delta.

  • Select native local artifacts in the existing sandbox CLI and runtime
    adapter; validate the ARM kernel Image, matching initramfs architecture
    manifest, and Windows OpenVMM PE identity before launch. Preserve the legacy
    artifact API's x86 default.
  • Produce ARM Ubuntu EROFS layers through the maintained producer, with
    architecture-qualified paths, package inputs, and manifests. Export them
    through the ARM Docker artifact target.
  • Preserve the canonical ISA-neutral scratch format: correct unsigned
    directory-hash selection with the same e2fsprogs package and recompute its
    checksums, leaving already-canonical x86 bytes and the pinned hash unchanged.
  • Reuse the existing managed, policy, lifecycle, proxy-only, and RAM-upper
    fixtures for native artifacts. Public sandbox options, saved formats,
    control protocols, and the one-VP CLI lifecycle contract do not change.
    ARM snapshot modes and release-catalog/download qualification remain excluded.

The sole parent is 791efdd345d0f888f3db8e63d9398ce60e382f92; the exact tree
is 61959019583b0f95d30f30188273fe342a57b832. The historical OpenVMM gitlink
remains 61cdd63978ea58ce045d159208ed4ca22f30cbb8, unchanged in this layer.
The eventual Phase 3 PR owns combined ARM pin/CI integration, including the
advance to 38016f6637f0c61fb55c9ee31033ceec428e346c; this lower historical
slice is not being presented as independently qualified with that newer VMM.

Validation

Current bounded evidence

This refreshed Phase 2 source has the same four patches as the preserved
layer. The local replay stage ran only the affected Python and static checks
below; no new Phase 2 Rust artifact tests or native VM tests were run.
Earlier 25-test Rust/product results remain historical receipts, not new
results for aacccd99. This description update ran no tests or builds.

Exact command/check already run on the refreshed Phase 2 layer Result
python scripts\nvx.py verify Passed with the exact clean inherited 73cf4035... submodule.
python -m unittest scripts.test_time_abi.MonitorTests scripts.test_microvm_tests.GuestConsoleEchoTests scripts.test_microvm_tests.MicrovmTests.test_arm_debug_kernel_requires_each_detector_before_running_scenarios scripts.test_microvm_tests.MicrovmTests.test_arm_debug_boot_passes_selected_architecture_to_the_shared_monitor scripts.test_microvm_tests.MicrovmTests.test_debug_kernel_runs_the_same_host_restore_scenarios_on_vmlinux_debug scripts.test_microvm_tests.MicrovmTests.test_arm_missing_sandbox_inputs_recommend_matching_producer_outputs scripts.test_microvm_tests.MicrovmTests.test_invalid_script_counter_architecture_fails_before_process_start scripts.test_microvm_tests.MicrovmTests.test_public_sandbox_scenarios_need_their_artifacts_before_any_runs scripts.test_guest_binaries.GuestBinaryArchitectureTests.test_distro_cli_selects_architecture_qualified_work_and_output scripts.test_guest_binaries.GuestBinaryArchitectureTests.test_arm_distro_producer_uses_matching_root_packages_and_manifest scripts.test_guest_binaries.GuestBinaryArchitectureTests.test_arm_public_scenarios_require_namespaced_matching_layer_inputs scripts.test_guest_binaries.GuestBinaryArchitectureTests.test_arm_lifecycle_identity_fixture_uses_matching_provenance scripts.test_guest_binaries.GuestBinaryArchitectureTests.test_arm_microvm_runner_selects_image_and_requires_explicit_scenarios -v Passed: 35 targeted tests. Guest/process/producer calls are mocked; this is harness/subset evidence.
Ruff format --check and check on the 15 affected Python files in the retained local handoff Passed, no source reformatting needed.
Strict Pyright on the same 15 affected files, --pythonplatform Linux and --pythonplatform Windows, with explicit --pythonpath to the existing maintained interpreter Passed: 0 errors, 0 warnings on both. The original yaml-source warning and its interpreter-selection diagnosis are retained; no dependency installation was needed.
python scripts\check_test_layout.py and python scripts\check_markdown_links.py Passed; explicit exit-code receipts retained for the silent checks.
python scripts\check_test_changes.py --base 3103f24c292f82907c77dda5cd9d8c105b608971 --head aacccd99e132233f4ae6e440b30aeadf941031f4 Passed: 60 existing-test changes, 21 additions in this exact four-commit layer.
Four-commit range-diff, per-commit stable patch identities, lower restore-reader ASTs, frozen-baseline fixture blobs, clean index/submodule, and preserved original Rust-product hashes Verified unchanged; no feature drop or duplicate upstream fixture port.

The local source and command receipts are retained in
review-fixes\baseline-refresh-20261113-c981, including
final-local-source-proof.json and final-lightweight-handoff.json.

Integrated Phase 3 execution: applicability and remaining failures

The independently supplied sealed handoff
C:\Users\gautamahuja\aci\phase3-refresh-20261113\evidence\final-phase3-refresh-qualification-handoff.json
was read and its exact SHA-256 verified:
4877476782c70b72978e7060b41f249429341c49246e32e1e5cb05d2c4d9f83a.
These are the validator owner's results, not additional tests run by this
Phase 2 description update.

Actual runtime execution used NVX
2000aa078713467add77565acdae688a6d6ecfcf with OpenVMM
b09c58843ae310dfff9ae68e9e822f9c5846b914, normal native ARM64
openvmm 0.5.0, executable SHA-256
f171f776a76c7aeef5faae7221e7a508d4d3de48f7e62f227bc7fbc372eb7653.
Its measured build profile was opt-level 0, not inferred from a directory name.

  • Passed runtime scope: 173 CLI commands: 45 cold commands/53 scenario
    records and 128 repeat commands/135 records; 115 adapter cases across
    nine targets; 833 real guest tests with the exact 12 ignored names retained.
    The 46 adapter snapshot exclusions are not passes.
  • Eight real ARM debug cells and eight explicit AUTO/HOST profile cells
    passed, covering the selected 1/2/4/8-VP SMP/sample/warp scope. Scratch and
    RAM each completed ten Start/Stop cycles under one provision. These remain
    the exact performed cells, not an unrestricted platform matrix.
  • Final NVX 24bdced073a24418c1ebbf1d0775bb5ba42266ba is one test-only append
    to 2000, changing two files/three methods. All 1032 production-input rows
    are identical, SHA-256
    73ae1805271658bcb25d876f5bd113afee42a70a05830713901ae56abdd0da28.
    Runtime applicability uses that entire input identity and retained bridge
    receipt SHA-256
    7787029762c5560e2420c41a8986bc9c2839d27078cd5ab484c395d58cc4c3b0;
    it is not new-head runtime reexecution.
  • The actual 24bd full Python run counted 2255 tests: zero assertion-failed
    methods; three Windows 1314 setup-error records in two baseline Ubuntu
    methods; 107 skip records (104 whole-method skips and three subcase skips);
    2147 complete-success methods and two partially skipped methods. The
    corrected six targeted methods and current static/language checks passed.
    The original 2000 assertion failures and corrected accounting receipts
    are retained; skipped subcases are not covered.

Overall qualification remains NOT GREEN. The Windows adapter host
library had 57 passes and one baseline failure (1314 mapped as Uncategorized
instead of PermissionDenied); the two Ubuntu setup methods above remain
blocked by Windows symlink privilege. Full doctor exited 1: H4 failed with
UTC free-running and H7 failed with W32Time off. H1/H2/H3/H5/H6 passed on the
full 13-sample/10-second schedule; H5 measured 26 ns offset/156 ns uncertainty
over 66 pairs, and H6's actual eight-VP/128-MiB idle 0.1/1/5/1 scope measured
52 ns offset/391 ns uncertainty with no backward time. No host, service,
security, or threshold changes waived these failures.

Normal-product ARM capture refusal was demonstrated with the cold-only
error. Normal-product restore refusal was not proved (the retained
attempt failed before manifest admission), and deterministic bounded
VP0/AP-latch overlap was not proved. Snapshots remain unsupported.
Native ARM NVX CI, trusted upstream OpenVMM CI, physical x86,
Linux/KVM/MSHV, NetworkService, and synchronized-UTC qualification are not
claimed. All PRs remain actual Draft; no trial trust bypass, Ready, CI
dispatch, or merge was enabled.

Historical 413586 bounded evidence (superseded)

The latest 41358684 follow-up changed Python only. Its retained red/green
receipts show the old ARM branch did not read the config or refuse either
missing detector; the fixed branch refuses both before scenarios run.
No new test campaign was run for this metadata update.

Exact command/check already run Result
python -m unittest scripts.test_microvm_tests.MicrovmTests.test_arm_debug_kernel_requires_each_detector_before_running_scenarios scripts.test_microvm_tests.MicrovmTests.test_arm_debug_boot_passes_selected_architecture_to_the_shared_monitor scripts.test_microvm_tests.MicrovmTests.test_debug_kernel_runs_the_same_host_restore_scenarios_on_vmlinux_debug scripts.test_microvm_tests.MicrovmTests.test_arm_missing_sandbox_inputs_recommend_matching_producer_outputs scripts.test_microvm_tests.MicrovmTests.test_invalid_script_counter_architecture_fails_before_process_start scripts.test_time_abi.MonitorTests -v Passed: 22 tests, 0 failures. Guest/process/builder calls are mocked; this is harness evidence.
python scripts\nvx.py verify and python scripts\check_test_layout.py Passed for the latest focused fix.
python -m ruff format --check scripts\nvx_tools\microvm_tests.py scripts\test_microvm_tests.py and python -m ruff check scripts\nvx_tools\microvm_tests.py scripts\test_microvm_tests.py, using the existing maintained Python environment Passed.
python -m pyright --pythonplatform Linux scripts\nvx_tools\microvm_tests.py scripts\test_microvm_tests.py and the same selection with --pythonplatform Windows, in that environment Passed: 0 errors on both.
python scripts\check_test_changes.py --base f925fcd32110a280ae89b515af4da51521c3b02d --head HEAD at 41358684 Passed: 60 existing-test changes, 21 additions.
Scoped Rust proof at unchanged predecessor 4bef5ffa...: artifact unit selector (25 tests), batch-refusal selector under short and normal TEMP (1 each), Clippy, rustdoc, and rustfmt Passed on native ARM64 Windows before this Python-only append. Not rerun or relabeled as native guest/VM evidence for 41358684.

No native ARM debug-kernel qualification, full matrix, or passing CI is
claimed. Earlier Win1314/emulation limitations remain; the separate new-host
UTC H4 failure remains unqualified, and normal OpenVMM trust gates are not
waived. All three PRs remain actual Draft; no CI/Ready/merge was enabled.

Historical publication evidence

This session performs publication only. No source edits, builds, test
execution, VMs, Docker runs, package installation, host preparation, CI
dispatch, or merge actions were performed.

Check Result
git show -s --format='%H%n%P%n%T%n%s%n%b' cb017cf8aee13e5e7276236d1b0ab328e1b52e7f Passed: exact frozen commit, sole parent, tree, and existing commit message verified.
git ls-tree cb017cf8aee13e5e7276236d1b0ab328e1b52e7f -- openvmm Passed: historical gitlink remains 61cdd63978ea58ce045d159208ed4ca22f30cbb8.
git merge --ff-only --no-edit cb017cf8aee13e5e7276236d1b0ab328e1b52e7f Passed: owning branch fast-forwarded from the exact Phase 1 commit; no new commit created.
git status --porcelain=v1 Passed: clean before and after the fast-forward and push.
gh api repos/microsoft/nvx/git/ref/heads/gautamahuja-microsoft-nvx-phase-2-pr --jq .object.sha Passed after push: remote SHA is exactly cb017cf8aee13e5e7276236d1b0ab328e1b52e7f.
python scripts\check_test_changes.py --base 791efdd345d0f888f3db8e63d9398ce60e382f92 --head cb017cf8aee13e5e7276236d1b0ab328e1b52e7f Passed: read-only audit found 56 existing-test changes and 15 additions; this does not execute tests. The exact layer base is intentional, rather than the advanced origin/dev.

Historical qualification supplied by the coordinator includes representative
native run116: 818 passed, 0 failed, 12 ignored. It was not rerun here,
and its exact invocation was not independently reconstructed in this
publication session. This is not a blanket all-platform-green claim.
The previously recorded Windows Win1314 and actual-x86-under-emulation
limitations remain unresolved. Fresh ARM producers and final combined
qualification belong to the separate Phase 3 validation owner.

The documented quality, Rust/runtime-adapter, and CLI gates in
.github/actions/check-quality/action.yml,
.github/actions/check-nvx-rs/action.yml, and
.github/actions/validate-nvx/action.yml were inspected, not rerun.
python scripts\nvx.py verify,
python scripts\local_gates.py --base origin/dev --run,
python scripts\check_test_layout.py, Rust formatting/lint/test/API checks,
guest production, and backend runtime suites are not run by this
publication session
. The requested CI exercise is on the Ready Phase 3 PR;
this Phase 2 PR stays an actual draft.

Existing-test disclosure (tests-modified):

Changed test asset Why it changes
nvx-rs/src/host/artifacts/architecture/tests.rs Replace the Phase 1 blanket ARM sandbox refusal with namespaced Ubuntu layer expectations; add rejection of missing/foreign manifests and foreign kernels before accepting matching ARM artifacts.
nvx-rs/tests/cli/harness.rs Add native sandbox path translation and synthetic ARM Image/manifest/provenance fixtures without changing explicit-x86 run fixtures.
nvx-rs/tests/cli.rs Follow native sandbox paths for runtime identity, session logs, mappings, blocks, and interrupted-start assertions; on ARM require the earlier PE rejection for batch-file OpenVMM.
nvx-rs/tests/cli/download.rs Remove both ISA fixtures when a case exercises explicit-x86 run and native sandbox; assert the existing ARM download exclusion and preserve staging/no-overwrite assertions.
nvx-rs/tests/cli/dry_run.rs Translate only sandbox fixture paths while retaining command-printing and no-launch assertions.
nvx-rs/tests/cli/formats.rs Read native sandbox OpenVMM/mapping records while preserving every saved-format assertion.
nvx-rs/tests/cli/lifecycle.rs Use native lifecycle, RAM-upper, and managed-exec logs/records; existing lifecycle and exit-status expectations remain.
nvx-rs/tests/cli/one_shot.rs Translate sandbox fixture and command-record paths only; preserve workload/OpenVMM exit-status assertions.
nvx-rs/tests/cli/openvmm.rs Expect native sandbox kernel/initrd paths and opened-block records; retain existing option/block verification.
nvx-rs/tests/cli/validation.rs Translate sandbox setup/removal/error-fragment paths without weakening side-effect-free refusal checks.
nvx-rs/tests/managed_lifecycle.rs Reuse execution collection; add topology, scratch/RAM persistence, busy/stale-target, targeted cancellation, stdout/stderr drain, and reset/reconnect assertions. Distinguish the existing sandbox cwd status 125 from direct-agent typed refusal. Stale-target checks do not claim old-epoch outer-record/wire rejection.
scripts/nvx_tools/managed_exec_tests.py Select architecture-qualified workload layer/scratch inputs and require ARM layer-manifest identity before managed-exec acceptance.
scripts/nvx_tools/microvm_tests.py Add explicit architecture selection, reject unselected full ARM scenario matrices, pass namespaced inputs to existing public scenarios, and pass optional VP/layer/scratch/persistence inputs to the same authenticated Rust fixture. These fixture controls do not add public sandbox options.
scripts/nvx_tools/sandbox_lifecycle_tests.py Carry selected architecture and use matching kernel/initramfs provenance, including the alternate-runtime identity fixture.
scripts/nvx_tools/sandbox_proxy_tests.py Pass the selected architecture to existing workload loading and lifecycle acceptance.
scripts/nvx_tools/sandbox_ram_upper_tests.py Pass the selected architecture to existing workload loading and lifecycle acceptance.
scripts/test_microvm_tests.py Extend the existing managed fixture helper and add layered scratch/RAM wiring coverage; update four public-scenario dispatch assertions to require the explicit x86 default.
scripts/test_nvx_tools.py Give the existing mkfs fixture a valid ext4 header; verify signed-hash preservation and unsigned-hash correction/failure; include the added ARM Docker scratch export; make the existing x86 port check explicit and add ARM unsupported-diagnostic/raw-device refusal cases.
guest/common/nvx-sandbox-smoke Retain x86 fault/permission port checks. On ARM require the x86-only diagnostic to return unsupported and raw platform devices to be absent; common capability/namespace/private-device assertions remain.
tests/runtime-adapter/tests/common/mod.rs Select local artifacts for the native ISA rather than implicitly taking x86 fixtures.
tests/runtime-adapter/tests/guest_session.rs Restrict the existing announcer-pipe helper/field to x86, matching its architecture-specific callers; this changes compiled test-helper coverage and is explicitly disclosed.
tests/runtime-adapter/tests/layered_launch.rs Build native local artifact/identity fixtures, including ARM Image/manifest/PE data, so share refusal still occurs before store mutation.
scripts/test_guest_binaries.py and tests/runtime-adapter/tests/runtime.rs Add producer/architecture-path/manifest/provenance/scenario and explicit-ARM-versus-legacy-x86 identity regressions; no existing test assertions are removed in these files.

The test-change audit found no CI test-wiring changes in this exact layer.

Historical review fixes and guarded stack sync (2026-11-12)

This section records the earlier f865578b publication and then-Ready state.
The current Draft status, captured baseline, head, and bounded evidence are
stated above; the original receipts below are retained without requalification.

The earlier frozen-slice and publication-only statements above record the
initial publication. They are retained as historical disclosures, not as
claims about this update's head, validation, or draft state. This PR is now
Ready (isDraft=false); this update preserves that existing state and the
tests-modified label.

Following the authorized lower-layer fixes, the current Phase 1 base is
d06bf47f89eddf2fa68edeb99caf3fd697d35f45. Only the original Phase 2 commit was
replayed onto it, as c517c2382fa80a748eb793e88ee0ef08cd73ae94, followed by
the focused review fix.
The current head is f865578bdd7a4767e4b208f67d99792cb9215ac2, tree
4015eb54220da30fee92225e3a109fc89f3c6aa0. The current review range is
d06bf47f89eddf2fa68edeb99caf3fd697d35f45..f865578bdd7a4767e4b208f67d99792cb9215ac2
(two linear commits, 41 files), not the combined stack or current dev.
The historical OpenVMM gitlink remains
61cdd63978ea58ce045d159208ed4ca22f30cbb8.

The original and replayed Phase 2 diffs have the same zero-context stable
patch ID, e0ef031933b888a440744e86a47cb1b9c01496a8. The range-diff shows only
inherited import context from the Phase 1 source-export fix, plus the new
focused commit. Named local backup refs preserve the original tip and the
exact remote lease. The push used
--force-with-lease=refs/heads/gautamahuja-microsoft-nvx-phase-2-pr:cb017cf8aee13e5e7276236d1b0ab328e1b52e7f
after rechecking the existing stack order, Ready states, refs, and absence of
auto-merge/queue entries. No dev intake, source merge, pin promotion, stack
recreation, or mutation of another owning branch was performed.

Focused changes and test disclosure

  • Artifacts::probe() now rejects divergence between public paths and a
    remembered ARM artifact directory before applying that directory's native
    checks. It reuses runtime_identity()'s private path comparison without
    adding provenance reads. The probe rustdoc states the invariant.
  • The existing ARM architecture test now rejects each of the three public
    path overrides while original ARM artifacts remain valid, verifies
    missing-file errors, and verifies that probing needs no runtime-identity
    metadata. A new test in nvx-rs/src/host/artifacts/tests.rs retains
    explicit-path and x86 override compatibility.
  • batch_openvmm in nvx-rs/tests/cli.rs pads its script with an inert REM
    line containing 64 fixed bytes. Short Windows TEMP paths therefore reach
    the expected non-MZ refusal. The exact ARM error and no-execution marker
    assertions remain; the production PE parser is unchanged.

Fresh targeted validation on the rebased slice

These are native ARM64 Windows checks, not blanket all-platform qualification.
The maintained resource guard admitted the serialized Rust stages with
CARGO_BUILD_JOBS=1; NVX_BUNDLE=skip avoided bundle downloads and is not
evidence that artifact bundling passed. No OpenVMM build, VM, Docker workload,
package installation, manual CI dispatch, or merge operation was run here.

Exact command/check Result
python scripts\nvx.py verify Passed on the rebased slice. The initial missing-submodule failure was retained in the receipts, then resolved by initializing the exact clean historical 61cdd639... submodule, without changing its gitlink or upstream URL.
cargo test --manifest-path nvx-rs\Cargo.toml --locked --lib --features cli,testing host::artifacts:: Passed: 25 tests, 0 failed, including the ARM path invariants, explicit/x86 compatibility, and existing runtime-identity checks.
cargo test --manifest-path nvx-rs\Cargo.toml --locked --features cli,testing --test cli a_run_refuses_a_batch_file_as_openvmm -- --exact with TEMP=TMP=C:\t Passed: 1 test, 0 failed.
The same exact CLI selector with normal TEMP/TMP Passed: 1 test, 0 failed. Original environment restored; newly created short temporary directory cleaned up.
cargo clippy --manifest-path nvx-rs\Cargo.toml --locked --all-targets --all-features -- -D warnings Passed.
cargo doc --manifest-path nvx-rs\Cargo.toml --locked --no-deps --all-features with RUSTDOCFLAGS=-D warnings Passed.
cargo fmt --manifest-path nvx-rs\Cargo.toml --all --check Passed.
python scripts\check_test_layout.py Passed.
python scripts\check_test_changes.py --base d06bf47f89eddf2fa68edeb99caf3fd697d35f45 --head f865578bdd7a4767e4b208f67d99792cb9215ac2 Passed: 57 existing-test changes, 16 additions in the exact current layer.
python scripts\check_test_changes.py --base c517c2382fa80a748eb793e88ee0ef08cd73ae94 --head f865578bdd7a4767e4b208f67d99792cb9215ac2 Passed: the focused review commit modifies 2 existing test assets and adds 1 test, explained above.
Final maintained resource guard Passed at 20:22:06Z: no compiler/VMM/Docker processes; Docker API unavailable is explicitly recorded as null, not zero running containers. Heavy/native lane explicitly released afterward.

The historical run116, Win1314 and actual-x86-under-emulation limitations
above remain disclosed. This update did not rerun Linux, x86-under-emulation,
full Rust/Python suites, artifact bundling, or backend VM qualification; those
are not claimed green by these focused checks. Phase 3 still owns the
combined newer OpenVMM pin and CI integration.

@ahuja-gautam Gautam Ahuja (ahuja-gautam) added the tests-modified Changes existing tests, test data, or test wiring label Nov 12, 2026
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

This pull request changes existing tests

It modifies or removes 60 existing test asset(s), listed below. Review each with care: a change to a test can hide a regression that the test caught. See doc/contribute.md#changes-to-existing-tests.

Test code

Change What Before After
modified helper fn sessions in cli (tests) nvx-rs/tests/cli.rs:978 nvx-rs/tests/cli.rs:978
modified helper fn batch_openvmm in cli (tests) nvx-rs/tests/cli.rs:2336 nvx-rs/tests/cli.rs:2332
modified helper fn checkout in cli/download (tests) nvx-rs/tests/cli/download.rs:24 nvx-rs/tests/cli/download.rs:24
modified helper fn new in cli/harness (tests), impl Root`` nvx-rs/tests/cli/harness.rs:160 nvx-rs/tests/cli/harness.rs:172
modified helper fn check_lifecycle in cli/lifecycle (tests) nvx-rs/tests/cli/lifecycle.rs:550 nvx-rs/tests/cli/lifecycle.rs:550
modified helper fn one_shot in cli/openvmm (tests) nvx-rs/tests/cli/openvmm.rs:176 nvx-rs/tests/cli/openvmm.rs:176
modified helper fn assert_opened in cli/openvmm (tests) nvx-rs/tests/cli/openvmm.rs:427 nvx-rs/tests/cli/openvmm.rs:436
modified helper fn exec in managed_lifecycle (tests), impl Guest`` nvx-rs/tests/managed_lifecycle.rs:119 nvx-rs/tests/managed_lifecycle.rs:151
modified helper def MicrovmTests._run_managed_lifecycle in scripts/test_microvm_tests.py scripts/test_microvm_tests.py:4284 scripts/test_microvm_tests.py:4285
modified helper fn find in common/mod (tests), impl Fixtures`` tests/runtime-adapter/tests/common/mod.rs:72 tests/runtime-adapter/tests/common/mod.rs:72
modified helper struct FakeRoot in guest_session (tests) tests/runtime-adapter/tests/guest_session.rs:1189 tests/runtime-adapter/tests/guest_session.rs:1189
modified helper fn reading in guest_session (tests), impl FakeRoot`` tests/runtime-adapter/tests/guest_session.rs:1246 tests/runtime-adapter/tests/guest_session.rs:1247
modified helper fn ending in guest_session (tests), impl FakeRoot`` (moved, and it now compiles where feature = "guest" and `target_arch = "x86_64"` and `target_os = "linux"` hold, not where `feature = "guest"` and `target_os = "linux"` did) tests/runtime-adapter/tests/guest_session.rs:1289 tests/runtime-adapter/tests/guest_session.rs:1292
modified helper fn announcer_pipe in guest_session (tests) (moved, and it now compiles where feature = "guest" and target_arch = "x86_64" and target_os = "linux" hold, not where feature = "guest" and target_os = "linux" did) tests/runtime-adapter/tests/guest_session.rs:1540 tests/runtime-adapter/tests/guest_session.rs:1544
modified test fn explicit_arm_paths_never_change_legacy_default_or_openvmm_location in host::artifacts::architecture::tests nvx-rs/src/host/artifacts/architecture/tests.rs:40 nvx-rs/src/host/artifacts/architecture/tests.rs:40
modified test fn a_mapping_that_the_guest_refuses_leaves_no_usable_start in cli (tests) nvx-rs/tests/cli.rs:231 nvx-rs/tests/cli.rs:231
modified test fn a_restarted_cli_drives_only_a_vm_of_its_runtime_identity in cli (tests) nvx-rs/tests/cli.rs:874 nvx-rs/tests/cli.rs:874
modified test fn a_stop_that_cannot_identify_the_runtime_keeps_the_vm_for_the_next_one in cli (tests) nvx-rs/tests/cli.rs:984 nvx-rs/tests/cli.rs:986
modified test fn a_stop_under_another_identity_never_ends_a_process_that_its_record_does_not_name in cli (tests) nvx-rs/tests/cli.rs:1032 nvx-rs/tests/cli.rs:1034
modified test fn a_start_that_was_interrupted_is_ended_under_another_identity_too in cli (tests) nvx-rs/tests/cli.rs:1080 nvx-rs/tests/cli.rs:1082
modified test fn start_hands_openvmm_the_images_that_it_checked in cli (tests) nvx-rs/tests/cli.rs:1966 nvx-rs/tests/cli.rs:1968
modified test fn a_start_that_ends_before_openvmm_opens_the_images_leaves_it_the_checked_ones in cli (tests) nvx-rs/tests/cli.rs:2067 nvx-rs/tests/cli.rs:2066
modified test fn a_run_passes_openvmm_no_handle_of_its_caller in cli (tests) nvx-rs/tests/cli.rs:2274 nvx-rs/tests/cli.rs:2270
modified test fn a_run_refuses_a_batch_file_as_openvmm in cli (tests) nvx-rs/tests/cli.rs:2354 nvx-rs/tests/cli.rs:2358
modified test fn run_downloads_the_release_of_a_checkout_without_artifacts in cli/download (tests) nvx-rs/tests/cli/download.rs:49 nvx-rs/tests/cli/download.rs:58
modified test fn run_downloads_nothing_over_some_artifacts in cli/download (tests) nvx-rs/tests/cli/download.rs:107 nvx-rs/tests/cli/download.rs:124
modified test fn start_downloads_the_release_of_a_checkout_without_artifacts in cli/download (tests) nvx-rs/tests/cli/download.rs:319 nvx-rs/tests/cli/download.rs:346
modified test fn roots_that_are_no_git_checkout_download_nothing in cli/download (tests) nvx-rs/tests/cli/download.rs:401 nvx-rs/tests/cli/download.rs:436
modified test fn dry_runs_print_the_openvmm_command_and_launch_nothing in cli/dry_run (tests) nvx-rs/tests/cli/dry_run.rs:1189 nvx-rs/tests/cli/dry_run.rs:1191
modified test fn configurations_of_every_format_start_and_exec in cli/formats (tests) nvx-rs/tests/cli/formats.rs:188 nvx-rs/tests/cli/formats.rs:188
modified test fn lifecycle_of_a_sandbox_whose_upper_is_in_ram in cli/lifecycle (tests) nvx-rs/tests/cli/lifecycle.rs:636 nvx-rs/tests/cli/lifecycle.rs:639
modified test fn managed_execs_exit_with_the_workload_status in cli/lifecycle (tests) nvx-rs/tests/cli/lifecycle.rs:1025 nvx-rs/tests/cli/lifecycle.rs:1030
modified test fn one_shot_runs_exit_with_the_workload_or_openvmm_status in cli/one_shot (tests) nvx-rs/tests/cli/one_shot.rs:660 nvx-rs/tests/cli/one_shot.rs:662
modified test fn validation_errors_exit_1_before_any_side_effect in cli/validation (tests) nvx-rs/tests/cli/validation.rs:1445 nvx-rs/tests/cli/validation.rs:1447
modified test fn a_managed_guest_runs_request_scoped_workloads_until_it_stops in managed_lifecycle (tests) nvx-rs/tests/managed_lifecycle.rs:368 nvx-rs/tests/managed_lifecycle.rs:411
modified test def GuestConsoleEchoTests.test_scripts_run_once_the_guest_has_consumed_them in scripts/test_microvm_tests.py scripts/test_microvm_tests.py:2516 scripts/test_microvm_tests.py:2516
modified test def MicrovmTests.test_runner_dispatches_public_managed_exec_configuration in scripts/test_microvm_tests.py scripts/test_microvm_tests.py:16131 scripts/test_microvm_tests.py:16190
modified test def MicrovmTests.test_runner_dispatches_public_sandbox_lifecycle in scripts/test_microvm_tests.py scripts/test_microvm_tests.py:16159 scripts/test_microvm_tests.py:16221
modified test def MicrovmTests.test_runner_dispatches_public_sandbox_proxy_only in scripts/test_microvm_tests.py scripts/test_microvm_tests.py:16191 scripts/test_microvm_tests.py:16256
modified test def MicrovmTests.test_runner_dispatches_public_sandbox_ram_upper in scripts/test_microvm_tests.py scripts/test_microvm_tests.py:16221 scripts/test_microvm_tests.py:16289
modified test def BuildTests.test_scratch_template_passes_every_parameter_to_mkfs in scripts/test_nvx_tools.py scripts/test_nvx_tools.py:16677 scripts/test_nvx_tools.py:16677
modified test def BuildTests.test_docker_distro_layer_targets_export_the_scratch_template in scripts/test_nvx_tools.py scripts/test_nvx_tools.py:17989 scripts/test_nvx_tools.py:18048
modified test def SandboxSmokeProfileTests.test_port_check_requires_the_fault_and_the_refusal in scripts/test_nvx_tools.py scripts/test_nvx_tools.py:20798 scripts/test_nvx_tools.py:20858
modified test fn the_host_program_refuses_shares_before_it_touches_the_store in layered_launch (tests) tests/runtime-adapter/tests/layered_launch.rs:853 tests/runtime-adapter/tests/layered_launch.rs:853

End-to-end tests

Change What Before After
modified file guest/common/nvx-sandbox-smoke guest/common/nvx-sandbox-smoke guest/common/nvx-sandbox-smoke
modified helper def workload_artifact_paths in scripts/nvx_tools/managed_exec_tests.py scripts/nvx_tools/managed_exec_tests.py:38 scripts/nvx_tools/managed_exec_tests.py:38
modified helper def load_workload_artifacts in scripts/nvx_tools/managed_exec_tests.py scripts/nvx_tools/managed_exec_tests.py:56 scripts/nvx_tools/managed_exec_tests.py:69
modified helper def run_managed_exec_configuration in scripts/nvx_tools/managed_exec_tests.py scripts/nvx_tools/managed_exec_tests.py:176 scripts/nvx_tools/managed_exec_tests.py:192
modified helper def configure_parser in scripts/nvx_tools/microvm_tests.py scripts/nvx_tools/microvm_tests.py:776 scripts/nvx_tools/microvm_tests.py:781
modified helper def run_guest_script in scripts/nvx_tools/microvm_tests.py scripts/nvx_tools/microvm_tests.py:863 scripts/nvx_tools/microvm_tests.py:871
modified helper def run_guest_boot in scripts/nvx_tools/microvm_tests.py scripts/nvx_tools/microvm_tests.py:1251 scripts/nvx_tools/microvm_tests.py:1261
modified helper def run_managed_lifecycle in scripts/nvx_tools/microvm_tests.py scripts/nvx_tools/microvm_tests.py:1452 scripts/nvx_tools/microvm_tests.py:1464
modified helper def run in scripts/nvx_tools/microvm_tests.py scripts/nvx_tools/microvm_tests.py:11313 scripts/nvx_tools/microvm_tests.py:11369
modified helper def _run_scenarios in scripts/nvx_tools/microvm_tests.py scripts/nvx_tools/microvm_tests.py:11421 scripts/nvx_tools/microvm_tests.py:11506
modified helper def read_build_provenance in scripts/nvx_tools/sandbox_lifecycle_tests.py scripts/nvx_tools/sandbox_lifecycle_tests.py:162 scripts/nvx_tools/sandbox_lifecycle_tests.py:162
modified helper def LifecycleAcceptance.__init__ in scripts/nvx_tools/sandbox_lifecycle_tests.py scripts/nvx_tools/sandbox_lifecycle_tests.py:394 scripts/nvx_tools/sandbox_lifecycle_tests.py:405
modified helper def LifecycleAcceptance.write_other_runtime in scripts/nvx_tools/sandbox_lifecycle_tests.py scripts/nvx_tools/sandbox_lifecycle_tests.py:884 scripts/nvx_tools/sandbox_lifecycle_tests.py:897
modified helper def run_sandbox_lifecycle in scripts/nvx_tools/sandbox_lifecycle_tests.py scripts/nvx_tools/sandbox_lifecycle_tests.py:1093 scripts/nvx_tools/sandbox_lifecycle_tests.py:1113
modified helper def run_sandbox_proxy_only in scripts/nvx_tools/sandbox_proxy_tests.py scripts/nvx_tools/sandbox_proxy_tests.py:499 scripts/nvx_tools/sandbox_proxy_tests.py:499
modified helper def run_sandbox_ram_upper in scripts/nvx_tools/sandbox_ram_upper_tests.py scripts/nvx_tools/sandbox_ram_upper_tests.py:262 scripts/nvx_tools/sandbox_ram_upper_tests.py:262

Relocated unchanged: 0; added: 21. Compared the merge base 3103f24c292f with aacccd99e132.

Copilot AI left a comment

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.

🟡 Changes recommended

ARM artifact validation checks default directory paths rather than the paths actually launched, allowing a replacement x86 kernel to pass admission.

2 open issues
What changed in this PR

Phase 2 builds on the ARM64 cold-boot foundation in #1509 to enable the existing managed sandbox with native local artifacts. It preserves legacy x86 artifact defaults and existing sandbox interfaces; ARM release downloads, snapshots, and final combined qualification remain outside this layer.

Changes:

  • Select and validate native ARM artifacts in the sandbox CLI and runtime adapter.
  • Add ARM Ubuntu EROFS production and Docker exports while preserving the canonical scratch format.
  • Adapt existing fixtures and extend architecture, lifecycle, persistence, and isolation coverage.
File Description
tests/​runtime-adapter/​tests/​runtime.rs Tests ARM paths separately from legacy x86 defaults.
tests/​runtime-adapter/​tests/​layered_launch.rs Uses native artifact fixtures for launch refusals.
tests/​runtime-adapter/​tests/​guest_session.rs Gates x86-specific announcer helpers.
tests/​runtime-adapter/​tests/​common/​mod.rs Selects native runtime test artifacts.
tests/​runtime-adapter/​src/​runtime.rs Adds architecture-qualified runtime construction.
tests/​runtime-adapter/​src/​bin/​runtime-adapter-host.rs Selects the native runtime architecture.
scripts/​test_nvx_tools.py Tests scratch normalization, exports, and ARM diagnostics.
scripts/​test_microvm_tests.py Tests layered lifecycle inputs and architecture dispatch.
scripts/​test_guest_binaries.py Adds ARM producer and artifact-selection regressions.
scripts/​nvx.py Adds distro-layer architecture selection.
scripts/​nvx_tools/​sandbox_ram_upper_tests.py Passes architecture into RAM-upper acceptance.
scripts/​nvx_tools/​sandbox_proxy_tests.py Passes architecture into proxy acceptance.
scripts/​nvx_tools/​sandbox_lifecycle_tests.py Selects matching artifacts and provenance.
scripts/​nvx_tools/​microvm_tests.py Adds architecture selection and managed fixture controls.
scripts/​nvx_tools/​managed_exec_tests.py Loads architecture-qualified workload artifacts.
scripts/​nvx_tools/​common.py Supports architecture-qualified artifact paths.
scripts/​nvx_tools/​build.py Produces ARM layers and normalizes scratch hash flags.
scripts/​nvx_tools/​build_config.py Adds architecture-aware distro build configuration.
nvx-rs/​tests/​managed_lifecycle.rs Extends topology, persistence, cancellation, and reconnect checks.
nvx-rs/​tests/​cli/​validation.rs Uses native sandbox validation fixtures.
nvx-rs/​tests/​cli/​openvmm.rs Updates native command and block-record expectations.
nvx-rs/​tests/​cli/​one_shot.rs Translates native one-shot fixture paths.
nvx-rs/​tests/​cli/​lifecycle.rs Reads native lifecycle records and logs.
nvx-rs/​tests/​cli/​harness.rs Adds ARM fixtures and sandbox path translation.
nvx-rs/​tests/​cli/​formats.rs Uses native paths in saved-format tests.
nvx-rs/​tests/​cli/​dry_run.rs Uses native sandbox dry-run fixtures.
nvx-rs/​tests/​cli/​download.rs Tests ARM download refusal and dual-architecture cleanup.
nvx-rs/​tests/​cli.rs Updates native lifecycle paths and PE-refusal expectations.
nvx-rs/​src/​host/​cli/​sandbox/​mod.rs Selects and validates native sandbox artifacts.
nvx-rs/​src/​host/​artifacts/​mod.rs Adds ARM probing and exposes directory-based construction.
nvx-rs/​src/​host/​artifacts/​identity.rs Makes PE validation available without the CLI feature.
nvx-rs/​src/​host/​artifacts/​dir.rs Enables ARM sandbox artifacts and distro paths.
nvx-rs/​src/​host/​artifacts/​architecture/​tests.rs Tests ARM managed-artifact admission.
nvx-rs/​public-api/​windows.txt Records the exposed artifact constructor.
nvx-rs/​public-api/​linux.txt Records the exposed artifact constructor.
guest/​common/​nvx-sandbox-smoke Adds ARM diagnostic and raw-device checks.
docker/​Dockerfile Adds ARM distro-layer and scratch exports.
doc/​usage.md Documents architecture options and scratch normalization.
doc/​run.md Explains architecture-specific sandbox smoke checks.
doc/​build.md Documents ARM layer production and sandbox scope.

Review effort: Balanced

Comment thread nvx-rs/src/host/artifacts/mod.rs Resolved
Comment thread nvx-rs/tests/cli.rs Resolved
@ahuja-gautam
Gautam Ahuja (ahuja-gautam) force-pushed the gautamahuja-microsoft-nvx-phase-2-pr branch from cb017cf to f865578 Compare November 12, 2026 20:23
Copilot AI balanced review requested due to automatic review settings November 12, 2026 20:23

Copilot AI left a comment

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.

🟡 Changes recommended

ARM runs receive unsupported, x86-default recovery commands, while ARM debug-kernel guests are misclassified as x86 and have valid boot status rejected.

2 open issues
2 resolved since last review

Review effort: Balanced

Comment thread scripts/nvx_tools/microvm_tests.py Resolved
Comment thread scripts/nvx_tools/microvm_tests.py Resolved
@ahuja-gautam
Gautam Ahuja (ahuja-gautam) force-pushed the gautamahuja-microsoft-nvx-phase-2-pr branch from f865578 to 7f1d398 Compare November 12, 2026 20:49
Copilot AI balanced review requested due to automatic review settings November 12, 2026 20:49

Copilot AI left a comment

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.

🟡 Changes recommended

The ARM debug-kernel path bypasses required watchdog validation, allowing a production kernel to yield misleading debug-kernel evidence; config validation and rejection tests are needed.

2 open issues
1 resolved since last review

Review effort: Balanced

Comment thread scripts/nvx_tools/microvm_tests.py Resolved
@ahuja-gautam
Gautam Ahuja (ahuja-gautam) marked this pull request as draft November 12, 2026 21:04
@ahuja-gautam
Gautam Ahuja (ahuja-gautam) force-pushed the gautamahuja-microsoft-nvx-phase-2-pr branch from 7f1d398 to 4bef5ff Compare November 12, 2026 22:34
Copilot AI balanced review requested due to automatic review settings November 12, 2026 22:35

Copilot AI left a comment

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.

🔵 Needs a closer look

Native ARM managed-sandbox behavior and canonical ext4 byte reproducibility still require hardware and producer/backend qualification beyond the supplied slice checks, with combined-stack runtime validation deferred.

2 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 12, 2026 23:36

Copilot AI left a comment

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.

🔵 Needs a closer look

Native ARM managed execution and ext4 reproducibility require producer/backend qualification beyond static review, with fresh Linux guest evidence absent and combined OpenVMM-pin validation deferred to Phase 3.

2 open issues

Review effort: Balanced

Select native local artifacts in the shared sandbox CLI and runtime
adapter. Produce ARM Ubuntu EROFS layers through the maintained pipeline
and preserve the canonical ISA-neutral scratch format.

Adapt existing managed, policy and CLI fixtures without changing public
sandbox options, saved formats or control protocols. Retain x86 behavior
and explicit ARM snapshot and release-catalog exclusions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reuse the remembered-directory path check for ARM probe admission without requiring runtime identity metadata. Cover every public path override, missing inputs, and explicit/x86 compatibility. Pad the inert Windows batch fixture so short TEMP paths reach the intended PE magic refusal while retaining the no-execution check.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reuse the shared optional counter-architecture API before starting a process and carry the selected ISA through debug guest-boot checks. Recognize the maintained ARM Image-debug product for legacy callers while retaining explicit ISA precedence and lower-layer restore detection. Recommend matching ARM distro and namespaced scratch producers without changing x86 guidance or qualified scenario scopes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Require the architecture-selected debug kernel config to enable the existing watchdog and hung-task detectors before running scenarios. Keep x86 admission and ISA monitoring unchanged, and cover a valid ARM config plus refusal for each missing detector without running a VM.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@ahuja-gautam
Gautam Ahuja (ahuja-gautam) force-pushed the gautamahuja-microsoft-nvx-phase-2-pr branch from 4135868 to aacccd9 Compare November 13, 2026 21:24
Copilot AI balanced review requested due to automatic review settings November 13, 2026 21:24

Copilot AI left a comment

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.

🔵 Needs a closer look

The host/guest sandbox and ext4 changes require maintainer review because exact-head native ARM VM/debug-kernel and combined VMM/backend qualification remain unclaimed and cannot be established by mocked tests.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

Pedro Henrique Penna (ppenna) added a commit that referenced this pull request Nov 17, 2026
doc/contribute.md asks every pull request to reference an issue on the
first line of its description, but nothing checks it: pull requests
such as #1675, whose only references sit in the template's HTML
comment, and #1516, whose Refs #1509 names a pull request, reference
no issue, and a reviewer has to notice.

Add the Issue link workflow, which pull_request_target runs, from the
default branch, when a pull request is opened, reopened, pushed to,
edited, labelled, or unlabelled. Its script, check_issue_link.py, reads
the pull request through gh api, in UTF-8 whatever the locale, and
passes it when GitHub links it to an issue of the repository
(closingIssuesReferences) or when its description holds close, fix,
resolve (in any form), Part of, or Refs, with an optional colon,
then #N, microsoft/nvx#N, or the issue's URL, where N is an issue. A
pull request's number, a missing number, a bare #N, and another
repository's issue do not count. The script reads the description as
GitHub renders it, through the Markdown API in the repository's context,
and only the text that GitHub shows counts: not an HTML comment, an
attribute such as a link's title, or code, inline, fenced, indented, or
in <pre>, nor a keyword that code or the end of a block, such as a list
item or a table cell, separates from its number. GitHub's own renderer
keeps the check in step with what the pull request's page shows, which a
parser of CommonMark, GFM tables, and raw HTML written here kept
missing. It looks up at most the first 10 numbers, so a description
cannot make it call the API without bound. Pull requests by
dependabot[bot] or github-actions[bot], or labelled no-issue, are
exempt, and closed ones are left alone.

An unlinked pull request gets the needs-issue label and one marker
comment that says how to reference an issue, and the check fails;
editing the description reruns it, which then removes the label and
rewrites the comment. Only a comment of github-actions[bot] that starts
with the marker is the script's. The script does every read before its
first write, so an API error fails the check and changes nothing, and
its summary names the verdict and the numbers, never the description.

The job has no condition, since a skipped run would replace the
previous verdict, runs one check a pull request at a time, keeps no
checkout credentials, and gets only the pull request's number. Its
token reads contents and writes pull requests; reading an issue of a
public repository needs no issues permission, so the nightly report
and issue labelling stay the only workflows that write issues.

Evidence: dry runs against the live repository pass #1687, #1686,
and #1682, which GitHub links to issues, and #1679, whose description
references #1676, and flag #1675, #1516, #1510, and #1509, as reading
their descriptions confirms. A 64 KiB description renders in about a
second, and its text reads in at most 60 ms.

test_issue_link.py covers the reading of GitHub's HTML, as gh api
markdown renders it: keywords and targets, other repositories, code and
<pre>, attributes, the ends of blocks and table cells, and inline
elements; the verdicts and the writes through a fake gh api, the render
request, gh's input and output in UTF-8, the bound on lookups, an API
error at each read, a comment that quotes the marker or has no author,
and the workflow's triggers, permissions, checkout, concurrency, and
inputs. validate-nvx runs it on Linux and Windows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pedro Henrique Penna (ppenna) added a commit that referenced this pull request Nov 17, 2026
doc/contribute.md asks every pull request to reference an issue on the
first line of its description, but nothing checks it: pull requests
such as #1675, whose only references sit in the template's HTML
comment, and #1516, whose Refs #1509 names a pull request, reference
no issue, and a reviewer has to notice.

Add the Issue link workflow, which pull_request_target runs, from the
default branch, when a pull request is opened, reopened, pushed to,
edited, labelled, or unlabelled. Its script, check_issue_link.py, reads
the pull request through gh api, in UTF-8 whatever the locale, and
passes it when GitHub links it to an issue of the repository
(closingIssuesReferences) or when its description holds close, fix,
resolve (in any form), Part of, or Refs, with an optional colon,
then #N, microsoft/nvx#N, or the issue's URL, where N is an issue. A
pull request's number, a missing number, a bare #N, and another
repository's issue do not count. The script reads the description as
GitHub renders it, through the Markdown API in the repository's context,
and only the text that GitHub shows counts: not an HTML comment, an
attribute such as a link's title, or code, inline, fenced, indented, or
in <pre>, nor a keyword that code or the end of a block, such as a list
item or a table cell, separates from its number. A link counts by where
it goes, whatever its text: a link to an issue or a pull request as
OWNER/REPO#N, and any other link as code does. GitHub's own renderer
keeps the check in step with what the pull request's page shows, which a
parser of CommonMark, GFM tables, and raw HTML written here kept
missing. It looks up at most the first 10 numbers, so a description
cannot make it call the API without bound. Pull requests by
dependabot[bot] or github-actions[bot], or labelled no-issue, are
exempt, and closed ones are left alone.

An unlinked pull request gets the needs-issue label and one marker
comment that says how to reference an issue, and the check fails;
editing the description reruns it, which then removes the label and
rewrites the comment. Only a comment of github-actions[bot] that starts
with the marker is the script's. The script does every read before its
first write, so an API error fails the check and changes nothing, and
its summary names the verdict and the numbers, never the description.

The job has no condition, since a skipped run would replace the
previous verdict, runs one check a pull request at a time, keeps no
checkout credentials, and gets only the pull request's number. Its
token reads contents and writes pull requests; reading an issue of a
public repository needs no issues permission, so the nightly report
and issue labelling stay the only workflows that write issues.

Evidence: dry runs against the live repository pass #1687, #1686,
and #1682, which GitHub links to issues, and #1679, whose description
references #1676, and flag #1675, #1516, #1510, and #1509, as reading
their descriptions confirms. A 64 KiB description renders in about a
second, and its text reads in at most 60 ms.

test_issue_link.py covers the reading of GitHub's HTML, as gh api
markdown renders it: keywords and targets, other repositories, code and
<pre>, attributes, links, the ends of blocks and table cells, and inline
elements; the verdicts and the writes through a fake gh api, the render
request, gh's input and output in UTF-8, the bound on lookups, an API
error at each read, a comment that quotes the marker or has no author,
and the workflow's triggers, permissions, checkout, concurrency, and
inputs. validate-nvx runs it on Linux and Windows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pedro Henrique Penna (ppenna) added a commit that referenced this pull request Nov 17, 2026
doc/contribute.md asks every pull request to reference an issue on the
first line of its description, but nothing checks it: pull requests
such as #1675, whose only references sit in the template's HTML
comment, and #1516, whose Refs #1509 names a pull request, reference
no issue, and a reviewer has to notice.

Add the Issue link workflow, which pull_request_target runs, from the
default branch, when a pull request is opened, reopened, pushed to,
edited, labelled, or unlabelled. Its script, check_issue_link.py, reads
the pull request through gh api, in UTF-8 whatever the locale, and
passes it when GitHub links it to an issue of the repository
(closingIssuesReferences) or when its description holds close, fix,
resolve (in any form), Part of, or Refs, with an optional colon,
then #N, microsoft/nvx#N, or the issue's URL, where N is an issue. A
pull request's number, a missing number, a bare #N, and another
repository's issue do not count. The script reads the description as
GitHub renders it, through the Markdown API in the repository's context,
and only the text that GitHub shows counts: not an HTML comment, an
attribute such as a link's title, or code, inline, fenced, indented, or
in <pre>, nor a keyword that code or the end of a block, such as a list
item or a table cell, separates from its number. A link counts by where
it goes, and of its text only a keyword that starts it: a link to an
issue or a pull request, absolute or root-relative, with nothing after
the number other than a slash, a query, or a fragment, as that keyword
and OWNER/REPO#N, and any other link as code does. GitHub's own renderer
keeps the check in step with what the pull request's page shows, which a
parser of CommonMark, GFM tables, and raw HTML written here kept
missing. It looks up at most the first 10 numbers, so a description
cannot make it call the API without bound. Pull requests by
dependabot[bot] or github-actions[bot], or labelled no-issue, are
exempt, and closed ones are left alone.

An unlinked pull request gets the needs-issue label and one marker
comment that says how to reference an issue, and the check fails;
editing the description reruns it, which then removes the label and
rewrites the comment. Only a comment of github-actions[bot] that starts
with the marker is the script's. The script does every read before its
first write, so an API error fails the check and changes nothing, and
its summary names the verdict and the numbers, never the description.

The job has no condition, since a skipped run would replace the
previous verdict, runs one check a pull request at a time, keeps no
checkout credentials, and gets only the pull request's number. Its
token reads contents and writes pull requests; reading an issue of a
public repository needs no issues permission, so the nightly report
and issue labelling stay the only workflows that write issues.

Evidence: dry runs against the live repository pass #1687, #1686,
and #1682, which GitHub links to issues, and #1679, whose description
references #1676, and flag #1675, #1516, #1510, and #1509, as reading
their descriptions confirms. A 64 KiB description renders in about a
second, and its text reads in at most 60 ms.

test_issue_link.py covers the reading of GitHub's HTML, as gh api
markdown renders it: keywords and targets, other repositories, code and
<pre>, attributes, links, the ends of blocks and table cells, and inline
elements; the verdicts and the writes through a fake gh api, the render
request, gh's input and output in UTF-8, the bound on lookups, an API
error at each read, a comment that quotes the marker or has no author,
and the workflow's triggers, permissions, checkout, concurrency, and
inputs. validate-nvx runs it on Linux and Windows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pedro Henrique Penna (ppenna) added a commit that referenced this pull request Nov 17, 2026
doc/contribute.md asks every pull request to reference an issue on the
first line of its description, but nothing checks it: pull requests
such as #1675, whose only references sit in the template's HTML
comment, and #1516, whose Refs #1509 names a pull request, reference
no issue, and a reviewer has to notice.

Add the Issue link workflow, which pull_request_target runs, from the
default branch, when a pull request is opened, reopened, pushed to,
edited, labelled, or unlabelled. Its script, check_issue_link.py, reads
the pull request through gh api, in UTF-8 whatever the locale, and
passes it when GitHub links it to an issue of the repository
(closingIssuesReferences) or when its description holds close, fix,
resolve (in any form), Part of, or Refs, with an optional colon,
then #N, microsoft/nvx#N, or the issue's URL, where N is an issue. A
pull request's number, a missing number, a bare #N, and another
repository's issue do not count. The script reads the description as
GitHub renders it, through the Markdown API in the repository's context,
and only the text that GitHub shows counts: not an HTML comment, an
attribute such as a link's title, or code, inline, fenced, indented, or
in <pre>, nor a keyword that code or the end of a block, such as a list
item or a table cell, separates from its number. A link counts by where
it goes, and of its text only a keyword that starts it: a link to an
issue or a pull request, absolute or root-relative, with nothing after
the number other than a slash, a query, or a fragment, as that keyword
and OWNER/REPO#N, which no text after the link extends, and any other
link as code does. An issue's URL that GitHub shows as text follows the
same rule, but for the punctuation that ends a sentence. GitHub's own
renderer keeps the check in step with what the pull request's page
shows, which a parser of CommonMark, GFM tables, and raw HTML written
here kept missing. It looks up at most the first 10 numbers, so a
description cannot make it call the API without bound. Pull requests by
dependabot[bot] or github-actions[bot], or labelled no-issue, are
exempt, and closed ones are left alone.

An unlinked pull request gets the needs-issue label and one marker
comment that says how to reference an issue, and the check fails;
editing the description reruns it, which then removes the label and
rewrites the comment. Only a comment of github-actions[bot] that starts
with the marker is the script's. The script does every read before its
first write, so an API error fails the check and changes nothing, and
its summary names the verdict and the numbers, never the description.

The job has no condition, since a skipped run would replace the
previous verdict, runs one check a pull request at a time, keeps no
checkout credentials, and gets only the pull request's number. Its
token reads contents and writes pull requests; reading an issue of a
public repository needs no issues permission, so the nightly report
and issue labelling stay the only workflows that write issues.

Evidence: dry runs against the live repository pass #1687, #1686,
and #1682, which GitHub links to issues, and #1679, whose description
references #1676, and flag #1675, #1516, #1510, and #1509, as reading
their descriptions confirms. A 64 KiB description renders in about a
second, and its text reads in at most 60 ms.

test_issue_link.py covers the reading of GitHub's HTML, as gh api
markdown renders it: keywords and targets, other repositories, code and
<pre>, attributes, links, the ends of blocks and table cells, and inline
elements; the verdicts and the writes through a fake gh api, the render
request, gh's input and output in UTF-8, the bound on lookups, an API
error at each read, a comment that quotes the marker or has no author,
and the workflow's triggers, permissions, checkout, concurrency, and
inputs. validate-nvx runs it on Linux and Windows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pedro Henrique Penna (ppenna) added a commit that referenced this pull request Nov 17, 2026
doc/contribute.md asks every pull request to reference an issue on the
first line of its description, but nothing checks it: pull requests
such as #1675, whose only references sit in the template's HTML
comment, and #1516, whose Refs #1509 names a pull request, reference
no issue, and a reviewer has to notice.

Add the Issue link workflow, which pull_request_target runs, from the
default branch, when a pull request is opened, reopened, pushed to,
edited, labelled, or unlabelled. Its script, check_issue_link.py, reads
the pull request through gh api, in UTF-8 whatever the locale, and
passes it when GitHub links it to an issue of the repository
(closingIssuesReferences) or when its description holds close, fix,
resolve (in any form), Part of, or Refs, with an optional colon,
then #N, microsoft/nvx#N, or the issue's URL, where N is an issue. A
pull request's number, a missing number, a bare #N, and another
repository's issue do not count. The script reads the description as
GitHub renders it, through the Markdown API in the repository's context,
and only the text that GitHub shows counts: not an HTML comment, an
attribute such as a link's title, or code, inline, fenced, indented, or
in <pre>, nor a keyword that code or the end of a block, such as a list
item or a table cell, separates from its number. A link counts by where
it goes, and of its text only a keyword that starts it: a link to an
issue or a pull request, absolute or root-relative, with nothing after
the number other than a slash, a query, or a fragment, as that keyword
and OWNER/REPO#N, which no text after the link extends, and any other
link as code does. An issue's URL that GitHub shows as text follows the
same rule, but for the punctuation that ends a sentence. GitHub's own
renderer keeps the check in step with what the pull request's page
shows, which a parser of CommonMark, GFM tables, and raw HTML written
here kept missing. It looks up at most the first 10 numbers, so a
description cannot make it call the API without bound. Pull requests by
dependabot[bot] or github-actions[bot], or labelled no-issue, are
exempt, and closed ones are left alone.

An unlinked pull request gets the needs-issue label and one marker
comment that says how to reference an issue, and the check fails;
editing the description reruns it, which then removes the label and
rewrites the comment. Only a comment of github-actions[bot] that starts
with the marker is the script's. The script does every read before its
first write, so an API error fails the check and changes nothing, and
its summary names the verdict and the numbers, never the description.

The job has no condition, since a skipped run would replace the
previous verdict, runs one check a pull request at a time, keeps no
checkout credentials, and gets only the pull request's number. Its
token reads contents and writes pull requests; reading an issue of a
public repository needs no issues permission, so the nightly report
and issue labelling stay the only workflows that write issues.

Evidence: dry runs against the live repository pass #1687, #1686,
and #1682, which GitHub links to issues, and #1679, whose description
references #1676, and flag #1675, #1516, #1510, and #1509, as reading
their descriptions confirms. A 64 KiB description renders in about a
second, and its text reads in at most 60 ms.

test_issue_link.py covers the reading of GitHub's HTML, as gh api
markdown renders it: keywords and targets, other repositories, code and
<pre>, attributes, links, the ends of blocks and table cells, and inline
elements; the verdicts and the writes through a fake gh api, the render
request, gh's input and output in UTF-8, the bound on lookups, an API
error at each read, a comment that quotes the marker or has no author,
and the workflow's triggers, permissions, checkout, concurrency, and
inputs. validate-nvx runs it on Linux and Windows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests-modified Changes existing tests, test data, or test wiring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants