Component: menu-close probe (scripts only). Pathway: x86 macOS / Linux Vulkan, rail macos-15. No product code and no guest-visible behaviour changes. RETRACTION FIRST: `smoke-ctl` reported `VERDICT=BLACK_RECTANGLE` on the control binary with `new_black_frac=0.917071` on all six trials. That verdict is void. Re-scored with the metric below, all six of its frames score exactly 0, and all six are photographs of a fully open menu. Nothing about the black-rectangle defect was measured. Two independent defects produced it. 1. The score was the mask's own mean, not an intersection. The host captures are `srgba` -- four channels -- and `-negate` negates every channel, alpha with the rest. The thresholded frame came out fully transparent, so compositing it over the mask left the mask untouched and `%[fx:mean]` read back the mask: 0.917071, the same number for every frame of every trial, and large enough to trip the 0.10 threshold. The third constant this probe has reported as a measurement. The metric now flattens with `-alpha off -colorspace Gray` before thresholding and intersects with `-evaluate-sequence min`. Darken *is* min, but as a composite it is an alpha-aware blend of a source onto a destination, which is not the operation wanted; as a sequence operator it cannot be turned into a no-op by an alpha channel arriving from a different capture helper. Both changes are needed and each fixes the case alone. The self-test could not have caught this: it built its images with `xc:` and no alpha, so the one channel that broke the metric was the one channel the test did not have. It now builds `PNG32:` four-channel images, and it darkens the reference's top half against the frame's left half so the answer is the 0.25 quadrant while *both* operands measure 0.50. The old half-black case expected 0.50, which is also what returning either operand untouched produces -- the expected value coincided with the failure. On the new images the old pipeline scores 0.75 and this one scores 0.25. 2. The aim's tolerance was a flat 3 and the desktop is noisier than that. The open menu measured 193.06 at calibration and 199.697 seconds later with no input in between. Every later capture of a static open menu therefore read as "neither settled state", the aim declared the animation found at its very first offset, and all six trials photographed that static menu. Each settled state is now captured twice, 0.5 s apart with no input, and the tolerance is 2x the larger drift plus 3. A run whose two states are not separated by three times that noise floor ends METRIC_BLIND rather than scoring the noise. Against this boot's measured values the drifted open menu classifies as not-MID, which is what lets the aim keep scanning to the offsets where the grab lands after the dismiss. Verified: bash -n; both metric transitions demonstrated on four-channel images (0.75 -> 0.25) and on this boot's real frames (0.917071 -> 0); the tolerance transition checked against this boot's measured settled means. Not verified: still no boot has produced a menu-close verdict that means anything, on either binary. The A/B remains unrun. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
menu-close-probe
Photographs the dock context menu's close-in animation and says whether the region it vacates shows the desktop or shows black.
The reported defect: right-click a dock icon, then left-click to dismiss, and a black rectangle is left behind for the duration of the close animation, where the desktop should show through. It is intermittent across boots, so a run that does not see it is not evidence that it is gone — see Reading the result.
Running it
scripts/menu-close-probe/menu-close-probe.sh [TRIALS]
| Variable | Meaning |
|---|---|
QPID |
the guest to drive; defaults to the running qemu-system-x86_64 |
OUT |
where frames land; defaults to $TMPDIR/menu-close-probe |
ICON_X, ICON_Y |
the dock icon to right-click, in guest pixels |
AWAY_X, AWAY_Y |
where to click to dismiss, in guest pixels |
Exit codes are the verdict, and the third one matters as much as the other two:
| Exit | Verdict | Meaning |
|---|---|---|
| 0 | CLEAN |
the animation was sampled and the vacated region was not black |
| 1 | BLACK_RECTANGLE |
the animation was sampled and the region went black |
| 2 | — | the run did not sample the animation and says nothing about the device |
Why it aims the capture instead of chasing the animation
The host capture costs about 1 430 ms on the reference rig (six timed captures, 8 562 ms). The close animation is about 250 ms. A loop of captures taken after the dismiss click cannot sample it — every frame lands after it is over, and every trial reports the same settled mean. The probe's first version did exactly that and never produced a valid reading.
The capture's cost is nearly all setup: the frame is grabbed late, roughly 500 ms in. That is measurable — start a capture and open the menu 150 ms later, and the menu is in the resulting frame — and it is what makes the animation reachable. Start the capture, wait, then dismiss, and the grab lands inside the fade.
The delay is calibrated per run rather than assumed, because it is a property of the host compositor and not of the guest. A scan over five delays produces the fade as a ramp; on the reference rig:
menu open 147.4 no menu 96.0
dismiss at 0.34 s 88.4 already closed
dismiss at 0.38 s 92.7
dismiss at 0.42 s 106.9
dismiss at 0.46 s 131.7 <- inside the fade
dismiss at 0.50 s 147.4 still open
If no delay lands strictly between the two settled states, the probe exits 2 rather than reporting a verdict on frames that never contained the animation.
Why the menu rectangle is anchored, not differenced
Differencing a menu-open capture against a menu-closed one sounds like the way
to find the menu, and it does not work here. The two captures are more than a
second apart on a live desktop that repaints damage rectangles continuously, so
the changed-pixel bounding box comes back as the whole screen (measured:
1279x704+0+15). On a boot with the blank-desktop defect the background field
is itself churning between the two frames.
The menu's position is not actually unknown: it opens directly above the icon this script right-clicked. The box is derived from that icon and the capture's own dimensions, and then validated — if the box did not change when the menu opened, the right-click did not open a menu and the probe exits 2.
Why the score subtracts the no-menu frame
The score is the fraction of the menu box that is near-black in the animation frame and was not near-black with no menu on screen. A wallpaper with dark foliage in it reads near-black honestly; subtracting the settled no-menu frame is what keeps the probe from reporting the desktop as the defect.
On the reference rig that residual sits at 0.031 and varies by under 0.001 across trials, so the 0.10 threshold has a wide margin under it.
Reading the result
CLEAN means this boot, this many trials. The defect is reported as
intermittent across boots, and a single clean run does not establish a rate.
Repeat across boots, and quote the trial count and the worst fraction, not just
the verdict.