From 4c4a47db9b77eba744b9d09ae0cc654120a1fead Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 17 Sep 2026 06:13:09 +0000 Subject: [PATCH 1/8] Initial plan From e52f8aa50cff4dae267347e45e7dca204c2da8db Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 17 Sep 2026 06:17:28 +0000 Subject: [PATCH 2/8] fix: remove the release-please probe self-cycle Co-authored-by: MikeGrier <220633264+MikeGrier@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- crates/windows-platform-probes/Cargo.toml | 28 ++++++++--------------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb18cf5d..b5ca7fc2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -225,7 +225,7 @@ jobs: env: RUST_BACKTRACE: 1 RUST_LIB_BACKTRACE: 1 - run: cargo test -p windows-platform-probes --locked --no-fail-fast -- --include-ignored + run: cargo test -p windows-platform-probes --features oracle-in-renderer --locked --no-fail-fast -- --include-ignored # The binaries print the numbers the tests deliberately do not assert: # host-specific magnitudes, which are exactly what an architecture # comparison needs and what a pass/fail cannot carry. diff --git a/crates/windows-platform-probes/Cargo.toml b/crates/windows-platform-probes/Cargo.toml index 1b3ff725..4a7b73a2 100644 --- a/crates/windows-platform-probes/Cargo.toml +++ b/crates/windows-platform-probes/Cargo.toml @@ -22,7 +22,7 @@ path = "src/lib.rs" # ordinary dependency -- without `cfg(test)` -- for anything under `tests/`, so # the binding does not reach them. Measured: an integration test rendered a # report whose banner architecture contradicted its NDJSON and did not panic. -# This feature closes that, via the self dev-dependency below. +# This feature closes that for the explicit integration-test target below. # # Never enable it for a shipping build. A real probe run must PRINT a # self-contradicting report rather than panic: the contradiction is a finding @@ -97,6 +97,11 @@ path = "src/bin/long_path_aware.rs" name = "probe-long-path-unaware" path = "src/bin/long_path_unaware.rs" +[[test]] +name = "a_real_report_agrees_with_itself" +path = "tests/a_real_report_agrees_with_itself.rs" +required-features = ["oracle-in-renderer"] + [dependencies] # **Optional, and reached only through `oracle-in-renderer`.** The report # oracle's job is to answer "would a consumer be able to parse this row", and @@ -218,24 +223,11 @@ windows-waitable-queues = { path = "../windows-waitable-queues", features = [ # rather than by cutting the text. # # **Not to satisfy `report_oracle`'s gate, which an earlier version of this -# comment claimed.** That claim was backwards: it said `cfg(test)` builds compile -# the module without `oracle-in-renderer`. They do not. The self dev-dependency -# below is an edge from this package to itself, so under resolver 2 the feature -# unifies onto the package in ANY build that includes dev-dependencies -- the -# `cfg(test)` lib build included. Measured with a `compile_error!` probe in both -# directions: `cargo check --tests` succeeds under `not(feature = ...)` and fails -# under `feature = ...`, while a plain `--lib` build has the feature off. -# -# So the two arms of `cfg(any(test, feature = "oracle-in-renderer"))` are never -# exercised separately, the optional `serde`/`serde_json` are already active in -# every test build, and a matching `serde` dev-dependency was dead weight -- -# removed after confirming all 213 tests still pass without it. +# comment claimed.** The integration test that needs that gate is instead +# declared explicitly above with `required-features = ["oracle-in-renderer"]`, +# so ordinary unit-test builds keep exercising the `cfg(test)` arm while that +# one target runs with the feature on. serde_json = "1.0" -# A dependency on ITSELF, which cargo permits for dev-dependencies and which is -# the only way to turn a feature on for this package's own integration tests: -# a test under `tests/` links the library as a plain dependency, so `cfg(test)` -# is not set for it and the renderer's oracle binding would be compiled out. -windows-platform-probes = { path = ".", features = ["oracle-in-renderer"] } [dependencies.windows-sys] version = "0.61.2" From 646526a10b1049a1fc77de26b41ba04294d0d7d1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 17 Sep 2026 06:25:25 +0000 Subject: [PATCH 3/8] fix: sync Cargo.lock after removing the probe self-dependency Co-authored-by: MikeGrier <220633264+MikeGrier@users.noreply.github.com> --- Cargo.lock | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 76ddfb33..8f79f1ae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -220,7 +220,6 @@ dependencies = [ "serde_json", "windows-namespace-request-sys", "windows-placement-probe", - "windows-platform-probes", "windows-sys", "windows-threadpool-sys", "windows-topology-sys", From befe334a2da80d8e252594e6c308ca9b93b743be Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 17 Sep 2026 06:25:47 +0000 Subject: [PATCH 4/8] fix: wire probe oracle feature in test wiring Co-authored-by: MikeGrier <220633264+MikeGrier@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- crates/windows-platform-probes/README.md | 2 +- crates/windows-platform-probes/src/lib.rs | 10 ++++---- .../src/topology_report.rs | 24 +++++++++---------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5ca7fc2..c2973d99 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -164,7 +164,7 @@ jobs: env: RUST_BACKTRACE: 1 RUST_LIB_BACKTRACE: 1 - run: cargo test --workspace --locked --no-fail-fast + run: cargo test --workspace --features windows-platform-probes/oracle-in-renderer --locked --no-fail-fast # The UNC current-directory test is ignored by default because it needs a # reachable administrative share (`\\localhost\C$`), which an ordinary # developer account does not have -- running it by default would report an diff --git a/crates/windows-platform-probes/README.md b/crates/windows-platform-probes/README.md index 5e0e18e4..0f7caba1 100644 --- a/crates/windows-platform-probes/README.md +++ b/crates/windows-platform-probes/README.md @@ -65,7 +65,7 @@ probe that no longer compiles has already rotted. ## Running ```text -cargo test --package windows-platform-probes # the asserted tier +cargo test --package windows-platform-probes --features oracle-in-renderer # asserted tier + required-feature integration target cargo run --bin probe-error-mode # observations, including the irreversible one cargo run --bin probe-handle-state ``` diff --git a/crates/windows-platform-probes/src/lib.rs b/crates/windows-platform-probes/src/lib.rs index d73d9fcd..f5b78634 100644 --- a/crates/windows-platform-probes/src/lib.rs +++ b/crates/windows-platform-probes/src/lib.rs @@ -92,9 +92,9 @@ //! # Running them //! //! ```text -//! cargo test -p windows-platform-probes # asserted tier -//! cargo test -p windows-platform-probes -- --include-ignored # both tiers -//! cargo test -p windows-platform-probes -- --ignored # ignored tier only +//! cargo test -p windows-platform-probes --features oracle-in-renderer # asserted tier +//! cargo test -p windows-platform-probes --features oracle-in-renderer -- --include-ignored # both tiers +//! cargo test -p windows-platform-probes --features oracle-in-renderer -- --ignored # ignored tier only //! cargo run -p windows-platform-probes --bin probe-cancel-io # binary only //! //! # binary only, and --release is not optional: a debug build reports @@ -159,8 +159,8 @@ pub mod report; /// The report oracle. **Test-support: present only where it is used.** /// /// Every caller is already behind this gate -- the renderers' `assert_row_is_well_formed` -/// bindings, the unit tests, and the integration tests, which reach it through the -/// self dev-dependency. Stating that here rather than leaving it implied is what +/// bindings, unit tests, and the required-feature integration target that enables +/// `oracle-in-renderer`. Stating that here rather than leaving it implied is what /// lets the module depend on a real JSON parser without putting one in a shipping /// probe binary. #[cfg(any(test, feature = "oracle-in-renderer"))] diff --git a/crates/windows-platform-probes/src/topology_report.rs b/crates/windows-platform-probes/src/topology_report.rs index cb62f585..69fd1486 100644 --- a/crates/windows-platform-probes/src/topology_report.rs +++ b/crates/windows-platform-probes/src/topology_report.rs @@ -960,8 +960,8 @@ pub fn report(banner: &str, observation: &Observation) -> String { // library as an ordinary dependency, WITHOUT `cfg(test)`, for anything under // `tests/`. Found by a review and measured -- an integration test rendered a // report whose banner architecture contradicted its NDJSON `arch` and did - // not panic. The `oracle-in-renderer` feature, switched on by this crate's - // dev-dependency on itself, closes that. + // not panic. The `oracle-in-renderer` feature, enabled explicitly for the + // required-feature integration target, closes that. // // **A DEFAULT-FEATURE build still prints rather than panics**, which is the // contract this gate exists to preserve: a self-contradicting report is a @@ -982,12 +982,13 @@ pub fn report(banner: &str, observation: &Observation) -> String { // than to claim one the mechanism cannot hold. Found by a review. // // Two consequences, both deliberate and both named here rather than left to - // be discovered: binaries built by `cargo test` assert, so a probe spawned - // by an integration test aborts on a contradiction instead of printing it; - // and so does an `--all-features` build. The evidence survives in every - // case, because the assertion's message carries the whole report -- what is - // lost is the NDJSON row a survey would have mined, which is why the default - // build is the one that matters and is the one pinned above. + // be discovered: binaries built by the feature-on test command assert, so a + // probe spawned by the required-feature integration target aborts on a + // contradiction instead of printing it; and so does an `--all-features` + // build. The evidence survives in every case, because the assertion's + // message carries the whole report -- what is lost is the NDJSON row a + // survey would have mined, which is why the default build is the one that + // matters and is the one pinned above. // // **The schema's SHAPES are bound here for the same reason.** Well-formed // says the row parses; the schema says `processors` is a number and each @@ -999,10 +1000,9 @@ pub fn report(banner: &str, observation: &Observation) -> String { // `#[cfg]` attribute governs the single statement that follows it, so // adding a second call beneath the gated one left that call ungated -- and // `report_oracle` does not exist in a default build. Nothing local caught - // it: this crate's dev-dependency on itself turns `oracle-in-renderer` on - // for every `cargo test` and `cargo check --all-targets`, so the - // feature-off arm is never compiled here. CI's `cargo run --bin` is, and - // that is where it broke. + // it: the feature-on test wiring compiles only the enabled arm in those + // runs, so the feature-off arm was never checked there. CI's `cargo run + // --bin` is, and that is where it broke. #[cfg(any(test, feature = "oracle-in-renderer"))] { crate::report_oracle::assert_row_is_well_formed(&out); From e7babb85ef2327fbb459d86fab41be995c4ce23c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 17 Sep 2026 06:26:34 +0000 Subject: [PATCH 5/8] fix: keep the default probe test run in CI Co-authored-by: MikeGrier <220633264+MikeGrier@users.noreply.github.com> --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c2973d99..109c0ebe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -225,7 +225,12 @@ jobs: env: RUST_BACKTRACE: 1 RUST_LIB_BACKTRACE: 1 - run: cargo test -p windows-platform-probes --features oracle-in-renderer --locked --no-fail-fast -- --include-ignored + run: cargo test -p windows-platform-probes --locked --no-fail-fast -- --include-ignored + - name: cargo test (windows-platform-probes oracle-in-renderer integration target) + env: + RUST_BACKTRACE: 1 + RUST_LIB_BACKTRACE: 1 + run: cargo test -p windows-platform-probes --features oracle-in-renderer --locked --test a_real_report_agrees_with_itself -- --include-ignored # The binaries print the numbers the tests deliberately do not assert: # host-specific magnitudes, which are exactly what an architecture # comparison needs and what a pass/fail cannot carry. From f07324b6689edb8d9df82f07205669788c0cf2a6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 17 Sep 2026 06:29:24 +0000 Subject: [PATCH 6/8] fix: isolate probe oracle feature test step Co-authored-by: MikeGrier <220633264+MikeGrier@users.noreply.github.com> --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 109c0ebe..cda10534 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -164,7 +164,12 @@ jobs: env: RUST_BACKTRACE: 1 RUST_LIB_BACKTRACE: 1 - run: cargo test --workspace --features windows-platform-probes/oracle-in-renderer --locked --no-fail-fast + run: cargo test --workspace --exclude windows-platform-probes --locked --no-fail-fast + - name: cargo test (windows-platform-probes, oracle feature) + env: + RUST_BACKTRACE: 1 + RUST_LIB_BACKTRACE: 1 + run: cargo test -p windows-platform-probes --features oracle-in-renderer --locked --no-fail-fast # The UNC current-directory test is ignored by default because it needs a # reachable administrative share (`\\localhost\C$`), which an ordinary # developer account does not have -- running it by default would report an From 99109f4911ee34d080cdf928112a0af491694bdb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 17 Sep 2026 06:29:49 +0000 Subject: [PATCH 7/8] fix: keep workspace tests on default probe features Co-authored-by: MikeGrier <220633264+MikeGrier@users.noreply.github.com> --- .github/workflows/ci.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cda10534..be304a74 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -164,12 +164,7 @@ jobs: env: RUST_BACKTRACE: 1 RUST_LIB_BACKTRACE: 1 - run: cargo test --workspace --exclude windows-platform-probes --locked --no-fail-fast - - name: cargo test (windows-platform-probes, oracle feature) - env: - RUST_BACKTRACE: 1 - RUST_LIB_BACKTRACE: 1 - run: cargo test -p windows-platform-probes --features oracle-in-renderer --locked --no-fail-fast + run: cargo test --workspace --locked --no-fail-fast # The UNC current-directory test is ignored by default because it needs a # reachable administrative share (`\\localhost\C$`), which an ordinary # developer account does not have -- running it by default would report an From be9e6840ece64d7a82ce666cda32293544230472 Mon Sep 17 00:00:00 2001 From: Mike Grier Date: Thu, 17 Sep 2026 02:33:45 -0400 Subject: [PATCH 8/8] Add serde dependency to Cargo.toml Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- crates/windows-platform-probes/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/windows-platform-probes/Cargo.toml b/crates/windows-platform-probes/Cargo.toml index 4a7b73a2..8b92ee56 100644 --- a/crates/windows-platform-probes/Cargo.toml +++ b/crates/windows-platform-probes/Cargo.toml @@ -227,6 +227,7 @@ windows-waitable-queues = { path = "../windows-waitable-queues", features = [ # declared explicitly above with `required-features = ["oracle-in-renderer"]`, # so ordinary unit-test builds keep exercising the `cfg(test)` arm while that # one target runs with the feature on. +serde = "1.0" serde_json = "1.0" [dependencies.windows-sys]