eoc-meter: a GPU rise the oracle saw is not one the probe must have seen #250

Merged
dcharlot merged 1 commit from fix/eoc-meter-gpu-freshness into main 2026-10-14 08:55:50 -04:00

View file

@ -3390,13 +3390,23 @@ mod macos_ioreport {
handed.iter().filter_map(|s| s.iter().find(|(k, _)| k == key).map(|(_, v)| *v)).collect();
values.dedup();
if *lo != hi {
assert!(
values.len() >= 2,
"{key:?} moved {lo} -> {hi} across the oracle's reads, but every one of the {} samples the \
production probe took read {values:?}: its sampler is not sampling",
handed.len()
);
lines.push(format!("{}: moved {lo} -> {hi}, the probe read {} distinct values within it", key.0, values.len()));
// The oracle's two reads *bracket* the probe's samples, so a rise it
// saw can fall entirely outside the probe's own window. GPU energy
// rises only while the GPU works -- it is activity-driven, not a clock
// -- so on a shared host another process's short burst lands between
// the oracle's first read and the probe's first sample as easily as
// inside it. One value here is therefore no evidence of a sampler that
// does not sample, and asserting it was a rise the probe must also see
// failed once in ~300 CI runs on an otherwise green tree.
lines.push(if values.len() >= 2 {
format!("{}: moved {lo} -> {hi}, the probe read {} distinct values within it", key.0, values.len())
} else {
format!(
"{}: moved {lo} -> {hi} across the oracle's reads, but the probe read only {values:?}, \
so the rise fell outside its window and freshness is NOT asserted on it",
key.0
)
});
} else {
lines.push(format!("{}: held at {lo} across the bracket, so freshness is NOT asserted on it", key.0));
}