gardesk/garcard / 96d60c1

Browse files

Add sprint 08 integration certification checks

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
96d60c15e845afc620679ba23e0d06babbf3b39e
Parents
01264c2
Tree
f01079f

3 changed files

StatusFile+-
M README.md 2 0
A examples/sprint-08-integration-certification.md 29 0
A examples/validate-sprint-08-integration.sh 81 0
README.mdmodified
@@ -62,6 +62,8 @@ gartk prompt path with a persistent in-process modal session and falls back to
62
 9. `examples/validate-sprint-07.sh`
62
 9. `examples/validate-sprint-07.sh`
63
 10. `examples/sprint-08-parity-matrix.md`
63
 10. `examples/sprint-08-parity-matrix.md`
64
 11. `examples/validate-sprint-08-parity.sh`
64
 11. `examples/validate-sprint-08-parity.sh`
65
+12. `examples/sprint-08-integration-certification.md`
66
+13. `examples/validate-sprint-08-integration.sh`
65
 
67
 
66
 ## Troubleshooting
68
 ## Troubleshooting
67
 1. `Authorization requires authentication but no agent is available`
69
 1. `Authorization requires authentication but no agent is available`
examples/sprint-08-integration-certification.mdadded
@@ -0,0 +1,29 @@
1
+# Sprint 08 Integration Certification
2
+
3
+## Static Certification
4
+1. `./examples/validate-sprint-08-integration.sh`
5
+
6
+Expected:
7
+1. Required integration checks pass for:
8
+   - gar startup autostart default
9
+   - user service install references
10
+   - gargears garcard discovery/panel/adapter presence
11
+2. Optional checks may emit warnings for pending UX/control-surface enhancements.
12
+
13
+## Runtime Certification
14
+1. `cargo run -q -p garcard -- daemon`
15
+2. `cargo run -q -p garcardctl -- status`
16
+3. `cargo run -q -p garcardctl -- diagnose`
17
+4. `cargo run -q -p garcardctl -- temp-list`
18
+
19
+Expected:
20
+1. Daemon remains reachable and healthy through the full command set.
21
+2. `status` and `diagnose` provide authority + subject visibility for operators.
22
+
23
+## Service Lifecycle Certification
24
+1. `systemctl --user restart garcard.service`
25
+2. `garcardctl ping`
26
+3. `garcardctl status`
27
+
28
+Expected:
29
+1. User service restart restores control path without stale-socket cleanup.
examples/validate-sprint-08-integration.shadded
@@ -0,0 +1,81 @@
1
+#!/usr/bin/env bash
2
+set -euo pipefail
3
+
4
+ROOT_DIR="${1:-..}"
5
+FAILURES=0
6
+WARNINGS=0
7
+
8
+pass() {
9
+  echo "PASS: $1"
10
+}
11
+
12
+fail() {
13
+  echo "FAIL: $1"
14
+  FAILURES=$((FAILURES + 1))
15
+}
16
+
17
+warn() {
18
+  echo "WARN: $1"
19
+  WARNINGS=$((WARNINGS + 1))
20
+}
21
+
22
+require_pattern() {
23
+  local path="$1"
24
+  local pattern="$2"
25
+  local label="$3"
26
+  if [[ ! -f "${path}" ]]; then
27
+    fail "${label} (missing: ${path})"
28
+    return
29
+  fi
30
+
31
+  if grep -Eq "${pattern}" "${path}"; then
32
+    pass "${label}"
33
+  else
34
+    fail "${label} (pattern not found in ${path})"
35
+  fi
36
+}
37
+
38
+optional_pattern() {
39
+  local path="$1"
40
+  local pattern="$2"
41
+  local label="$3"
42
+  if [[ ! -f "${path}" ]]; then
43
+    warn "${label} (missing: ${path})"
44
+    return
45
+  fi
46
+
47
+  if grep -Eq "${pattern}" "${path}"; then
48
+    pass "${label}"
49
+  else
50
+    warn "${label} (pattern not found in ${path})"
51
+  fi
52
+}
53
+
54
+echo "Sprint 08 integration certification checks against: ${ROOT_DIR}"
55
+
56
+require_pattern "${ROOT_DIR}/config/gar/init.lua" 'gar\.exec_once\("garcard daemon"\)' \
57
+  "Gar startup defaults autostart garcard"
58
+require_pattern "${ROOT_DIR}/install.sh" 'garcard\.service' \
59
+  "Installer wires garcard user service unit"
60
+require_pattern "${ROOT_DIR}/install.sh" 'garcardctl status' \
61
+  "Installer docs include garcardctl status guidance"
62
+
63
+require_pattern "${ROOT_DIR}/gargears/gargears/src/ipc/discovery.rs" 'garcard\.sock' \
64
+  "gargears discovery includes garcard socket"
65
+require_pattern "${ROOT_DIR}/gargears/gargears/src/panels/mod.rs" 'Component::Garcard' \
66
+  "gargears panel registry includes garcard component"
67
+require_pattern "${ROOT_DIR}/gargears/gargears/src/ipc/adapters/garcard.rs" 'pub struct GarcardAdapter' \
68
+  "gargears has garcard IPC adapter"
69
+
70
+optional_pattern "${ROOT_DIR}/install.sh" 'garcardctl diagnose' \
71
+  "Installer docs surface diagnostics command"
72
+optional_pattern "${ROOT_DIR}/gargears/gargears/src/ipc/adapters/garcard.rs" 'diagnose|temp-list|temp-revoke' \
73
+  "gargears adapter exposes lifecycle control methods"
74
+
75
+if [[ "${FAILURES}" -gt 0 ]]; then
76
+  echo "Integration certification checks failed: ${FAILURES} failure(s), ${WARNINGS} warning(s)."
77
+  exit 1
78
+fi
79
+
80
+echo "Integration certification checks passed with ${WARNINGS} warning(s)."
81
+exit 0