Skip to content

validate: catch the host that passes every check and still eats every task - #67

Merged
rcurranmoz merged 1 commit into
mainfrom
validate-display-fitness
Aug 14, 2026
Merged

validate: catch the host that passes every check and still eats every task#67
rcurranmoz merged 1 commit into
mainfrom
validate-display-fitness

Conversation

@rcurranmoz

Copy link
Copy Markdown
Collaborator

--quarantine-on-register holds a fresh host "pending validation" — and nothing validated anything. So the only way a host proved itself unfit was by failing real work. macmini-m4-242 destroyed 15 production tasks (mochitest, jsreftest, web-platform-tests) at ~43s each before anyone looked.

Its KVM presented 1280x1024@75Hz, and mozharness fatally halts a pre-test refresh-rate check at anything but 60Hz — so every task died before running a single test. Every other signal on that host was perfect: puppet green, sentinel present, worker up, disk fine, semaphores byte-identical to a working host.

reprovision validate <host>
reprovision batch <file> --action validate

Reading the display is the interesting part

Over a plain SSH login as admin, CoreGraphics has no window server and answers refresh=0.0, 0x0not an error, just zeros, which a naive check sails straight past. So ssh.display_mode() hops into the console user's session with launchctl asuser (the same technique the Safari automation uses) and treats all-zeros as unknown, never as fine.

Verified on a known-good/known-bad pair:

host refresh resolution
m4-242 75.00 Hz 1280x1024 failed 15/15 tasks
m4-243 60.00 Hz 1920x1080 healthy

Why this is not part of preflight

That's where I first proposed putting it, and it was wrong. preflight runs before the bootstrap, and cltbld does not exist until puppet creates it. There's no session to query, so a preflight version would silently pass exactly the fresh hosts it exists to catch.

Deliberate scoping

  • Gates on refresh rate only, at 60Hz — the number mozharness itself enforces. validate should agree with what CI will decide, not invent a second standard.
  • Resolution is reported, not gated — it varies legitimately across the fleet.
  • A down worker warns rather than fails — these hosts reboot between tasks, so it can just mean we caught one mid-cycle.
  • Exit 2 (skipped) when not yet bootstrapped, 1 when bootstrapped and unfit. Read-only throughout — safe on live workers.

216 pass, ruff check . clean on the pinned 0.15.19.

Ref: RELOPS-2515

🤖 Generated with Claude Code

… task

`--quarantine-on-register` holds a fresh host "pending validation" and nothing
validated anything, so the only way a host proved itself unfit was by failing real
work. macmini-m4-242 destroyed 15 production tasks (mochitest, jsreftest,
web-platform-tests) at ~43s each before anyone looked.

Its KVM presented 1280x1024@75Hz. mozharness fatally halts a pre-test refresh-rate
check at anything but 60Hz, so every task died before running a single test. Every
other signal on that host was perfect: puppet green, sentinel present, worker up,
disk fine, semaphores byte-identical to a working host.

  reprovision validate <host>
  reprovision batch <file> --action validate

Reading the display is the interesting part. Over a plain SSH login as admin,
CoreGraphics has no window server and answers refresh=0.0, 0x0 -- not an error,
just zeros, which a naive check sails straight past. So ssh.display_mode() hops
into the console user's session with `launchctl asuser`, the same technique the
Safari automation uses, and treats all-zeros as "unknown" rather than "fine".
Verified on a known-good/known-bad pair:

  m4-242  75.00Hz  1280x1024   <- failed 15/15 tasks
  m4-243  60.00Hz  1920x1080   <- healthy

This is why it is NOT part of preflight, which is where I first put it: preflight
runs before the bootstrap, and cltbld does not exist until puppet creates it. A
preflight version would silently pass exactly the fresh hosts it exists to catch.

Gates on refresh rate only, at 60Hz, because that is the number mozharness itself
enforces -- validate should agree with what CI will decide rather than invent a
second standard. Resolution varies legitimately across the fleet, so it is
reported, not gated. A down worker warns rather than fails: these hosts reboot
between tasks, so it can just mean we caught one mid-cycle.

Exit 2 (skipped) when the host hasn't bootstrapped; exit 1 when it has and is
unfit. Read-only throughout -- safe on live workers.

Ref: RELOPS-2515

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@rcurranmoz
rcurranmoz requested a review from a team as a code owner August 14, 2026 16:33
@rcurranmoz
rcurranmoz merged commit 1be34f1 into main Aug 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant