From c070bea782aa725be4b25963d144d57122dfb5b5 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 15 Oct 2026 22:59:27 +0200 Subject: [PATCH] Declare how the clipboard daemon is ready, so the count of resources without health stays at 62 (ADR 0240 rule 8, issues 743, 750) --- modules/clipmenu/cmd/clipmenu-tools/manifest_test.go | 5 +++++ modules/clipmenu/module.json | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/clipmenu/cmd/clipmenu-tools/manifest_test.go b/modules/clipmenu/cmd/clipmenu-tools/manifest_test.go index 265d199a..22378f46 100644 --- a/modules/clipmenu/cmd/clipmenu-tools/manifest_test.go +++ b/modules/clipmenu/cmd/clipmenu-tools/manifest_test.go @@ -45,6 +45,11 @@ func TestTheDaemonIsTheOperatorsUserUnitEnabledAndRunning(t *testing.T) { t.Fatalf("daemon %s = %v, want %v: %v", k, svc[k], v, svc) } } + // ADR 0240 rule 8: a long-running resource says how it is ready. The launcher keeps the unit active while + // it waits for the display and execs clipmenud, so the unit's state is the daemon's own liveness. + if h, _ := svc["health"].(map[string]any); h["kind"] != "unit" { + t.Fatalf("daemon health = %v, want kind unit", svc["health"]) + } dropin := m.resource(t, "daemon-dropin") content, _ := dropin["content"].(string) if dropin["path"] != "${machine:account-home}/.config/systemd/user/clipmenud.service.d/mesh.conf" || diff --git a/modules/clipmenu/module.json b/modules/clipmenu/module.json index ac1c6c9c..c62950c2 100644 --- a/modules/clipmenu/module.json +++ b/modules/clipmenu/module.json @@ -84,7 +84,10 @@ "scope": "user", "user": "${machine:account}", "state": "running", - "boot": "enabled" + "boot": "enabled", + "health": { + "kind": "unit" + } } ], "build": {