Performance work on this device has been verified against clippy, unit tests,
the feature matrix and device-side counters. None of those can see a rendering
regression. A branch of 59 commits — 21 code-changing, +7687/-820 across 38
files — was reset off wholesale because it had introduced graphical glitches,
and every one of those commits had been verified. The instruments were
performance instruments because the work was performance work, so the defect was
invisible by construction. Nothing lied; the right question was never asked.
Three probes already ask it. Each is a two-observation instrument — the guest
declares what it believes it drew and where, the host measures its own capture
at exactly those places — which is what separates "the guest declined to draw
it" from "this device lost it". None of them gated anything. That is the defect
this fixes.
`scripts/visual-gate/visual-gate.sh` is one entry point:
- It refuses to start on an unsettled guest. sshd answers well before the
desktop composites, and one probe run in that window read 12.2 fps with the
device idle at `duty=0.001`. It polls `uptime` for a 1-minute load average
under SETTLE_LOAD (1.0) up to SETTLE_TIMEOUT (420 s), and aborts if QEMU stops
matching, so a boot that died early cannot read as a clean run.
- It runs all three probes even when an earlier one fails. Which probe fails is
the diagnostic.
- It marks the fail log by byte offset before the first probe and applies the
six silent-loss classes over its own window only, never the accumulated log,
which spans builds. Byte offset rather than timestamp because the device's
`t=` clock does not correlate with the shell's — the same bound
`window-drag-probe` uses.
- One verdict line; exit 0 clean, 1 regression, 2 setup failure.
`--quick` cuts the trials to 5/3/3 for iteration; the README says a green
`--quick` is not a phase sign-off, and that a change whose failure mode needs a
second frame to appear wants the full gate run twice on one boot.
The counter parsing is its own script so it can be tested without a boot. That
split is the point: a parser that matches nothing prints the same six zeros a
clean run does, so a green gate would mean nothing and its output could not say
which. AGENTS.md carries the rule itself, next to the section on what a
screenshot cannot say.
Component: `scripts/`, x86/PCI and arm64 pathways alike; no Rust and no device
behavior.
Tests: `scripts/visual-gate/self-test.sh`, 10 cases over synthetic log text
quoted from the emitters, no guest or GPU needed. Mutation-checked twice:
dropping the `^` anchor on the line families fails exactly the
"matches its own prefix only" case, and matching route fields by prefix instead
of exactly fails exactly the "a longer field name is not this class" case.
`bash -n` clean on all three scripts. The gate's own refusal path was exercised
with no QEMU running and reported it.
Not verified: no live boot yet, so the gate has never run its three probes
end to end. That is the next step and it is what establishes the green baseline
at this HEAD before any Phase A change.
Co-Authored-By: Claude <noreply@anthropic.com>