Let the contracts assert properties, not the machine they were written on

The first run of the suite on a laptop found five contracts asserting the
desktop instead of the code. settings-system pinned DP-2 at 4500x3000 in
XRGB2101010; it now asks Hyprland what is actually primary. ssh-keys hardcoded
id_ed25519; it now uses whichever key exists. switcher's live half stepped a
session with one window, which step() deliberately refuses. displays raced the
service's revert readback -- the compositor looks restored while verification
still holds busy, so an immediate apply was refused with its error already
cleared; the harness now exposes settled and the contract waits for it.

declared-dependencies gets an OPTIONAL list for docker: the aliases serve
machines that run Docker deliberately, Panama's runtime is rootless podman,
and a missing docker fails by naming the command, which is loud enough.

Claude-Session: https://claude.ai/code/session_01Epx9ZC1gwm81K3jm9x9CKh
This commit is contained in:
Gabriel Brown
2026-08-23 10:32:17 -04:00
parent 6510fdda0f
commit 12f6b2a310
6 changed files with 58 additions and 8 deletions
+13 -2
View File
@@ -41,8 +41,19 @@ for _ in $(seq 1 40); do
fi
sleep 0.1
done
jq -e '.monitorName == "DP-2" and .width == 4500 and .height == 3000 and .scale == 1.5 and .format == "XRGB2101010"' <<<"$status" >/dev/null \
|| fail "live monitor data was not normalized: $status"
# Against the live compositor, not a named machine: this once asserted DP-2 at
# 4500x3000 in XRGB2101010, which pinned the desktop it was written on and
# could never pass on a laptop's eDP-1. The property is that SystemSettings
# mirrors whatever monitor is actually primary, normalized -- so ask Hyprland
# what that is.
live_monitor="$(hyprctl -j monitors | jq -c '.[0]')"
jq -e --argjson live "$live_monitor" '
.monitorName == $live.name
and .width == $live.width
and .height == $live.height
and ((.scale - $live.scale) | fabs) < 0.001
and (.format | length) > 0' <<<"$status" >/dev/null \
|| fail "live monitor data was not normalized: $status (compositor: $live_monitor)"
[[ "$(qs_for_harness ipc call settings-system-test panelAllowed '__definitely_not_a_panel__' | jq -r .)" == "false" ]] \
|| fail 'unsupported GNOME panel was accepted'