Repository navigation
Make the probe build-identity test say it cannot tell, rather than fail, when both probe crates share a version - #162
Merged
Conversation
… probe crates apart says so instead of failing this_crate_reads_its_own_stamps_not_the_placement_probes asserted that this crate's version and windows-placement-probe's differ, to be sure it could tell their stamps apart. Both are calendar-versioned, so a release of both on one day gives them one version, and the release pull request that bumped both on 2026-10-22 failed five CI jobs on it. The test now asks a pure function, whose_stamps, whether the versions can say whose stamps an identity carries: ours, the placement probe's, or not knowable when the versions coincide. In that last case it prints why and passes. whose_stamps is tested in both directions, including that equal versions answer neither way. The case that failed CI was reproduced by giving both crates one version, where the old test failed and the new one passes and prints the skip. What this leaves unchecked on a day both crates are released is this_build() being rewired to the placement probe's BuildIdentity::current(). That is recorded in the design notes with what would change the answer (a crate name in BuildIdentity, not chosen), and declared in the sabotage manifest's notCoveredHere, since an entry for it would be caught or missed by the date. Chosen by the engineer, 2026-10-22, from three options. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new classifier and its tests treat an unrelated identity as indeterminate when the expected versions match, contrary to the stated rejection behavior.
1 open issue
What changed in this PR
Adjusts the probe build-identity test to tolerate matching calendar versions, addressing the release-test failure described in #160 without changing production APIs.
Changes:
- Adds a version-based classifier and tests for stamp attribution.
- Reports when matching versions prevent distinguishing the two crates.
- Documents the detection gap and why it has no sabotage entry.
| File | Description |
|---|---|
| crates/windows-platform-probes/src/build_identity/tests.rs | Adds stamp classification and handles matching versions. |
| crates/windows-platform-probes/sabotage.json | Records the version-dependent coverage limitation. |
| crates/windows-platform-probes/DESIGN-NOTES.md | Documents the chosen approach and structural alternative. |
Review effort: Balanced
Comment on lines
+51
to
+52
| if ours == theirs { | ||
| Reading::CannotTell |
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.

Summary
Fixes the five red CI jobs on the release PR (#160), which come from one test.
windows-platform-probesbuild_identity::tests::this_crate_reads_its_own_stamps_not_the_placement_probesasserted that this crate's version andwindows-placement-probe's differ, because the version is the only thing that tells their build stamps apart. Both are calendar-versioned, so a release that bumps both on one day gives them one version, and #160 gives both2026.1022.0. Any such release fails the same way.The test now asks a pure function,
whose_stamps, whether the versions can say whose stamps an identity carries: ours, the placement probe's, or not knowable when they coincide. In the last case it prints why and passes. The function is tested in both directions, including that equal versions answer neither way, and that an identity carrying neither version is an error rather than a reading.What it leaves unchecked
On a day both crates are released,
this_build()being rewired to the placement probe'sBuildIdentity::current()is not detected. The compiler already refuses the other crate's stamp variables, so that rewiring is the one way left to read the wrong crate. The skip is visible only with the test's output shown.This is option 1 of three put to the engineer. The structural fix, a crate name in
BuildIdentity, would let the check hold on every date, but it changeswindows-placement-probe's public type and what a report renders, so it was not chosen. It is recorded with that reason in the crate's design notes, and not scheduled. No sabotage entry covers the rewiring, since whether it is caught would follow the calendar; the manifest declares it innotCoveredHere.Verification
testcommit triggers no release, so this PR does not change what chore: release main #160 proposes for any crate.