From 1debd37d0149a1f931a9d27bbc1a867f3b263c7b Mon Sep 17 00:00:00 2001 From: Gabriel Brown Date: Tue, 18 Aug 2026 15:05:12 -0400 Subject: [PATCH] Model rendered lock fallback in diagnostics --- tests/quickshell/panama-doctor-contract.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/quickshell/panama-doctor-contract.sh b/tests/quickshell/panama-doctor-contract.sh index eb6761a..8ba5fd8 100755 --- a/tests/quickshell/panama-doctor-contract.sh +++ b/tests/quickshell/panama-doctor-contract.sh @@ -8,6 +8,7 @@ set -euo pipefail repo_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" doctor="$repo_dir/config/dot/quickshell/scripts/panama-doctor" +theme_helper="$repo_dir/config/dot/quickshell/scripts/panama-theme-apps" fixture_root="$repo_dir/tests/quickshell/fixtures/doctor" fail() { @@ -148,11 +149,19 @@ check_status "$snapshot" desktop.hyprlock ok printf '%s\n' '{"generated":false,"path":"/fixture-secret-wallpaper.jpg","fallback":true,"error":"fixture-secret-token"}' \ >"$state_home/panama/hyprlock-status.json" +# A linked source checkout contains the template; installation renders the +# ignored machine-local fallback beside it. Model that installed state without +# writing an untracked file into the worktree under test. +rm "$config_home/hypr" +mkdir "$config_home/hypr" +cp "$repo_dir/config/dot/hypr/hyprlock.conf.template" \ + "$config_home/hypr/hyprlock.conf.template" +HOME="$home" XDG_CONFIG_HOME="$config_home" "$theme_helper" dark >/dev/null fallback_lock="$(run_doctor --json)" check_status "$fallback_lock" desktop.hyprlock warning assert_schema_and_redaction "$fallback_lock" -rm "$config_home/hypr" +rm -rf "$config_home/hypr" missing_lock="$(run_doctor --json)" check_status "$missing_lock" desktop.hyprlock error assert_schema_and_redaction "$missing_lock"