repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

test(quickshell): add self-contained gate runner

e8400119321751367f7edf3b0d64f59d1eeae754

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (5)

docs/super/inventory/2026-06-17-quickshell-self-contained-audit.md

Modified
13 13 `quickshell/nugu/audit.sh` checks repository state only:
15 -- required named-config files are present: `shell.qml`, `Theme.qml`, `nugu.json`, `README.md`, `COMPONENTS.md`, `IPC.md`, `EXTERNALS.md`, `TRANSITIONS.md`, `SERVICE.md`, `PARITY.md`, `HYPR_MIGRATION.md`, `ROLLOUT.md`, `PERF.md`, `STYLE.md`, `audit.sh`, `smoke.sh`, `live-check.sh`.
15 +- required named-config files are present: `shell.qml`, `Theme.qml`, `nugu.json`, `README.md`, `COMPONENTS.md`, `IPC.md`, `EXTERNALS.md`, `TRANSITIONS.md`, `SERVICE.md`, `PARITY.md`, `HYPR_MIGRATION.md`, `ROLLOUT.md`, `PERF.md`, `STYLE.md`, `audit.sh`, `smoke.sh`, `live-check.sh`, `gate.sh`.
16 16 - `README.md` links the required inventories, service/parity contracts, smoke/audit/live-check gates, named config command, and IPC command form.
17 17 - `live-check.sh` is executable and audited read-only: it must not link, start, stop, enable, disable, restart, or launch `qs -c nugu`.
18 18 - `smoke.sh` is executable and audited for self-contained temp `HOME`/`XDG_CONFIG_HOME`, named config launch, launcher/clipboard/power/native-notification/OSD IPC probes, cleanup trap, and no live link/service mutation.
19 +- `gate.sh` is executable and audited as the read-only/self-contained verification chain: audit, unit verify, smoke, live-check, optional strict live-check.
19 20 - every QML component is listed in `COMPONENTS.md` with purpose and rollout status.
20 21 - every `nugu` IPC method from `shell.qml` is listed in `IPC.md` with purpose and rollout status.
21 22 - component, IPC, and external inventory rows reject duplicates, malformed names, thin text, and placeholder wording.
53 54 systemd-analyze --user verify hypr/systemd/quickshell.service
54 55 sh -n quickshell/nugu/smoke.sh
55 56 sh -n quickshell/nugu/live-check.sh
56 -quickshell/nugu/smoke.sh
57 +sh -n quickshell/nugu/gate.sh
58 +quickshell/nugu/gate.sh
57 59 pgrep -a qs || true
72 74 live_check=ok
73 75 live_check_readonly=ok
74 76 smoke_contract=ok
77 +gate_contract=ok
75 78 inventory_tables=ok
76 79 transition_bridges=2
77 80 transition_contract=ok
90 93 rollout_boundary=ok
91 94 contrast_pairs=12
92 95 contrast_min=5.50
93 -required_files=shell.qml,Theme.qml,nugu.json,README.md,COMPONENTS.md,IPC.md,EXTERNALS.md,TRANSITIONS.md,SERVICE.md,PARITY.md,HYPR_MIGRATION.md,ROLLOUT.md,PERF.md,STYLE.md,audit.sh,smoke.sh,live-check.sh
96 +required_files=shell.qml,Theme.qml,nugu.json,README.md,COMPONENTS.md,IPC.md,EXTERNALS.md,TRANSITIONS.md,SERVICE.md,PARITY.md,HYPR_MIGRATION.md,ROLLOUT.md,PERF.md,STYLE.md,audit.sh,smoke.sh,live-check.sh,gate.sh
94 97 external_commands=awk,brightnessctl,cliphist,cut,grep,head,hyprctl,hyprlock,hyprpicker,hyprshot,iwctl,loginctl,makoctl,nu,playerctl,satty,sed,sh,systemctl,upower,uptime,uwsm,wezterm,wl-copy,wpctl
95 98 WARN transitional external bridge still present: cliphist
96 99 WARN transitional external bridge still present: makoctl
107 110 live_check=ok
108 111 live_check_readonly=ok
109 112 smoke_contract=ok
113 +gate_contract=ok
110 114 inventory_tables=ok
111 115 transition_bridges=2
112 116 transition_contract=ok
125 129 rollout_boundary=ok
126 130 contrast_pairs=12
127 131 contrast_min=5.50
128 -required_files=shell.qml,Theme.qml,nugu.json,README.md,COMPONENTS.md,IPC.md,EXTERNALS.md,TRANSITIONS.md,SERVICE.md,PARITY.md,HYPR_MIGRATION.md,ROLLOUT.md,PERF.md,STYLE.md,audit.sh,smoke.sh,live-check.sh
132 +required_files=shell.qml,Theme.qml,nugu.json,README.md,COMPONENTS.md,IPC.md,EXTERNALS.md,TRANSITIONS.md,SERVICE.md,PARITY.md,HYPR_MIGRATION.md,ROLLOUT.md,PERF.md,STYLE.md,audit.sh,smoke.sh,live-check.sh,gate.sh
129 133 external_commands=awk,brightnessctl,cliphist,cut,grep,head,hyprctl,hyprlock,hyprpicker,hyprshot,iwctl,loginctl,makoctl,nu,playerctl,satty,sed,sh,systemctl,upower,uptime,uwsm,wezterm,wl-copy,wpctl
130 134 WARN transitional external bridge still present: cliphist
131 135 WARN transitional external bridge still present: makoctl
132 -smoke_exit=0
136 +gate_exit=0
133 137 --- lingering qs ---
136 -The smoke runner now executes the audit before launching `qs -c nugu` with temporary `HOME` and `XDG_CONFIG_HOME`. It also opens/closes launcher and clipboard surfaces, verifies power confirmations stay dry-run, toggles the native notification loader only on the private smoke bus, and probes non-destructive OSD IPC. The rollout runbook is audited as documentation only; it does not authorize live mutation.
140 +The smoke runner now executes the audit before launching `qs -c nugu` with temporary `HOME` and `XDG_CONFIG_HOME`. It also opens/closes launcher and clipboard surfaces, verifies power confirmations stay dry-run, toggles the native notification loader only on the private smoke bus, and probes non-destructive OSD IPC. `gate.sh` now wraps audit, unit verification, smoke, and live readiness in one non-mutating command. The rollout runbook is audited as documentation only; it does not authorize live mutation.
138 142 ## Boundary

quickshell/nugu/README.md

Modified
24 24 quickshell/nugu/audit.sh
25 25 quickshell/nugu/smoke.sh
26 26 quickshell/nugu/live-check.sh
27 +quickshell/nugu/gate.sh
27 28 NUGU_QS_SMOKE_SCREENSHOT_DIR=/tmp/nugu-qs-theme-smoke quickshell/nugu/smoke.sh
37 38 `STYLE.md` records the audited Nugu style/font/color contract.
38 39 `PARITY.md` maps current companion apps/tools to their Quickshell replacements
39 40 and retirement gates. `HYPR_MIGRATION.md` maps current Hypr binds/helpers to
40 -future Quickshell IPC targets. `live-check.sh` reports final rollout blockers, including old Hypr companion refs, without mutating live services or links. The audit checks that required named-config files are present, the rollout runbook keeps approval/rollback boundaries visible, the performance budget documents every polling/action boundary, the style contract keeps IBM Plex/Nugu-token usage enforced, every QML component and IPC method
41 +future Quickshell IPC targets. `live-check.sh` reports final rollout blockers, including old Hypr companion refs, without mutating live services or links. `gate.sh` runs the current read-only/self-contained verification chain. The audit checks that required named-config files are present, the rollout runbook keeps approval/rollback boundaries visible, the performance budget documents every polling/action boundary, the style contract keeps IBM Plex/Nugu-token usage enforced, every QML component and IPC method
41 42 are documented with non-thin inventory rows, QML imports stay local/Qt/Quickshell, every component has an
42 43 early decision/why comment, QML has no unresolved TODO/stub comments, local resources
43 44 are audited, the bundled palette matches

quickshell/nugu/ROLLOUT.md

Modified
13 13 quickshell/nugu/smoke.sh
14 14 quickshell/nugu/live-check.sh
15 15 quickshell/nugu/live-check.sh --strict
16 +quickshell/nugu/gate.sh
17 +quickshell/nugu/gate.sh --strict
18 20 `live-check.sh --strict` must pass before normal rollout. If any blocker is

quickshell/nugu/audit.sh

Modified
23 23 decision_comment_files = set()
24 24 style_font_refs = 0
25 25 style_hex_refs = 0
26 -required_files = ("shell.qml", "Theme.qml", "nugu.json", "README.md", "COMPONENTS.md", "IPC.md", "EXTERNALS.md", "TRANSITIONS.md", "SERVICE.md", "PARITY.md", "HYPR_MIGRATION.md", "ROLLOUT.md", "PERF.md", "STYLE.md", "audit.sh", "smoke.sh", "live-check.sh")
26 +required_files = ("shell.qml", "Theme.qml", "nugu.json", "README.md", "COMPONENTS.md", "IPC.md", "EXTERNALS.md", "TRANSITIONS.md", "SERVICE.md", "PARITY.md", "HYPR_MIGRATION.md", "ROLLOUT.md", "PERF.md", "STYLE.md", "audit.sh", "smoke.sh", "live-check.sh", "gate.sh")
28 28 for name in required_files:
29 29 if not (config_dir / name).exists():
65 65 if re.search(pattern, smoke_code):
66 66 errors.append(f"smoke.sh contains live-mutating or live-config command matching {pattern!r}")
68 +gate_path = config_dir / "gate.sh"
69 +if gate_path.exists():
70 + if not os.access(gate_path, os.X_OK):
71 + errors.append("gate.sh must be executable")
72 + gate_source = gate_path.read_text()
73 + gate_code = "\n".join(line.split("#", 1)[0] for line in gate_source.splitlines())
74 + required_gate_markers = (
75 + "audit.sh",
76 + "systemd-analyze --user verify",
77 + "smoke.sh",
78 + "live-check.sh",
79 + "live-check.sh\" --strict",
80 + "temporary HOME/XDG_CONFIG_HOME",
81 + )
82 + for marker in required_gate_markers:
83 + if marker not in gate_source:
84 + errors.append(f"gate.sh missing verification marker {marker!r}")
85 + forbidden_gate_patterns = (
86 + r"\bsystemctl\s+--user\s+(start|stop|restart|try-restart|reload|enable|disable|mask|unmask|daemon-reload)\b",
87 + r"\bjust\s+(link|setup|services|unlink)\b",
88 + r"\bjava\s+bootstripper\.java\s+(clean|setup|link)\b",
89 + r"\$HOME/\.config/quickshell",
90 + )
91 + for pattern in forbidden_gate_patterns:
92 + if re.search(pattern, gate_code):
93 + errors.append(f"gate.sh contains live-mutating or live-config command matching {pattern!r}")
68 95 live_check_path = config_dir / "live-check.sh"
69 96 if live_check_path.exists():
70 97 if not os.access(live_check_path, os.X_OK):
83 110 readme_path = config_dir / "README.md"
84 111 if readme_path.exists():
85 112 readme_text = readme_path.read_text()
86 - for marker in ("COMPONENTS.md", "IPC.md", "EXTERNALS.md", "TRANSITIONS.md", "SERVICE.md", "PARITY.md", "HYPR_MIGRATION.md", "ROLLOUT.md", "PERF.md", "STYLE.md", "audit.sh", "smoke.sh", "live-check.sh", "qs -c nugu", "qs ipc -c nugu"):
113 + for marker in ("COMPONENTS.md", "IPC.md", "EXTERNALS.md", "TRANSITIONS.md", "SERVICE.md", "PARITY.md", "HYPR_MIGRATION.md", "ROLLOUT.md", "PERF.md", "STYLE.md", "audit.sh", "smoke.sh", "live-check.sh", "gate.sh", "qs -c nugu", "qs ipc -c nugu"):
87 114 if marker not in readme_text:
88 115 errors.append(f"README.md missing self-contained entry marker {marker!r}")
629 656 print("live_check=ok")
630 657 print("live_check_readonly=ok")
631 658 print("smoke_contract=ok")
659 +print("gate_contract=ok")
632 660 print("inventory_tables=ok")
633 661 print(f"transition_bridges={len(transition_rows)}")
634 662 print("transition_contract=ok")

quickshell/nugu/gate.sh

Added
new file mode 100755
1 +#!/bin/sh
2 +set -eu
4 +# One command for the current self-contained gate. It intentionally does not
5 +# mutate live links or services; smoke uses a temporary HOME/XDG_CONFIG_HOME and
6 +# live-check reports blockers without fixing them.
7 +config_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
8 +repo_dir=$(CDPATH= cd -- "$config_dir/../.." && pwd -P)
9 +strict=${1:-}
11 +printf '%s\n' '== nugu quickshell audit =='
12 +"$config_dir/audit.sh"
14 +printf '%s\n' '== quickshell service unit verify =='
15 +systemd-analyze --user verify "$repo_dir/hypr/systemd/quickshell.service"
17 +printf '%s\n' '== nugu quickshell scaffold smoke =='
18 +"$config_dir/smoke.sh"
20 +printf '%s\n' '== nugu quickshell live readiness =='
21 +"$config_dir/live-check.sh"
23 +if [ "$strict" = "--strict" ]; then
24 + printf '%s\n' '== nugu quickshell strict live readiness =='
25 + "$config_dir/live-check.sh" --strict
26 +fi