dotfiles bugabingas dorkfiles
owned by bugabinga
README Source History Refs Compare Notes Search Review guide test(quickshell): audit inventory row quality
9aaf208f090417f3a7595d5478d6fc74f58db0b1
Oliver Jan Krylow <oliver@bugabinga.net > · 17 Jun 2026
unsigned
Browse files Compare with HEAD
Changed files (4) docs/super/inventory/2026-06-17-quickshell-self-contained-audit.md Modified 15 15 - required named-config files are present: `shell.qml`, `Theme.qml`, `nugu.json`, `README.md`, `COMPONENTS.md`, `IPC.md`, `EXTERNALS.md`, `SERVICE.md`, `audit.sh`, `smoke.sh`.
16 16 - every QML component is listed in `COMPONENTS.md` with purpose and rollout status.
17 17 - every `nugu` IPC method from `shell.qml` is listed in `IPC.md` with purpose and rollout status.
18 + - component, IPC, and external inventory rows reject duplicates, malformed names, thin text, and placeholder wording.
18 19 - every approved executable boundary is listed in `EXTERNALS.md` with status and reason, and stale unused rows fail.
19 20 - future service rollout is documented in `SERVICE.md`; `hypr/systemd/quickshell.service` must start `qs -c nugu`, and `x230.symlinks` must link both config and service.
20 21 - QML imports are limited to Qt, Quickshell, and local `import "."`.
57 58 documented_external_commands=25
58 59 detected_external_commands=25
59 61 service_contract=ok
72 74 documented_external_commands=25
73 75 detected_external_commands=25
74 77 service_contract=ok
quickshell/nugu/IPC.md Modified 55 55 | `osdPickColor` | Pick a color and show OSD. | Implemented; interactive validation pending. |
56 56 | `lastOsdAction` | Report last OSD command result for tests. | Smoke/dry-run helper. |
57 57 | `openLauncher` | Open native desktop-entry launcher with optional query. | Keyboard/app-launch verified; bind migration pending. |
58 - | `closeLauncher` | Close launcher. | Verified. |
59 - | `launcherVisible` | Report launcher visibility. | Verified. |
60 - | `launcherMatchCount` | Report launcher result count. | Verified. |
61 - | `launcherFirstMatchName` | Report first launcher match name. | Verified. |
58 + | `closeLauncher` | Close launcher. | Launcher close IPC verified. |
59 + | `launcherVisible` | Report launcher visibility. | Launcher visibility IPC verified. |
60 + | `launcherMatchCount` | Report launcher result count. | Launcher query IPC verified. |
61 + | `launcherFirstMatchName` | Report first launcher match name. | Launcher query IPC verified. |
62 62 | `openClipboardPicker` | Open clipboard picker with optional query. | Verified frontend; cliphist bridge remains. |
63 - | `closeClipboardPicker` | Close clipboard picker. | Verified. |
64 - | `clipboardPickerVisible` | Report clipboard picker visibility. | Verified. |
65 - | `clipboardPickerMatchCount` | Report clipboard picker result count. | Verified. |
66 - | `clipboardPickerFirstPreview` | Report first clipboard preview text. | Verified. |
63 + | `closeClipboardPicker` | Close clipboard picker. | Clipboard close IPC verified. |
64 + | `clipboardPickerVisible` | Report clipboard picker visibility. | Clipboard visibility IPC verified. |
65 + | `clipboardPickerMatchCount` | Report clipboard picker result count. | Clipboard query IPC verified. |
66 + | `clipboardPickerFirstPreview` | Report first clipboard preview text. | Clipboard query IPC verified. |
67 67 | `chooseClipboardIndex` | Copy selected clipboard result by index. | Verified frontend; cliphist bridge remains. |
68 68 | `openPowerMenu` | Open confirmed power menu. | Dry-run matrix verified. |
69 69 | `closePowerMenu` | Close power menu and clear pending action. | Dry-run matrix verified. |
quickshell/nugu/README.md Modified 31 31 `EXTERNALS.md` inventories every approved executable boundary. `SERVICE.md`
32 32 documents the future user-service rollout contract without activating it. The
33 33 audit checks that required named-config files are present, every QML component and IPC method
34 - are documented, QML imports stay local/Qt/Quickshell, every component has an
34 + are documented with non-thin inventory rows, QML imports stay local/Qt/Quickshell, every component has an
35 35 early decision comment, QML has no unresolved TODO/stub comments, local resources
36 36 are audited, the bundled palette matches
37 37 `hypr/generated/nugu.json`, critical Nugu foreground/background pairs keep at
quickshell/nugu/audit.sh Modified 29 29 errors.append(
"no QML files found" )
31 + def inventory_rows(path, label, expected_pattern)
: 33 + if not path.exists()
: 35 + for number, line
in enumerate(path.read_text()
.splitlines (), 1):
36 + if not line.startswith(
"| `"): 38 + cells = [cell.strip() for cell in line.strip().strip(" | ").split(" | ")] 40 + errors.append(f"{label}:{number} : inventory row needs name, why, and status/reason columns") 42 + match = re.fullmatch(r"`([^`]+)`" , cells
[ 0
] )
45 + name = match.group(1)
46 + if not re.fullmatch(expected_pattern, name)
: 47 + errors.append(f
"{label}:{number}: malformed inventory name {name!r}" )
49 + errors.append(f
"{label}:{number}: duplicate inventory row {name!r}" )
50 + for index, cell
in enumerate(cells
[ 1:3
] , 1)
: 51 + terse_allowed = label ==
"EXTERNALS.md" and index == 1 and cell in (
"approved" ,
"transitional" )
52 + if not terse_allowed and len(cell)
< 12 : 53 + errors.append(f
"{label}:{number}: thin inventory text for {name!r}: {cell!r}" )
54 + if re.search(r
"\b(TODO|FIXME|XXX|HACK|stub|placeholder)\b" , cell, re.I)
: 55 + errors.append(f
"{label}:{number}: unresolved placeholder inventory text for {name!r}" )
56 + rows[name] = cells
[ 1:
] 31 59 components_doc = config_dir /
"COMPONENTS.md" 32 60 if components_doc.exists ():
33 - documented = set(re.findall(r
"`([^`]+\.qml)`", components_doc.read_text())) 61 + component_rows = inventory_rows(components_doc,
"COMPONENTS.md" , r
"[A-Za-z0-9_]+\.qml" )
62 + documented = set(component_rows)
34 63 actual = {path.name for path in qml_files}
35 64 missing = sorted(actual - documented)
36 65 stale = sorted(documented - actual)
46 75 ipc_methods = set(re.findall(r
"\bfunction\s+([A-Za-z0-9_]+)\s*\(" , ipc_block))
47 76 ipc_doc = config_dir /
"IPC.md" 48 77 if ipc_doc.exists ():
49 - documented_ipc = set(re.findall(r
"^\| `([A-Za-z0-9_]+)` \|" , ipc_doc.read_text(), re.M))
78 + ipc_rows = inventory_rows(ipc_doc,
"IPC.md" , r
"[A-Za-z0-9_]+" )
79 + documented_ipc = set(ipc_rows)
50 80 missing_ipc = sorted(ipc_methods - documented_ipc)
51 81 stale_ipc = sorted(documented_ipc - ipc_methods)
52 82 for name
in missing_ipc:
194 224 external_commands = {}
195 225 external_status = {}
196 226 if externals_doc.exists ():
197 - for match in re.finditer(r
"^\| `([^`]+)` \| ( [^ | ] +) \| ( [^ | ] +) \|$", externals_doc.read_text(), re.M): 198 - command = match.group(1) 199 - status = match.group(2).strip() 200 - reason = match.group(3).strip() 227 + external_rows = inventory_rows(externals_doc,
"EXTERNALS.md" , r
"[A-Za-z0-9_.+-]+" )
228 + for command, cells
in external_rows.items()
: 231 + if status not in (
"approved" ,
"transitional" )
: 232 + errors.append(f
"EXTERNALS.md: invalid status {status!r} for {command!r}" )
201 233 external_commands[command] = reason
202 234 external_status[command] = status
203 235 if not external_commands:
247 279 print(f
"documented_ipc={len(documented_ipc)}" )
248 280 print(f
"documented_external_commands={len(external_commands)}" )
249 281 print(f
"detected_external_commands={len(detected)}" )
282 + print(
"inventory_tables=ok" )
250 283 print(
"service_contract=ok" )
251 284 print(f
"contrast_pairs={len(contrast_pairs)}" )
252 285 if contrast_pairs: