@crvouga/homelab 0.27.4 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,8 +9,8 @@ importers:
9
9
  .:
10
10
  dependencies:
11
11
  vercel:
12
- specifier: 68.5.0
13
- version: 68.5.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)
12
+ specifier: 68.6.0
13
+ version: 68.6.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)
14
14
 
15
15
  packages:
16
16
 
@@ -732,8 +732,8 @@ packages:
732
732
  resolution: {integrity: sha512-g9XerViJ/paZujufXYcu5XYI2vU2rtB4sgdpjUHde5RnOkdmpu0ngH46LCFGHoPXO/C+qDPSczIHIRN+8Q2YKQ==}
733
733
  engines: {node: '>= 18'}
734
734
 
735
- '@vercel/cli-support@68.5.0':
736
- resolution: {integrity: sha512-fbdyfsBWPl7wsvNTWUshfd/aW2/Yl8HW0Y99cUF+D7AYQLLfKCBkhZbAYJBLQlS+iasDfAhqCHdGo7k3xlJstg==}
735
+ '@vercel/cli-support@68.6.0':
736
+ resolution: {integrity: sha512-oDzbpgLGxpEpqgFPN59cS5h3uR6p/YGCmfK5EAS24n7kFqZctIDTNImD3h0RKx5lfeKjDZ+PAuLK+lm9xoZmzQ==}
737
737
  engines: {node: '>= 20'}
738
738
  os: [aix, android, cloudabi, cygwin, freebsd, haiku, ios, netbsd, openbsd, openharmony, os390, os400, sunos]
739
739
 
@@ -804,8 +804,8 @@ packages:
804
804
  peerDependencies:
805
805
  '@vercel/build-utils': 15.9.0
806
806
 
807
- '@vercel/next@35.0.0':
808
- resolution: {integrity: sha512-UwRJFSEX+RkCcB89zkc2vk2YKan6UvoAQswuDSHE3EiuqItvaPcjhYWJB/hgRDu/jET/nQCBkTL2FKtgnmNx3g==}
807
+ '@vercel/next@35.0.1':
808
+ resolution: {integrity: sha512-/lE50pSO7aCjEws7/HwibsrIG32fSnIp72H2+Exbmm3d/AgnBfoxItiODz3LK4+uwIOH7gpRBw8oVQMmqyuDwQ==}
809
809
  peerDependencies:
810
810
  '@vercel/build-utils': 15.9.0
811
811
 
@@ -854,55 +854,55 @@ packages:
854
854
  peerDependencies:
855
855
  '@vercel/build-utils': 15.9.0
856
856
 
857
- '@vercel/static-build@33.0.0':
858
- resolution: {integrity: sha512-SGV8+2Bzg1epL/LE160SlM7KQo6U3yrxKQElKw4JW4Ufx92lQqK9/2a63Wqixmjuql1/tTndNQxKrg4LXSTVcw==}
857
+ '@vercel/static-build@33.0.1':
858
+ resolution: {integrity: sha512-73lEhRFGMGrqdkP4odPM4nl8XM0vx34z6Fq+Bo6JVaB6ZmbUPizyAc+oczszVvULns+bnlXM8ByasA5iFf8uCA==}
859
859
  peerDependencies:
860
860
  '@vercel/build-utils': 15.9.0
861
861
 
862
862
  '@vercel/static-config@3.4.4':
863
863
  resolution: {integrity: sha512-WppaPyEKQhO8qo5gVee3mSo1QSCgDZaUcUDHrqICSlt90oYeC/SHTmKCPWY1x1NB9hU+kR2oDzJwAeRKKv5NIw==}
864
864
 
865
- '@vercel/vc-native-darwin-arm64@68.5.0':
866
- resolution: {integrity: sha512-Gb9lP/hpW44+bMkOBsW0bojDazVZ2YOHExJKhD8rqjUnXfcW69wNW2ucZARoIFiYDJDfTcxn84xlyAe1EQfCzA==}
865
+ '@vercel/vc-native-darwin-arm64@68.6.0':
866
+ resolution: {integrity: sha512-kBIx0Hvb5YbdC8Qiuq+ZyZrHXlerbGZru94PIGLAYhAXPJH2F6F52YSm8Jdrc1QAWviPlXi4vMxSxh7rcyaozw==}
867
867
  cpu: [arm64]
868
868
  os: [darwin]
869
869
 
870
- '@vercel/vc-native-darwin-x64@68.5.0':
871
- resolution: {integrity: sha512-sEPAgzHJUNIz2ZbsOYQLN2il9Vw3aKdomFcczzQMn9wdZYWsEReHFOmzBj3CHxVgFm+hd91fEmlKnZOjBfboGQ==}
870
+ '@vercel/vc-native-darwin-x64@68.6.0':
871
+ resolution: {integrity: sha512-PL4vXwvfLmYjeI9clRZTJSfNCfWAN0JJlXCVs7s5MZ1q0ZDBiZRMk6xc5B9oC9GJKO2anLZm9VriF67Dg9Oe4w==}
872
872
  cpu: [x64]
873
873
  os: [darwin]
874
874
 
875
- '@vercel/vc-native-linux-arm64-musl@68.5.0':
876
- resolution: {integrity: sha512-5Poazh+WvGA23uvfShmLYMBb9/xemDcywcmSpu/WQthEYFEUYaGg/kFjdr/AgmE6aPCOUBuNG1JABIXbbvVeXA==}
875
+ '@vercel/vc-native-linux-arm64-musl@68.6.0':
876
+ resolution: {integrity: sha512-wT4vvAXsk+4tDURPkxV9caOZFPNemJQ5fYktES946xsZ1qsIsuPO8eVn40+yjNcMi8R/mhpcqBNiNdtI6Niy8A==}
877
877
  cpu: [arm64]
878
878
  os: [linux]
879
879
  libc: [musl]
880
880
 
881
- '@vercel/vc-native-linux-arm64@68.5.0':
882
- resolution: {integrity: sha512-/1NjL2r0wP1vEtLJ4b73wgOJ+USsSwIzuN0AnXM8v3CwygPwVkaeregMkua/vvjS0VYGouMoifajVp7DMa1RFg==}
881
+ '@vercel/vc-native-linux-arm64@68.6.0':
882
+ resolution: {integrity: sha512-O/CSSNQ3NcYYNcvvb3RDTIiw0ivbB7tNyZWbhMQQAWhiwzCOui4BU4rx1O4/fzOf5LS3oK31TqGyMq87zwIplg==}
883
883
  cpu: [arm64]
884
884
  os: [linux]
885
885
  libc: [glibc]
886
886
 
887
- '@vercel/vc-native-linux-x64-musl@68.5.0':
888
- resolution: {integrity: sha512-AyFsb8kYZ32GzqddsC35uIZTJ7u0Lxk12lLUDjzSXJDl6FXUTf8fSY8mYFGrE8jer8B1wCCrg3pBgVan2/oWOg==}
887
+ '@vercel/vc-native-linux-x64-musl@68.6.0':
888
+ resolution: {integrity: sha512-g87D0E6miMOUjBJDxhLYKX7YbtzuyY0aSg3As7dwJvtpmSBiIYgfBbF3e2SrzxWk8WQoMJuuIrAAPASlVUMsvQ==}
889
889
  cpu: [x64]
890
890
  os: [linux]
891
891
  libc: [musl]
892
892
 
893
- '@vercel/vc-native-linux-x64@68.5.0':
894
- resolution: {integrity: sha512-UTCOTpMnaC1jp4Z7x2h72kToDSUsHhB3pKOlhUCTUYP1fpeDdmSJ7EiV+tMSVFyxmyp3Xiz64dw71GL9ZDFN8A==}
893
+ '@vercel/vc-native-linux-x64@68.6.0':
894
+ resolution: {integrity: sha512-ogm93LedFIhHhMsi+3SPUYXsZtEqtSAsg48tzaFy4OEDedY1IW0j0WjTo+eKURKGbHz4RdRTTAzYC6mvQe20KA==}
895
895
  cpu: [x64]
896
896
  os: [linux]
897
897
  libc: [glibc]
898
898
 
899
- '@vercel/vc-native-win32-arm64@68.5.0':
900
- resolution: {integrity: sha512-TxeN7ZeCNdsYUWu7L+9KUH1FyMVTw2I5EpfvJT0evrheWc4bUBAaN8AqPlTyGGi3k3Ak/1HNazDrSXFB2IqsjQ==}
899
+ '@vercel/vc-native-win32-arm64@68.6.0':
900
+ resolution: {integrity: sha512-Bp0RDZeyw7u4GKyx5BT8EBFmCs8yFbIJzMB2odW9XgrOie4Z2JdMuWAVXoBGlN4T+thaQkNvIbzjEwdBVelVOQ==}
901
901
  cpu: [arm64]
902
902
  os: [win32]
903
903
 
904
- '@vercel/vc-native-win32-x64@68.5.0':
905
- resolution: {integrity: sha512-1kLdwpr7b8sEe0yPoGRZwguY4gn5CCud/0qRhfEH6zitoN8lb0ssqCjDYK0Xqgm33pEuxI1yeURMXWx7efeYNg==}
904
+ '@vercel/vc-native-win32-x64@68.6.0':
905
+ resolution: {integrity: sha512-/TVxI6ds1uPGGJU0LM9wYIuntqs+BzHXJfHLGDlM7Mv3iolFELSALpwrrLyYGuMa0fh4zzct7qCJmth0Ir0Vpg==}
906
906
  cpu: [x64]
907
907
  os: [win32]
908
908
 
@@ -1585,8 +1585,8 @@ packages:
1585
1585
  resolution: {integrity: sha512-6ZxzVpzDXDa3bJWaHilVayA+BH/1zmxCJoVgvmqJnid/gPoKHxUrS/aC/T6LGQtNHT+XHG9fXPJB4d+IrU30Ew==}
1586
1586
  hasBin: true
1587
1587
 
1588
- vercel@68.5.0:
1589
- resolution: {integrity: sha512-rBXilWeB+UoZ/TQMCxfGQAkQPaQ29k08ZrrN8jkDGR4ACnhoNuOIlMjs6Xh3fAUiBcSr0ncr4YColdR8Cc2AWA==}
1588
+ vercel@68.6.0:
1589
+ resolution: {integrity: sha512-+PQYUW+F4IPX/1Wacc1Dc5jaX/T3SUntha8Gr3btC2/8ezp0rKJc8JY0tthciyJ3BpqQhQHcAlZcEeDj7rOKtQ==}
1590
1590
  engines: {node: '>= 20'}
1591
1591
  hasBin: true
1592
1592
 
@@ -2157,7 +2157,7 @@ snapshots:
2157
2157
  execa: 5.1.1
2158
2158
  optional: true
2159
2159
 
2160
- '@vercel/cli-support@68.5.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)':
2160
+ '@vercel/cli-support@68.6.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)':
2161
2161
  dependencies:
2162
2162
  '@vercel/backends': 31.0.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@vercel/build-utils@15.9.0)
2163
2163
  '@vercel/blob': 2.9.0
@@ -2176,7 +2176,7 @@ snapshots:
2176
2176
  '@vercel/hydrogen': 32.0.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@vercel/build-utils@15.9.0)
2177
2177
  '@vercel/koa': 31.0.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@vercel/build-utils@15.9.0)
2178
2178
  '@vercel/nestjs': 31.0.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@vercel/build-utils@15.9.0)
2179
- '@vercel/next': 35.0.0(@vercel/build-utils@15.9.0)
2179
+ '@vercel/next': 35.0.1(@vercel/build-utils@15.9.0)
2180
2180
  '@vercel/node': 36.0.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@vercel/build-utils@15.9.0)
2181
2181
  '@vercel/prepare-flags-definitions': 0.8.0
2182
2182
  '@vercel/python': 37.0.0(@vercel/build-utils@15.9.0)
@@ -2185,7 +2185,7 @@ snapshots:
2185
2185
  '@vercel/remix-builder': 36.0.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@vercel/build-utils@15.9.0)
2186
2186
  '@vercel/ruby': 33.0.0(@vercel/build-utils@15.9.0)
2187
2187
  '@vercel/rust': 32.0.0(@vercel/build-utils@15.9.0)
2188
- '@vercel/static-build': 33.0.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@vercel/build-utils@15.9.0)
2188
+ '@vercel/static-build': 33.0.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@vercel/build-utils@15.9.0)
2189
2189
  chokidar: 4.0.0
2190
2190
  debug: 4.4.3
2191
2191
  esbuild: 0.27.0
@@ -2370,7 +2370,7 @@ snapshots:
2370
2370
  - supports-color
2371
2371
  optional: true
2372
2372
 
2373
- '@vercel/next@35.0.0(@vercel/build-utils@15.9.0)':
2373
+ '@vercel/next@35.0.1(@vercel/build-utils@15.9.0)':
2374
2374
  dependencies:
2375
2375
  '@vercel/build-utils': 15.9.0
2376
2376
  '@vercel/container': 31.0.0(@vercel/build-utils@15.9.0)
@@ -2504,7 +2504,7 @@ snapshots:
2504
2504
  smol-toml: 1.5.2
2505
2505
  optional: true
2506
2506
 
2507
- '@vercel/static-build@33.0.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@vercel/build-utils@15.9.0)':
2507
+ '@vercel/static-build@33.0.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@vercel/build-utils@15.9.0)':
2508
2508
  dependencies:
2509
2509
  '@vercel/build-utils': 15.9.0
2510
2510
  '@vercel/gatsby-plugin-vercel-analytics': 1.0.12
@@ -2527,28 +2527,28 @@ snapshots:
2527
2527
  - '@emnapi/runtime'
2528
2528
  optional: true
2529
2529
 
2530
- '@vercel/vc-native-darwin-arm64@68.5.0':
2530
+ '@vercel/vc-native-darwin-arm64@68.6.0':
2531
2531
  optional: true
2532
2532
 
2533
- '@vercel/vc-native-darwin-x64@68.5.0':
2533
+ '@vercel/vc-native-darwin-x64@68.6.0':
2534
2534
  optional: true
2535
2535
 
2536
- '@vercel/vc-native-linux-arm64-musl@68.5.0':
2536
+ '@vercel/vc-native-linux-arm64-musl@68.6.0':
2537
2537
  optional: true
2538
2538
 
2539
- '@vercel/vc-native-linux-arm64@68.5.0':
2539
+ '@vercel/vc-native-linux-arm64@68.6.0':
2540
2540
  optional: true
2541
2541
 
2542
- '@vercel/vc-native-linux-x64-musl@68.5.0':
2542
+ '@vercel/vc-native-linux-x64-musl@68.6.0':
2543
2543
  optional: true
2544
2544
 
2545
- '@vercel/vc-native-linux-x64@68.5.0':
2545
+ '@vercel/vc-native-linux-x64@68.6.0':
2546
2546
  optional: true
2547
2547
 
2548
- '@vercel/vc-native-win32-arm64@68.5.0':
2548
+ '@vercel/vc-native-win32-arm64@68.6.0':
2549
2549
  optional: true
2550
2550
 
2551
- '@vercel/vc-native-win32-x64@68.5.0':
2551
+ '@vercel/vc-native-win32-x64@68.6.0':
2552
2552
  optional: true
2553
2553
 
2554
2554
  abbrev@3.0.1:
@@ -3377,17 +3377,17 @@ snapshots:
3377
3377
  uuid@14.0.1:
3378
3378
  optional: true
3379
3379
 
3380
- vercel@68.5.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3):
3380
+ vercel@68.6.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3):
3381
3381
  optionalDependencies:
3382
- '@vercel/cli-support': 68.5.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)
3383
- '@vercel/vc-native-darwin-arm64': 68.5.0
3384
- '@vercel/vc-native-darwin-x64': 68.5.0
3385
- '@vercel/vc-native-linux-arm64': 68.5.0
3386
- '@vercel/vc-native-linux-arm64-musl': 68.5.0
3387
- '@vercel/vc-native-linux-x64': 68.5.0
3388
- '@vercel/vc-native-linux-x64-musl': 68.5.0
3389
- '@vercel/vc-native-win32-arm64': 68.5.0
3390
- '@vercel/vc-native-win32-x64': 68.5.0
3382
+ '@vercel/cli-support': 68.6.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)
3383
+ '@vercel/vc-native-darwin-arm64': 68.6.0
3384
+ '@vercel/vc-native-darwin-x64': 68.6.0
3385
+ '@vercel/vc-native-linux-arm64': 68.6.0
3386
+ '@vercel/vc-native-linux-arm64-musl': 68.6.0
3387
+ '@vercel/vc-native-linux-x64': 68.6.0
3388
+ '@vercel/vc-native-linux-x64-musl': 68.6.0
3389
+ '@vercel/vc-native-win32-arm64': 68.6.0
3390
+ '@vercel/vc-native-win32-x64': 68.6.0
3391
3391
  transitivePeerDependencies:
3392
3392
  - '@emnapi/core'
3393
3393
  - '@emnapi/runtime'
@@ -2,6 +2,6 @@
2
2
  "name": "mise-npm-install",
3
3
  "private": true,
4
4
  "dependencies": {
5
- "vercel": "68.5.0"
5
+ "vercel": "68.6.0"
6
6
  }
7
7
  }
@@ -223,3 +223,20 @@ References: [agent](https://beszel.dev/guide/agent-installation),
223
223
  [systemd](https://beszel.dev/guide/systemd),
224
224
  [network monitors](https://beszel.dev/guide/network-monitors),
225
225
  [backup API](https://pocketbase.io/docs/api-backups/).
226
+
227
+ ### Worker T3 stability
228
+
229
+ In a worker's **Systemd Services** panel, a failed `personal-t3-stability`
230
+ means the watchdog crossed the restart or slow-probe limits in
231
+ `ansible/ubuntu/policy.json`, or its log could not be read. The worker
232
+ recomputes the verdict every minute from the latest 24 hours. Beszel
233
+ refreshes service data every ten minutes. A successful measurement clears
234
+ the failure, and Beszel may hide the successful oneshot.
235
+
236
+ Use `homelab check --workers --json` for the per-worker restart count and
237
+ `worker:t3-stability` for the reason and available hang snapshots. Beszel's
238
+ [service monitoring](https://beszel.dev/guide/systemd) reports service state.
239
+ Its [agent configuration](https://beszel.dev/guide/environment-variables)
240
+ has no custom-metric input, so the numeric restart chart remains open. A
241
+ separate exporter would require a collector and dashboard that support its
242
+ metrics.
@@ -15,7 +15,7 @@ Environment=KEY_FILE=/etc/personal-beszel/hub-key
15
15
  Environment=TOKEN_FILE=/etc/personal-beszel/agent-token
16
16
  Environment=DISABLE_SSH=true
17
17
  Environment=SKIP_SYSTEMD_LOGS=true
18
- Environment=SERVICE_PATTERNS=ssh.service,tailscaled.service,t3code-desktop.service,personal-fleet-sync.service
18
+ Environment=SERVICE_PATTERNS=ssh.service,tailscaled.service,t3code-desktop.service,personal-fleet-sync.service,personal-t3-stability.service
19
19
  ExecStart=/usr/local/lib/personal-beszel/0.21.2/beszel-agent
20
20
  StateDirectory=beszel-agent
21
21
  StateDirectoryMode=0700
@@ -0,0 +1,47 @@
1
+ """Expose the watchdog stability verdict as a systemd oneshot result."""
2
+
3
+ import json
4
+ import sys
5
+ import time
6
+ from collections import deque
7
+
8
+
9
+ def main():
10
+ path, log_lines, restart_limit, probe_ms, probe_fraction, min_probes = sys.argv[1:]
11
+ since = time.time() - 86400
12
+ restarts = probes = slow = 0
13
+ try:
14
+ with open(path, encoding="utf-8", errors="replace") as log:
15
+ lines = deque(log, maxlen=int(log_lines))
16
+ except FileNotFoundError:
17
+ lines = ()
18
+ except OSError:
19
+ print("The T3 watchdog log could not be read.", file=sys.stderr)
20
+ return 2
21
+
22
+ for line in lines:
23
+ try:
24
+ record = json.loads(line)
25
+ except ValueError:
26
+ continue
27
+ if not isinstance(record, dict):
28
+ continue
29
+ stamp = record.get("t")
30
+ if type(stamp) not in (int, float) or not stamp >= since:
31
+ continue
32
+ if record.get("event") == "restarted" and record.get("cause") == "unresponsive":
33
+ restarts += 1
34
+ if record.get("event") == "probe" and record.get("ok") is True:
35
+ duration = record.get("ms")
36
+ if type(duration) in (int, float):
37
+ probes += 1
38
+ slow += duration > int(probe_ms)
39
+
40
+ print(f"T3 watchdog in the last 24 hours: {restarts} unresponsive restarts, "
41
+ f"{slow} slow probes out of {probes}.")
42
+ return int(restarts > int(restart_limit) or
43
+ (probes >= int(min_probes) and slow / probes > float(probe_fraction)))
44
+
45
+
46
+ if __name__ == "__main__":
47
+ sys.exit(main())
@@ -19,6 +19,7 @@
19
19
  mode: '0755'
20
20
  loop:
21
21
  - t3-health.sh
22
+ - t3-stability.py
22
23
  - t3-boot-readiness.py
23
24
  - t3-hang-snapshot.sh
24
25
  - t3-listener.py
@@ -94,6 +95,48 @@
94
95
  daemon_reload: true
95
96
  enabled: true
96
97
  state: started
98
+ # Beszel reads the system manager. Run the verdict as the worker account so
99
+ # Beszel still needs neither access to the worker home nor journal privileges.
100
+ - name: Declare the T3 stability verdict for system monitoring
101
+ ansible.builtin.copy:
102
+ dest: /etc/systemd/system/personal-t3-stability.service
103
+ owner: root
104
+ group: root
105
+ mode: '0644'
106
+ content: |
107
+ # Managed by personal converge: ansible/ubuntu/t3-stability.py
108
+ [Unit]
109
+ Description=T3 watchdog stability verdict
110
+ [Service]
111
+ Type=oneshot
112
+ User={{ development_user }}
113
+ ExecStart=/usr/bin/python3 -I -B /usr/local/lib/personal-fleet/t3-stability.py "{{ development_home }}/.local/state/personal/t3-watchdog.ndjson" {{ t3Service.watchdogLogLines }} {{ t3Stability.maxRestarts24h }} {{ t3Stability.slowProbeMs }} {{ t3Stability.slowProbeFraction }} {{ t3Stability.minProbes }}
114
+ TimeoutStartSec=15s
115
+ MemoryMax=64M
116
+ NoNewPrivileges=true
117
+ ProtectSystem=strict
118
+ ProtectHome=read-only
119
+ PrivateTmp=true
120
+ - name: Declare periodic T3 stability measurement
121
+ ansible.builtin.copy:
122
+ dest: /etc/systemd/system/personal-t3-stability.timer
123
+ owner: root
124
+ group: root
125
+ mode: '0644'
126
+ content: |
127
+ # Managed by personal converge: ansible/ubuntu/t3-stability.py
128
+ [Unit]
129
+ Description=Update the T3 watchdog stability verdict
130
+ [Timer]
131
+ OnCalendar=minutely
132
+ [Install]
133
+ WantedBy=timers.target
134
+ - name: Enable the T3 stability verdict timer
135
+ ansible.builtin.systemd_service:
136
+ name: personal-t3-stability.timer
137
+ daemon_reload: true
138
+ enabled: true
139
+ state: started
97
140
  - name: Declare the work-in-progress guard of agent worktrees
98
141
  ansible.builtin.copy:
99
142
  dest: '{{ development_home }}/.config/systemd/user/personal-worker-wip-guard.service'
@@ -17,6 +17,8 @@ import {
17
17
  type GlobalConfigStanding,
18
18
  } from './global-config';
19
19
 
20
+ import { harnessHandoff } from './harness-handoff';
21
+
20
22
  type Tool = string | { version: string; lazy?: boolean; os?: string[] };
21
23
  type Config = {
22
24
  min_version?: unknown;
@@ -271,6 +273,35 @@ function installed(tools: Record<string, Tool>): Record<string, Tool> {
271
273
  );
272
274
  }
273
275
 
276
+ export const HANDOFF_REMEDIES = {
277
+ 'harness-path-shadowed':
278
+ "Put the external owner's executable directory ahead of mise on PATH, then verify a fresh login shell.",
279
+ 'harness-owner-missing':
280
+ 'Use T3 Code or the chosen meta-harness to make its executable available on PATH, then verify a fresh login shell.',
281
+ };
282
+
283
+ export function harnessHandoffChecks(
284
+ env = process.env,
285
+ platform = process.platform
286
+ ): Check[] {
287
+ const { shadowed, missing } = harnessHandoff(env, platform);
288
+ const groups = {
289
+ 'harness-path-shadowed': shadowed,
290
+ 'harness-owner-missing': missing,
291
+ } as const;
292
+ return Object.entries(groups).flatMap(([key, commands]) => {
293
+ if (!commands.length) return [];
294
+ const id = key as keyof typeof HANDOFF_REMEDIES;
295
+ return [
296
+ {
297
+ id,
298
+ status: 'warn',
299
+ detail: `${commands.join(', ')}: ${HANDOFF_REMEDIES[id]}`,
300
+ },
301
+ ];
302
+ });
303
+ }
304
+
274
305
  export function checkMachine(
275
306
  requireDocker = false,
276
307
  worker = false,
@@ -290,6 +321,7 @@ export function checkMachine(
290
321
  miseCheck(config.min_version),
291
322
  worktreeTrustCheck(),
292
323
  globalConfigCheck(),
324
+ ...harnessHandoffChecks(),
293
325
  {
294
326
  id: 'github-auth',
295
327
  status: auth.ok ? 'pass' : 'warn',
@@ -343,8 +343,7 @@ ready_file="$root/toolchain-ready"
343
343
  [ ! -L "$status_file" ] && [ ! -L "$ready_file" ] || die FLEET_STATE_PATH_UNSAFE
344
344
  # Warm: the same toolchain inputs (tool pins, locks and the setup code itself)
345
345
  # passed within a day, so a revision that changes none of them skips the full
346
- # setup. Changed inputs, a failure or an older stamp run it; agent versions
347
- # are still checked (and reinstalled on drift) by node convergence.
346
+ # setup. Changed inputs, a failure or an older stamp run it.
348
347
  toolchain_key=$(git rev-parse HEAD:mise.toml HEAD:mise.lock HEAD:.mise HEAD:bun.lock HEAD:package.json HEAD:bootstrap 2>/dev/null | tr '\n' ' ')
349
348
  [ -n "$toolchain_key" ] || toolchain_key=$revision
350
349
  # The tool profiles of the fleet configuration choose what is installed, so a
@@ -15,7 +15,7 @@ const MARKER = '# Managed by homelab bootstrap/setup.ts\n';
15
15
  /**
16
16
  * Where agent harnesses create a fresh checkout per task. Every new path would
17
17
  * need its own `mise trust`, and an untrusted mise.toml makes every mise shim
18
- * (claude, codex, bun, ...) exit before the agent starts. mise honours this
18
+ * (for example, bun) exit before the project tool starts. mise honours this
19
19
  * setting only in the global config, so it is added at publish time and never
20
20
  * written into the repository's mise.toml.
21
21
  */
@@ -0,0 +1,79 @@
1
+ import { accessSync, constants, realpathSync, statSync } from 'node:fs';
2
+ import { delimiter, isAbsolute, join, relative, sep } from 'node:path';
3
+ import { miseDataDir } from './shell-path';
4
+
5
+ export const HANDOFF_COMMANDS = [
6
+ 'antigravity',
7
+ 'claude',
8
+ 'codex',
9
+ 'copilot',
10
+ 'cursor-agent',
11
+ 'gemini',
12
+ 'grok',
13
+ 'opencode',
14
+ ] as const;
15
+
16
+ function realPath(path: string): string | undefined {
17
+ try {
18
+ return realpathSync(path);
19
+ } catch {
20
+ return undefined;
21
+ }
22
+ }
23
+
24
+ function executable(path: string): string | undefined {
25
+ try {
26
+ accessSync(path, constants.X_OK);
27
+ return statSync(path).isFile() ? realPath(path) : undefined;
28
+ } catch {
29
+ return undefined;
30
+ }
31
+ }
32
+
33
+ function within(path: string, directory: string): boolean {
34
+ const subpath = relative(directory, path);
35
+ return (
36
+ subpath !== '..' && !subpath.startsWith(`..${sep}`) && !isAbsolute(subpath)
37
+ );
38
+ }
39
+
40
+ /** Measure inherited PATH without loading project config or running an agent.
41
+ * A clean machine can have no harness commands. Only flag commands currently
42
+ * resolving through mise, including user-bin symlinks back into its installs.
43
+ */
44
+ export function harnessHandoff(env = process.env, platform = process.platform) {
45
+ const shadowed: string[] = [];
46
+ const missing: string[] = [];
47
+ if (platform !== 'darwin' && platform !== 'linux')
48
+ return { shadowed, missing };
49
+
50
+ const data = miseDataDir(platform, env);
51
+ const shims = env['MISE_SHIMS_DIR'] || join(data, 'shims');
52
+ const managed = [shims, join(data, 'installs')].flatMap((directory) => [
53
+ directory,
54
+ realPath(directory) ?? directory,
55
+ ]);
56
+ const path = (env['PATH'] ?? '').split(delimiter).filter(isAbsolute);
57
+ for (const command of HANDOFF_COMMANDS) {
58
+ // A user-bin symlink can point at a shim which itself links to mise.
59
+ const shimTarget = executable(join(shims, command));
60
+ const matches = path.flatMap((directory) => {
61
+ const candidate = join(directory, command);
62
+ const target = executable(candidate);
63
+ if (!target) return [];
64
+ const parent = realPath(directory) ?? directory;
65
+ const viaMise =
66
+ target === shimTarget ||
67
+ managed.some((root) =>
68
+ [candidate, join(parent, command), target].some((file) =>
69
+ within(file, root)
70
+ )
71
+ );
72
+ return [viaMise];
73
+ });
74
+ if (matches[0] === true) {
75
+ (matches.includes(false) ? shadowed : missing).push(command);
76
+ }
77
+ }
78
+ return { shadowed, missing };
79
+ }
@@ -16,6 +16,7 @@ import {
16
16
  workspaceRoot,
17
17
  } from './global-config';
18
18
  import { configureShellPath } from './shell-path';
19
+ import { harnessHandoffChecks } from './doctor';
19
20
  import { installNativeAws } from './native-aws';
20
21
  import { installNativeT3 } from './native-t3';
21
22
 
@@ -54,6 +55,9 @@ export async function syncTools(
54
55
  observe('managed-config');
55
56
  const dir = globalConfigDir();
56
57
  assertManagedConfig(dir);
58
+ // Reshimming can remove the only evidence of a command's previous owner.
59
+ for (const check of harnessHandoffChecks())
60
+ console.warn(`WARN ${check.id}: ${check.detail}`);
57
61
  observe('mise');
58
62
  const config = Bun.TOML.parse(
59
63
  readFileSync(join(workspaceRoot, 'mise.toml'), 'utf8')
@@ -138,10 +138,11 @@ Every failure code is in [the runbooks](runbooks.md).
138
138
  | ---------------------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
139
139
  | `personal-fleet-disk-gc.timer` | `ansible/ubuntu/tasks/resources.yml` | OnBootSec=10min, OnCalendar={{ gc_calendar }} |
140
140
  | `personal-fleet-idle-reboot.timer` | `ansible/ubuntu/tasks/updates.yml` | OnBootSec={{ updates.idleReboot.minUptimeMinutes }}min, OnUnitActiveSec={{ updates.idleReboot.intervalMinutes }}min |
141
+ | `personal-t3-stability.timer` | `ansible/ubuntu/tasks/recovery.yml` | OnCalendar=minutely |
141
142
  | `personal-worker-auth.timer` | `ansible/ubuntu/tasks/credentials.yml` | OnBootSec=2min, OnUnitActiveSec=10min |
142
143
  | `personal-worker-github.timer` | `ansible/ubuntu/tasks/github.yml` | OnBootSec=2min, OnUnitActiveSec=10min |
143
144
  | `personal-worker-recovery.timer` | `ansible/ubuntu/tasks/recovery.yml` | OnBootSec=1min, OnUnitActiveSec=1min |
144
- | `personal-worker-recovery.timer` | `ansible/ubuntu/tasks/recovery.yml` | OnBootSec=5min, OnUnitActiveSec=15min |
145
+ | `personal-worker-wip-guard.timer` | `ansible/ubuntu/tasks/recovery.yml` | OnBootSec=5min, OnUnitActiveSec=15min |
145
146
 
146
147
  <!-- end: timers -->
147
148
 
package/docs/declared.md CHANGED
@@ -12,10 +12,15 @@ may only shrink.
12
12
 
13
13
  ## Declared
14
14
 
15
+ Coding-agent executables are not in this table. Their installation, versions,
16
+ launchers, configuration and logins belong to T3 Code or the chosen
17
+ meta-harness. See
18
+ [Handing agent commands to their external owner](machine-setup.md#handing-agent-commands-to-their-external-owner).
19
+
15
20
  | What | Declared in | Pinned by | Applied by | Measured by |
16
21
  | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | --------------------------------------------- |
17
22
  | The fleet: machines, services, accounts | Your `fleet.json` | The `homelab` version in your `package.json`, which names one commit | `sync` | `status` |
18
- | Tools: languages, CLIs, coding agents | `mise.toml` | `mise.lock`: version and checksum for each platform | `mise install --locked` | Tool and `agent:verification` checks |
23
+ | Tools: languages and CLIs | `mise.toml` | `mise.lock`: version and checksum for each platform | `mise install --locked` | `tool:*` checks |
19
24
  | mise itself | `min_version` and `mise_*_sha256` in `mise.toml` | The digest of its release archive, held here | `bootstrap/bootstrap.sh` | `tool:mise`: the pin, or a newer one it keeps |
20
25
  | JavaScript dependencies | `package.json` | `bun.lock` | `bun install --frozen-lockfile` | The install fails on a difference |
21
26
  | T3 Code, server and desktop app | `t3_*` under `[vars]` in `mise.toml` | SHA-256 of each artifact | `bootstrap/native-t3.ts`; `ansible/ubuntu/t3-desktop.yml`; `ansible/macos/t3-desktop.yml` | T3 checks; `t3:version` on every machine |
@@ -46,8 +46,8 @@ the managed global config/lock/sidecars, set up persistent shims on PATH, and ru
46
46
  `bun install --frozen-lockfile`. The published global config also trusts the
47
47
  agent worktree roots in `AGENT_WORKTREE_ROOTS` (`bootstrap/global-config.ts`,
48
48
  currently `~/.t3/worktrees`): each agent task gets a new checkout, and an
49
- untrusted `mise.toml` there makes every mise shim, `claude` and `bun` included,
50
- exit before the agent starts. Entries added locally with
49
+ untrusted `mise.toml` there makes mise-managed project tools such as `bun`
50
+ fail before they start. Entries added locally with
51
51
  `mise settings add trusted_config_paths PATH` are kept on every publish.
52
52
  Reopen your terminal/editor afterward. To refresh
53
53
  an already-open Unix terminal immediately, run `exec "$SHELL" -l`; an installer
@@ -495,6 +495,12 @@ the old installation. Restart login shells after migrating PATH; restart a
495
495
  background app only after its active turns have drained. Run setup on the
496
496
  manager and every worker to migrate their shell files.
497
497
 
498
+ The toolchain doctor and setup warn about harness commands that resolve through
499
+ mise on their inherited PATH. `harness-path-shadowed` means an external
500
+ executable was found later on PATH. `harness-owner-missing` means no external
501
+ executable was found on that PATH. These checks inspect executable paths
502
+ without starting a harness.
503
+
498
504
  In a fresh Bash or Zsh login shell, run `type -a <command>` from home,
499
505
  an ordinary repository, and a new worktree. If the first result is a mise
500
506
  shim, look for the external executable in the other results. If one exists,
@@ -345,15 +345,16 @@ no one at the machine. `t3Service.bootServingSeconds` (`ansible/ubuntu/policy.js
345
345
  `T3_BOOT_SERVING_LATE` when the first successful loopback probe exceeds that limit.
346
346
  The boot-time probe keeps its first observation in the worker's runtime
347
347
  directory across T3 restarts. Measurement begins on the first boot after
348
- installation. The tunnel registers once the server answers. The check measures the
349
- loopback API, which is what the watchdog and the route both need. A desktop
348
+ installation. The watchdog and the external route both need the loopback
349
+ API. A desktop
350
350
  worker's unit stores Chromium passwords in a file under `T3CODE_HOME`
351
351
  (`--password-store=basic`), so a locked login keyring never blocks the T3
352
352
  path; the RDP credential stays in the volatile session keyring. The VM test
353
353
  power-cycles the guest without a clean shutdown and requires the loopback
354
- API to answer within that limit. The optional desktop VM run also checks
355
- this limit and verifies RDP control while the login keyring is locked.
356
- Tunnel registration after a power cut requires separate verification.
354
+ API to answer and the production probe to record readiness within that
355
+ limit. The optional desktop VM run also checks this limit and verifies RDP
356
+ control while the login keyring is locked. Fleet acceptance also requires
357
+ checking tunnel registration after a power cut on the deployed worker.
357
358
 
358
359
  The recovery timer keeps its unit name and watchdog log across upgrades.
359
360
  It operates the managed T3 service. A missing desktop session still reports
package/mise.lock CHANGED
@@ -1613,10 +1613,10 @@ backend = "npm:@yarnpkg/cli-dist"
1613
1613
  specifiers = ["4.19.0"]
1614
1614
 
1615
1615
  [[tools."npm:vercel"]]
1616
- version = "68.5.0"
1617
- aube = { path = ".mise/locks/npm-vercel/68.5.0", digest = "sha256:acb7702f21b240b54230d4827c12f68ca25efd8bf572113d49921bbea38683c1" }
1616
+ version = "68.6.0"
1617
+ aube = { path = ".mise/locks/npm-vercel/68.6.0", digest = "sha256:5b9283afad10b9a10f2f5c34f57064ebc105082b4269077cd726242f365c2ecd" }
1618
1618
  backend = "npm:vercel"
1619
- specifiers = ["68.5.0"]
1619
+ specifiers = ["68.6.0"]
1620
1620
 
1621
1621
  [[tools."npm:wrangler"]]
1622
1622
  version = "4.171.0"
package/mise.toml CHANGED
@@ -43,7 +43,7 @@ bat = "0.27.0"
43
43
  delta = "0.23.0"
44
44
  git-lfs = "3.8.1"
45
45
  docker-cli = "29.10.1"
46
- "npm:vercel" = "68.5.0"
46
+ "npm:vercel" = "68.6.0"
47
47
  "npm:wrangler" = "4.171.0"
48
48
  railway = "5.77.1"
49
49
  vault = "2.2.2"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crvouga/homelab",
3
- "version": "0.27.4",
3
+ "version": "0.28.0",
4
4
  "description": "Keeps a set of development machines in sync: one manager and many workers",
5
5
  "license": "MIT",
6
6
  "repository": "github:crvouga/homelab",
@@ -73,6 +73,6 @@
73
73
  "engines": {
74
74
  "node": ">=22"
75
75
  },
76
- "gitHead": "48e6fa3ca367a963641108d1146ab86a6414c26f",
76
+ "gitHead": "1f523d0e3f093cedbc514e02199f73ca65f71f11",
77
77
  "gitCommittedAt": "2026-12-03"
78
78
  }
@@ -1592,6 +1592,22 @@
1592
1592
  "recipe": "docker"
1593
1593
  }
1594
1594
  },
1595
+ {
1596
+ "id": "tool:harness-owner-missing",
1597
+ "meaning": "A harness command resolves through mise and no external executable was found on PATH.",
1598
+ "severity": "advisory",
1599
+ "repair": {
1600
+ "manual": "The external harness owner supplies the executable and the operator controls its PATH."
1601
+ }
1602
+ },
1603
+ {
1604
+ "id": "tool:harness-path-shadowed",
1605
+ "meaning": "Mise precedes an external harness executable on PATH.",
1606
+ "severity": "advisory",
1607
+ "repair": {
1608
+ "manual": "The external harness owner supplies the executable and the operator controls its PATH."
1609
+ }
1610
+ },
1595
1611
  {
1596
1612
  "id": "ubuntu:baseline",
1597
1613
  "meaning": "The Ubuntu baseline policy is applied.",
@@ -25,6 +25,11 @@ const PARKING =
25
25
  export const CHECK_OWNERS: CheckOwner[] = [
26
26
  // Toolchain and workstation: automatic.
27
27
  { pattern: 'tool:*', repair: 'workspace' },
28
+ {
29
+ pattern: 'tool:harness-*',
30
+ manual:
31
+ 'The external harness owner supplies the executable and the operator controls its PATH.',
32
+ },
28
33
  { pattern: 'tool:docker-*', repair: 'docker' },
29
34
  { pattern: 'tool:github-auth*', repair: 'login:github' },
30
35
  { pattern: 'dependencies', repair: 'workspace' },
@@ -429,6 +429,10 @@ export const CHECK_MEANINGS: Record<string, string> = {
429
429
  'A pinned tool, mise itself (tool:mise, a warning when the machine keeps a newer one) or the global mise configuration (tool:global-mise-config), is as the revision declares.',
430
430
  'tool:docker-cli':
431
431
  'Not applicable on a worker whose containers feature is off: the Docker CLI is not one of its tools.',
432
+ 'tool:harness-owner-missing':
433
+ 'A harness command resolves through mise and no external executable was found on PATH.',
434
+ 'tool:harness-path-shadowed':
435
+ 'Mise precedes an external harness executable on PATH.',
432
436
  'ubuntu:baseline': 'The Ubuntu baseline policy is applied.',
433
437
  'ubuntu:boot-policy': 'The no-sleep and session boot policy is active.',
434
438
  'ubuntu:lid-policy':
@@ -543,6 +547,8 @@ export const CHECK_MEANINGS: Record<string, string> = {
543
547
  * warning, or with `required: false`. Every other check is required: its
544
548
  * failure blocks readiness unless the run says the check is out of scope. */
545
549
  export const ADVISORY_CHECKS = [
550
+ 'tool:harness-owner-missing',
551
+ 'tool:harness-path-shadowed',
546
552
  'beszel:leftover',
547
553
  'github:rate-limit',
548
554
  'manager:docker',
@@ -1,7 +1,7 @@
1
1
  import { homedir } from 'node:os';
2
2
  import { delimiter, join } from 'node:path';
3
3
 
4
- /** mise shims resolve every agent to the version pinned in the shared lock.
4
+ /** mise shims resolve infrastructure tools to the version in the shared lock.
5
5
  * Putting them first keeps an unmanaged copy elsewhere on PATH (a vendor
6
6
  * installer in ~/.local/bin, an nvm global) from shadowing the pinned one.
7
7
  */
@@ -1,3 +1,5 @@
1
+ import { HANDOFF_REMEDIES } from '../bootstrap/doctor';
2
+ import { HANDOFF_COMMANDS } from '../bootstrap/harness-handoff';
1
3
  import { join } from 'node:path';
2
4
  import {
3
5
  selectionArguments,
@@ -106,6 +108,33 @@ function ownCheck(id: string, status: Check['status']): Check | null {
106
108
  };
107
109
  }
108
110
 
111
+ function handoffCheck(
112
+ id: keyof typeof HANDOFF_REMEDIES,
113
+ status: unknown,
114
+ detail: unknown
115
+ ): Check | null {
116
+ if (status !== 'warn') return null;
117
+ const listed =
118
+ typeof detail === 'string' ? detail.split(':', 1)[0]!.split(', ') : [];
119
+ const commands = HANDOFF_COMMANDS.filter((command) =>
120
+ listed.includes(command)
121
+ );
122
+ const summary =
123
+ id === 'harness-path-shadowed'
124
+ ? 'Mise shadows an external harness executable on PATH.'
125
+ : 'Mise supplies the first harness executable on PATH, and no external executable was found there.';
126
+ const identified =
127
+ id === 'harness-path-shadowed'
128
+ ? { id: 'tool:harness-path-shadowed' }
129
+ : { id: 'tool:harness-owner-missing' };
130
+ return {
131
+ ...identified,
132
+ status: 'warn',
133
+ summary: commands.length ? `${commands.join(', ')}. ${summary}` : summary,
134
+ remedy: { action: HANDOFF_REMEDIES[id] },
135
+ };
136
+ }
137
+
109
138
  function toolCheck(value: unknown): Check | null {
110
139
  if (
111
140
  !record(value) ||
@@ -114,6 +143,12 @@ function toolCheck(value: unknown): Check | null {
114
143
  !['pass', 'fail', 'warn', 'skip'].includes(String(value['status']))
115
144
  )
116
145
  return null;
146
+ if (Object.hasOwn(HANDOFF_REMEDIES, value['id']))
147
+ return handoffCheck(
148
+ value['id'] as keyof typeof HANDOFF_REMEDIES,
149
+ value['status'],
150
+ value['detail']
151
+ );
117
152
  const own = ownCheck(value['id'], value['status'] as Check['status']);
118
153
  if (own) return own;
119
154
  const ok = value['status'] === 'pass';