@crvouga/homelab 0.25.0 → 0.26.1
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.
- package/.mise/locks/npm-vercel/{68.2.0 → 68.5.0}/aube-lock.yaml +177 -177
- package/.mise/locks/npm-vercel/{68.2.0 → 68.5.0}/package.json +1 -1
- package/.mise/locks/npm-wrangler/{4.170.0 → 4.171.0}/aube-lock.yaml +46 -46
- package/.mise/locks/npm-wrangler/{4.170.0 → 4.171.0}/package.json +1 -1
- package/README.md +0 -6
- package/ansible/monitoring/compose.yml +1 -1
- package/ansible/monitoring/lock.json +1 -1
- package/ansible/ubuntu/baseline.yml +14 -0
- package/ansible/ubuntu/policy.json +3 -1
- package/ansible/ubuntu/t3-boot-readiness.py +38 -0
- package/ansible/ubuntu/t3-desktop.yml +6 -1
- package/ansible/ubuntu/tasks/recovery.yml +27 -0
- package/docs/runbooks.md +2 -6
- package/docs/ubuntu-sync.md +3 -1
- package/docs/worker-contract.md +23 -5
- package/mise.lock +76 -76
- package/mise.toml +4 -4
- package/package.json +3 -3
- package/schema/check-ids.json +1 -9
- package/schema/fleet.schema.json +1 -11
- package/src/check-registry.ts +1 -2
- package/src/ide/definition.ts +2 -25
- package/src/ide/ide.ts +3 -4
- package/src/ide/t3.ts +0 -8
- package/src/manager-sync.ts +12 -1
- package/src/package-info.ts +48 -18
- package/src/worker-host-checks.ts +61 -12
- package/src/t3/profile.ts +0 -204
|
@@ -9,8 +9,8 @@ importers:
|
|
|
9
9
|
.:
|
|
10
10
|
dependencies:
|
|
11
11
|
wrangler:
|
|
12
|
-
specifier: 4.
|
|
13
|
-
version: 4.
|
|
12
|
+
specifier: 4.171.0
|
|
13
|
+
version: 4.171.0(@types/node@18.19.130)
|
|
14
14
|
|
|
15
15
|
packages:
|
|
16
16
|
|
|
@@ -27,38 +27,38 @@ packages:
|
|
|
27
27
|
workerd:
|
|
28
28
|
optional: true
|
|
29
29
|
|
|
30
|
-
'@cloudflare/workerd-darwin-64@1.
|
|
31
|
-
resolution: {integrity: sha512-
|
|
30
|
+
'@cloudflare/workerd-darwin-64@1.20261201.1':
|
|
31
|
+
resolution: {integrity: sha512-3zYOvrvOa2sPrNygPEsrODlvGwq20znmw2pWndOSKPWg2cepdBZfmty90/GhWJJXxmZk6ZSNORFsUEqGTjIBjQ==}
|
|
32
32
|
engines: {node: '>=16'}
|
|
33
33
|
cpu: [x64]
|
|
34
34
|
os: [darwin]
|
|
35
35
|
|
|
36
|
-
'@cloudflare/workerd-darwin-arm64@1.
|
|
37
|
-
resolution: {integrity: sha512-
|
|
36
|
+
'@cloudflare/workerd-darwin-arm64@1.20261201.1':
|
|
37
|
+
resolution: {integrity: sha512-oc6uK56CE/VktpEU+cCIKg/o25GwWXPgJjzab7kKUss23Gu3Xqw1y5XKoXnozx40rDmceF4dPXslFGH4dTEtRw==}
|
|
38
38
|
engines: {node: '>=16'}
|
|
39
39
|
cpu: [arm64]
|
|
40
40
|
os: [darwin]
|
|
41
41
|
|
|
42
|
-
'@cloudflare/workerd-linux-64@1.
|
|
43
|
-
resolution: {integrity: sha512-
|
|
42
|
+
'@cloudflare/workerd-linux-64@1.20261201.1':
|
|
43
|
+
resolution: {integrity: sha512-Y+ON1Pd7EFHZXu82kSHC+8/+tcBuSxGPEW0jGU6YC0xk4iY3iieHcDYe9vQDD/NulBZDNqN4eOKJHj8SVR5plQ==}
|
|
44
44
|
engines: {node: '>=16'}
|
|
45
45
|
cpu: [x64]
|
|
46
46
|
os: [linux]
|
|
47
47
|
|
|
48
|
-
'@cloudflare/workerd-linux-arm64@1.
|
|
49
|
-
resolution: {integrity: sha512-
|
|
48
|
+
'@cloudflare/workerd-linux-arm64@1.20261201.1':
|
|
49
|
+
resolution: {integrity: sha512-9uTVy8ArDk4hvSUlNv03tZP5la9pXPJUw50STbT2UOT40OmDEN8m/ZGAqyOB0Kki7bJwrJGBzZnTyL0x5gGFRQ==}
|
|
50
50
|
engines: {node: '>=16'}
|
|
51
51
|
cpu: [arm64]
|
|
52
52
|
os: [linux]
|
|
53
53
|
|
|
54
|
-
'@cloudflare/workerd-windows-64@1.
|
|
55
|
-
resolution: {integrity: sha512-
|
|
54
|
+
'@cloudflare/workerd-windows-64@1.20261201.1':
|
|
55
|
+
resolution: {integrity: sha512-Vbvb6HttqEwIoB2SNhDfySyubnD+R8aTGv9lqEfg/AFhyqzm6llmRFUuqlCCPp3pNgRGSI1DUhqUVked0A6Pag==}
|
|
56
56
|
engines: {node: '>=16'}
|
|
57
57
|
cpu: [x64]
|
|
58
58
|
os: [win32]
|
|
59
59
|
|
|
60
|
-
'@cloudflare/workers-utils@0.
|
|
61
|
-
resolution: {integrity: sha512-
|
|
60
|
+
'@cloudflare/workers-utils@0.61.0':
|
|
61
|
+
resolution: {integrity: sha512-xJaWBTrLAn/umnvegxIrGemY8wUnKQecmHlPKOcvOHMiLrpKklipTK1XbOk2Qzivpx5yZsiDIjAv9uU8TTIJ6Q==}
|
|
62
62
|
peerDependencies:
|
|
63
63
|
vitest: ^4.1.0 || ^5.0.0
|
|
64
64
|
peerDependenciesMeta:
|
|
@@ -567,8 +567,8 @@ packages:
|
|
|
567
567
|
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
|
|
568
568
|
engines: {node: '>= 0.6'}
|
|
569
569
|
|
|
570
|
-
miniflare@5.
|
|
571
|
-
resolution: {integrity: sha512-
|
|
570
|
+
miniflare@5.20261201.0-beta:
|
|
571
|
+
resolution: {integrity: sha512-fzuDddbIUf8kSsip5APBAoA3zniIrSdSiiIycXRBFB06B4zC8/++0NEeXu9JelO8ezcKsJpViM8BsL7CzNFNpQ==}
|
|
572
572
|
engines: {node: '>=22.12.0'}
|
|
573
573
|
peerDependencies:
|
|
574
574
|
kerberos: ^2.0.0
|
|
@@ -643,23 +643,23 @@ packages:
|
|
|
643
643
|
whatwg-url@5.0.0:
|
|
644
644
|
resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
|
|
645
645
|
|
|
646
|
-
workerd@1.
|
|
647
|
-
resolution: {integrity: sha512-
|
|
646
|
+
workerd@1.20261201.1:
|
|
647
|
+
resolution: {integrity: sha512-HbaelaaUD7TvytkuIadqsHyHIV95bIdP9GCFKhcPFc1hsvBXNOAhC97cpgl9YLlWuql2AGBFzchyjxmjQv5Biw==}
|
|
648
648
|
engines: {node: '>=16'}
|
|
649
649
|
hasBin: true
|
|
650
650
|
|
|
651
|
-
wrangler@4.
|
|
652
|
-
resolution: {integrity: sha512-
|
|
651
|
+
wrangler@4.171.0:
|
|
652
|
+
resolution: {integrity: sha512-pXilcA3/5anwhJxMXvkI+FAG6s4zReAMdIVqprK14duLgAoV6/CLBsg1Zl30nUuflUCMiIWJzDvAUiFSNJDi3w==}
|
|
653
653
|
engines: {node: '>=22.12.0'}
|
|
654
654
|
hasBin: true
|
|
655
655
|
peerDependencies:
|
|
656
|
-
'@cloudflare/workers-types': ^5.
|
|
656
|
+
'@cloudflare/workers-types': ^5.20261201.1
|
|
657
657
|
peerDependenciesMeta:
|
|
658
658
|
'@cloudflare/workers-types':
|
|
659
659
|
optional: true
|
|
660
660
|
|
|
661
|
-
ws@8.
|
|
662
|
-
resolution: {integrity: sha512-
|
|
661
|
+
ws@8.23.1:
|
|
662
|
+
resolution: {integrity: sha512-1rzWDSN0NOi3tpwgHsQExjWRoKUGtjCkJ2gZRaaRtzhYLboMytOI9pj9PU7yCgY37auqdd4OyLofZDbkeuZmPA==}
|
|
663
663
|
engines: {node: '>=10.0.0'}
|
|
664
664
|
peerDependencies:
|
|
665
665
|
bufferutil: ^4.0.1
|
|
@@ -680,28 +680,28 @@ snapshots:
|
|
|
680
680
|
|
|
681
681
|
'@cloudflare/kv-asset-handler@0.5.1': {}
|
|
682
682
|
|
|
683
|
-
'@cloudflare/unenv-preset@2.16.2(unenv@2.0.0-rc.24)(workerd@1.
|
|
683
|
+
'@cloudflare/unenv-preset@2.16.2(unenv@2.0.0-rc.24)(workerd@1.20261201.1)':
|
|
684
684
|
dependencies:
|
|
685
685
|
unenv: 2.0.0-rc.24
|
|
686
686
|
optionalDependencies:
|
|
687
|
-
workerd: 1.
|
|
687
|
+
workerd: 1.20261201.1
|
|
688
688
|
|
|
689
|
-
'@cloudflare/workerd-darwin-64@1.
|
|
689
|
+
'@cloudflare/workerd-darwin-64@1.20261201.1':
|
|
690
690
|
optional: true
|
|
691
691
|
|
|
692
|
-
'@cloudflare/workerd-darwin-arm64@1.
|
|
692
|
+
'@cloudflare/workerd-darwin-arm64@1.20261201.1':
|
|
693
693
|
optional: true
|
|
694
694
|
|
|
695
|
-
'@cloudflare/workerd-linux-64@1.
|
|
695
|
+
'@cloudflare/workerd-linux-64@1.20261201.1':
|
|
696
696
|
optional: true
|
|
697
697
|
|
|
698
|
-
'@cloudflare/workerd-linux-arm64@1.
|
|
698
|
+
'@cloudflare/workerd-linux-arm64@1.20261201.1':
|
|
699
699
|
optional: true
|
|
700
700
|
|
|
701
|
-
'@cloudflare/workerd-windows-64@1.
|
|
701
|
+
'@cloudflare/workerd-windows-64@1.20261201.1':
|
|
702
702
|
optional: true
|
|
703
703
|
|
|
704
|
-
'@cloudflare/workers-utils@0.
|
|
704
|
+
'@cloudflare/workers-utils@0.61.0':
|
|
705
705
|
dependencies:
|
|
706
706
|
'@cspotcode/source-map-support': 0.8.1
|
|
707
707
|
chalk: 5.3.0
|
|
@@ -1102,13 +1102,13 @@ snapshots:
|
|
|
1102
1102
|
dependencies:
|
|
1103
1103
|
mime-db: 1.52.0
|
|
1104
1104
|
|
|
1105
|
-
miniflare@5.
|
|
1105
|
+
miniflare@5.20261201.0-beta(@types/node@18.19.130):
|
|
1106
1106
|
dependencies:
|
|
1107
1107
|
'@cspotcode/source-map-support': 0.8.1
|
|
1108
1108
|
sharp: 0.35.5(@types/node@18.19.130)
|
|
1109
1109
|
undici: 7.30.2
|
|
1110
|
-
workerd: 1.
|
|
1111
|
-
ws: 8.
|
|
1110
|
+
workerd: 1.20261201.1
|
|
1111
|
+
ws: 8.23.1
|
|
1112
1112
|
youch: 4.1.0-beta.10
|
|
1113
1113
|
transitivePeerDependencies:
|
|
1114
1114
|
- '@types/node'
|
|
@@ -1186,29 +1186,29 @@ snapshots:
|
|
|
1186
1186
|
tr46: 0.0.3
|
|
1187
1187
|
webidl-conversions: 3.0.1
|
|
1188
1188
|
|
|
1189
|
-
workerd@1.
|
|
1189
|
+
workerd@1.20261201.1:
|
|
1190
1190
|
optionalDependencies:
|
|
1191
|
-
'@cloudflare/workerd-darwin-64': 1.
|
|
1192
|
-
'@cloudflare/workerd-darwin-arm64': 1.
|
|
1193
|
-
'@cloudflare/workerd-linux-64': 1.
|
|
1194
|
-
'@cloudflare/workerd-linux-arm64': 1.
|
|
1195
|
-
'@cloudflare/workerd-windows-64': 1.
|
|
1191
|
+
'@cloudflare/workerd-darwin-64': 1.20261201.1
|
|
1192
|
+
'@cloudflare/workerd-darwin-arm64': 1.20261201.1
|
|
1193
|
+
'@cloudflare/workerd-linux-64': 1.20261201.1
|
|
1194
|
+
'@cloudflare/workerd-linux-arm64': 1.20261201.1
|
|
1195
|
+
'@cloudflare/workerd-windows-64': 1.20261201.1
|
|
1196
1196
|
|
|
1197
|
-
wrangler@4.
|
|
1197
|
+
wrangler@4.171.0(@types/node@18.19.130):
|
|
1198
1198
|
dependencies:
|
|
1199
1199
|
'@cloudflare/kv-asset-handler': 0.5.1
|
|
1200
|
-
'@cloudflare/unenv-preset': 2.16.2(unenv@2.0.0-rc.24)(workerd@1.
|
|
1201
|
-
'@cloudflare/workers-utils': 0.
|
|
1200
|
+
'@cloudflare/unenv-preset': 2.16.2(unenv@2.0.0-rc.24)(workerd@1.20261201.1)
|
|
1201
|
+
'@cloudflare/workers-utils': 0.61.0
|
|
1202
1202
|
'@cspotcode/source-map-support': 0.8.1
|
|
1203
1203
|
'@types/yargs': 17.0.24
|
|
1204
1204
|
cloudflare: 5.2.0
|
|
1205
1205
|
devtools-protocol: 0.0.1182435
|
|
1206
1206
|
esbuild: 0.28.2
|
|
1207
|
-
miniflare: 5.
|
|
1207
|
+
miniflare: 5.20261201.0-beta(@types/node@18.19.130)
|
|
1208
1208
|
path-to-regexp: 6.3.0
|
|
1209
1209
|
undici: 7.30.2
|
|
1210
1210
|
unenv: 2.0.0-rc.24
|
|
1211
|
-
workerd: 1.
|
|
1211
|
+
workerd: 1.20261201.1
|
|
1212
1212
|
optionalDependencies:
|
|
1213
1213
|
fsevents: 2.3.3
|
|
1214
1214
|
transitivePeerDependencies:
|
|
@@ -1219,7 +1219,7 @@ snapshots:
|
|
|
1219
1219
|
- utf-8-validate
|
|
1220
1220
|
- vitest
|
|
1221
1221
|
|
|
1222
|
-
ws@8.
|
|
1222
|
+
ws@8.23.1: {}
|
|
1223
1223
|
|
|
1224
1224
|
youch-core@0.3.3:
|
|
1225
1225
|
dependencies:
|
package/README.md
CHANGED
|
@@ -454,12 +454,6 @@ never reaches a report. On Linux, lingering keeps the host after logout;
|
|
|
454
454
|
the remedy names `loginctl enable-linger` and converge does not run it.
|
|
455
455
|
Retirement runs `paradev hosts remove`. The `paradev:*` checks only warn.
|
|
456
456
|
|
|
457
|
-
Under `t3.profile`, `fleet.json` names top-level T3 settings every machine
|
|
458
|
-
holds the same, such as tool servers. A setting not named there stays the
|
|
459
|
-
machine's own, and one edited on a machine since `converge` last wrote it
|
|
460
|
-
is reported as `T3_PROFILE_CONFLICT` by the check `t3:profile`, never
|
|
461
|
-
overwritten.
|
|
462
|
-
|
|
463
457
|
Secrets are asked for by purpose (`monitoring-account-password`, `monitoring-tunnel-token`,
|
|
464
458
|
`proxy-tunnel-token`); see [`src/secrets.ts`](src/secrets.ts).
|
|
465
459
|
|
|
@@ -51,7 +51,7 @@ services:
|
|
|
51
51
|
# per-user file by hub-darwin.yml.
|
|
52
52
|
cloudflared:
|
|
53
53
|
profiles: [public-endpoint]
|
|
54
|
-
image: cloudflare/cloudflared:2026.
|
|
54
|
+
image: cloudflare/cloudflared:2026.12.0@sha256:cfe98613e211b393c5dd7dfd7adc4d302a16d87d7601b5f193edf343cc1e0254
|
|
55
55
|
user: '1000:1000'
|
|
56
56
|
restart: unless-stopped
|
|
57
57
|
command:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "0.21.2",
|
|
3
3
|
"image": "henrygd/beszel:0.21.2@sha256:b0be90bd4aee2993fde763032a5098ce4386fba43cfe5031ec017b8d9e8c97a2",
|
|
4
|
-
"tunnelImage": "cloudflare/cloudflared:2026.
|
|
4
|
+
"tunnelImage": "cloudflare/cloudflared:2026.12.0@sha256:cfe98613e211b393c5dd7dfd7adc4d302a16d87d7601b5f193edf343cc1e0254",
|
|
5
5
|
"agents": {
|
|
6
6
|
"amd64": "0359a4c3b9d800ba865b2be4081c7f0df8ba29a8c5c0ac76e72f490f28496909",
|
|
7
7
|
"arm64": "4f5dcea27c3f9e2ba30218e7d7039f4df548ded1c470df9eefe00975722aad13",
|
|
@@ -70,6 +70,20 @@
|
|
|
70
70
|
- name: Inspect existing service ownership
|
|
71
71
|
ansible.builtin.service_facts:
|
|
72
72
|
tasks:
|
|
73
|
+
- name: Inspect the retired coding-agent launcher link
|
|
74
|
+
ansible.builtin.stat:
|
|
75
|
+
path: '{{ development_home }}/.local/share/personal/fleet/agent-commands'
|
|
76
|
+
follow: false
|
|
77
|
+
register: retired_agent_commands
|
|
78
|
+
|
|
79
|
+
- name: Remove the fleet-owned coding-agent launcher link
|
|
80
|
+
ansible.builtin.file:
|
|
81
|
+
path: '{{ development_home }}/.local/share/personal/fleet/agent-commands'
|
|
82
|
+
state: absent
|
|
83
|
+
when:
|
|
84
|
+
- retired_agent_commands.stat.islnk | default(false)
|
|
85
|
+
- retired_agent_commands.stat.lnk_target == 'current/agents/bin'
|
|
86
|
+
|
|
73
87
|
- name: Install the pinned packages
|
|
74
88
|
ansible.builtin.import_tasks: tasks/packages.yml
|
|
75
89
|
- name: Configure Docker
|
|
@@ -100,7 +100,9 @@
|
|
|
100
100
|
"restartBackoffBaseSeconds": 120,
|
|
101
101
|
"restartBackoffMaxSeconds": 1800,
|
|
102
102
|
"watchdogLogLines": 4000,
|
|
103
|
-
"hangSnapshotsKept": 10
|
|
103
|
+
"hangSnapshotsKept": 10,
|
|
104
|
+
"bootServingSeconds": 180,
|
|
105
|
+
"bootProbeIntervalSeconds": 5
|
|
104
106
|
},
|
|
105
107
|
"t3Stability": {
|
|
106
108
|
"maxRestarts24h": 3,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"""Keep the first successful T3 loopback observation for the current boot."""
|
|
2
|
+
|
|
3
|
+
from http.client import HTTPConnection, HTTPException
|
|
4
|
+
import json
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
import sys
|
|
7
|
+
import time
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def answers(timeout: float) -> bool:
|
|
11
|
+
connection = HTTPConnection('127.0.0.1', 3773, timeout=timeout)
|
|
12
|
+
try:
|
|
13
|
+
connection.request('GET', '/.well-known/t3/environment')
|
|
14
|
+
response = connection.getresponse()
|
|
15
|
+
if response.status != 200:
|
|
16
|
+
return False
|
|
17
|
+
identity = json.load(response)
|
|
18
|
+
return isinstance(identity, dict) and isinstance(identity.get('environmentId'), str)
|
|
19
|
+
except (OSError, HTTPException, ValueError):
|
|
20
|
+
return False
|
|
21
|
+
finally:
|
|
22
|
+
connection.close()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def record_readiness(marker: Path, interval: float) -> None:
|
|
26
|
+
while not marker.exists():
|
|
27
|
+
if answers(interval):
|
|
28
|
+
milliseconds = time.clock_gettime_ns(time.CLOCK_BOOTTIME) // 1_000_000
|
|
29
|
+
# The user service is the sole writer. Publish the complete value at once.
|
|
30
|
+
temporary = marker.with_suffix('.tmp')
|
|
31
|
+
temporary.write_text(f'{milliseconds}\n', encoding='ascii')
|
|
32
|
+
temporary.replace(marker)
|
|
33
|
+
return
|
|
34
|
+
time.sleep(interval)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
if __name__ == '__main__':
|
|
38
|
+
record_readiness(Path(sys.argv[1]), float(sys.argv[2]))
|
|
@@ -205,6 +205,11 @@
|
|
|
205
205
|
# exhaust; agents use disk-backed /var/tmp (aged by tasks/resources.yml).
|
|
206
206
|
Environment=TMPDIR=/var/tmp
|
|
207
207
|
Environment=NODE_OPTIONS=--max-old-space-size={{ sizing.agentBuildMiB }}
|
|
208
|
+
# An unattended worker leaves the login keyring locked, and the
|
|
209
|
+
# desktop app's main thread blocks forever on libsecret when
|
|
210
|
+
# Chromium's password store is the keyring. basic is a file under
|
|
211
|
+
# T3CODE_HOME, so a locked keyring never stops T3 from serving.
|
|
212
|
+
Environment=ELECTRON_PASSWORD_STORE=basic
|
|
208
213
|
# Serve on loopback only: the route is tailscale serve to 127.0.0.1.
|
|
209
214
|
# The running app rewrites its settings, so they are set before it
|
|
210
215
|
# starts; a failure never keeps T3 from starting (worker:exposure).
|
|
@@ -212,7 +217,7 @@
|
|
|
212
217
|
ExecStartPre=-/usr/bin/python3 -I -B /usr/local/lib/personal-fleet/t3-local-only.py --home %h/.t3
|
|
213
218
|
# Native Wayland hangs before the first window on Asahi (16K pages);
|
|
214
219
|
# XWayland works on every GNOME worker, so use it everywhere.
|
|
215
|
-
ExecStart="{{ t3_desktop_dir }}/t3code" --ozone-platform=x11
|
|
220
|
+
ExecStart="{{ t3_desktop_dir }}/t3code" --ozone-platform=x11 --password-store=basic
|
|
216
221
|
KillMode=mixed
|
|
217
222
|
# A server that hangs does not stop on SIGTERM: do not wait the 90 s
|
|
218
223
|
# default before it is killed. Agent scopes (t3code-*.scope) are
|
|
@@ -19,11 +19,38 @@
|
|
|
19
19
|
mode: '0755'
|
|
20
20
|
loop:
|
|
21
21
|
- t3-health.sh
|
|
22
|
+
- t3-boot-readiness.py
|
|
22
23
|
- t3-hang-snapshot.sh
|
|
23
24
|
- t3-listener.py
|
|
24
25
|
- t3-idle.py
|
|
25
26
|
- t3-renderers.py
|
|
26
27
|
- t3-local-only.py
|
|
28
|
+
- name: Declare the boot-time T3 readiness probe
|
|
29
|
+
ansible.builtin.copy:
|
|
30
|
+
dest: '{{ development_home }}/.config/systemd/user/personal-t3-boot-readiness.service'
|
|
31
|
+
owner: '{{ development_user }}'
|
|
32
|
+
mode: '0600'
|
|
33
|
+
content: |
|
|
34
|
+
# Managed by personal converge: ansible/ubuntu/t3-boot-readiness.py
|
|
35
|
+
[Unit]
|
|
36
|
+
Description=Record the first successful T3 API probe after boot
|
|
37
|
+
ConditionPathExists=!%t/personal-t3-boot-readiness-ms
|
|
38
|
+
[Service]
|
|
39
|
+
ExecStart=/usr/bin/python3 -I -B /usr/local/lib/personal-fleet/t3-boot-readiness.py %t/personal-t3-boot-readiness-ms {{ t3Service.bootProbeIntervalSeconds }}
|
|
40
|
+
Restart=on-failure
|
|
41
|
+
RestartSec={{ t3Service.bootProbeIntervalSeconds }}
|
|
42
|
+
[Install]
|
|
43
|
+
WantedBy=default.target
|
|
44
|
+
- name: Enable T3 readiness measurement for the next boot
|
|
45
|
+
become: true
|
|
46
|
+
become_user: '{{ development_user }}'
|
|
47
|
+
environment:
|
|
48
|
+
XDG_RUNTIME_DIR: '/run/user/{{ development_uid }}'
|
|
49
|
+
ansible.builtin.systemd_service:
|
|
50
|
+
scope: user
|
|
51
|
+
name: personal-t3-boot-readiness.service
|
|
52
|
+
daemon_reload: true
|
|
53
|
+
enabled: true
|
|
27
54
|
- name: Declare bounded recovery of the worker T3 desktop app
|
|
28
55
|
ansible.builtin.copy:
|
|
29
56
|
dest: '{{ development_home }}/.config/systemd/user/personal-worker-recovery.service'
|
package/docs/runbooks.md
CHANGED
|
@@ -14,7 +14,7 @@ It reads a code by where it stands, never by the word it ends with. The CLI
|
|
|
14
14
|
proxy documents the codes of its own commands in
|
|
15
15
|
[its README](../cliproxy/README.md); the ones converge reports are here.
|
|
16
16
|
|
|
17
|
-
There are
|
|
17
|
+
There are 458 codes; 106 need a person.
|
|
18
18
|
|
|
19
19
|
## Bootstrap of a new or returning worker
|
|
20
20
|
|
|
@@ -359,10 +359,6 @@ runaway, write `1` to that agent scope’s `cgroup.kill`.
|
|
|
359
359
|
- `T3_CUSTOMIZATIONS_INVALID`: check that keybindings are a JSON array, theme files are regular files listed by the pinned T3 CLI, and the encoded customization snapshot fits the 1 MiB fleet state document limit.
|
|
360
360
|
- `T3_CLIENT_SETTINGS_INVALID`: repair the manager’s client-settings.json so its settings are a JSON object.
|
|
361
361
|
- `T3_CLIENT_SETTINGS_TOO_LARGE`: the desktop preferences exceed the fleet state's 1 MiB document limit. Reduce the document on the manager and rerun converge.
|
|
362
|
-
- `T3_PROFILE_CONFLICT`: t3 profile conflict.
|
|
363
|
-
- `T3_PROFILE_PENDING`: t3 profile pending.
|
|
364
|
-
- `T3_PROFILE_RECORD_INVALID`: t3 profile record invalid.
|
|
365
|
-
- `T3_PROFILE_UNVERIFIED`: t3 profile unverified.
|
|
366
362
|
- `T3_RENDERER_LIMIT_UNVERIFIED`: check the delegated renderer cgroup after an idle desktop restart and recovery timer tick.
|
|
367
363
|
- `T3_RENDERERS_HIGH`: the desktop renderers exceed their memory budget. Reload the app when idle.
|
|
368
364
|
- `T3_PROTECTION_ESCAPED`: the T3 listener lacks its CPU, I/O or memory reserve; the summary names which (`cpu`, `io`, `memory`). Run converge: it declares the reserve for the unit T3 serves from and reloads the user manager, which applies it to the running T3 without a restart. `io` alone, while the user manager does not hand the io controller down (measured in its `cgroup.subtree_control`; its `cgroup.controllers` lists io as soon as the declaration is loaded), is not T3 leaving its unit and only warns: converge declares the controller, and the user manager takes it on its next start, so reboot the worker while it runs no agent turn (`homelab converge --maintenance-reboot`, which reboots for it as for pending updates); restarting T3 does not change it.
|
|
@@ -370,7 +366,6 @@ runaway, write `1` to that agent scope’s `cgroup.kill`.
|
|
|
370
366
|
- `T3_RESTART_PENDING`: a restart of the worker's T3 (a new release, a staged policy, a return to loopback) waits for its agent turns to end. The remedy says how long it has waited and when its deadline falls: `personal-worker-recovery` applies it at the first check with no turn running, and `t3RestartMaxDeferralHours` after it was first deferred although turns run, which ends them. A failure means the deadline passed and the timer did not apply it: check `worker:service-recovery` and run `homelab converge`. To restart at once, run `homelab converge --restart-busy`.
|
|
371
367
|
- `T3_SERVER_INSTALL_FAILED`: t3 server install failed: the pinned server of a headless worker is missing from the toolchain, or `t3-headless.yml` did not apply.
|
|
372
368
|
- `T3_SERVER_STOPPED`: t3 server stopped: the lingering `t3code-headless.service` of a headless worker is not running.
|
|
373
|
-
- `T3_SETTINGS_BUSY`: t3 settings busy.
|
|
374
369
|
- `T3_VERSION_UNKNOWN`: a warning of `t3:version`: T3 on the machine the check names has not recorded the version it runs, so it cannot be compared with the pin. Start T3 there once, then run `homelab converge`.
|
|
375
370
|
- `T3_VERSION_SKEW`: a warning of `t3:version`: T3 on the machine the check names runs another release than the fleet pins; the remedy names both. `homelab converge` installs the pinned release on a worker and restarts T3. On the manager, converge switches a running desktop to the verified bundle when the running release differs from the pin. The same release is left running. See `T3_DESKTOP_ACTIVATION_SCHEDULED`.
|
|
376
371
|
- `T3_UPDATES_UNMANAGED`: a failure of `t3:updates`: the administrator policy of T3 on the manager does not turn its own updater off, so T3 may update itself away from the pinned release. Stage the fleet's policy once, as an administrator, with the command the remedy prints. **Needs a person.**
|
|
@@ -380,6 +375,7 @@ runaway, write `1` to that agent scope’s `cgroup.kill`.
|
|
|
380
375
|
- `T3_NO_GRAPHICAL_SESSION`: logged by `personal-worker-recovery` on a desktop worker with a count: no graphical session is running, so the desktop app cannot run and the run fails. After three checks in a row the display manager is restarted so that auto-login starts a session, three times at most; after that the log says a person must log in at the worker.
|
|
381
376
|
- `T3_RESTART_DEADLINE`: not a failure. `personal-worker-recovery` logs it when a restart of T3 has waited `t3RestartMaxDeferralHours` (`ansible/ubuntu/policy.json`) and is applied although agent turns run: they end. `worker:t3-deadline-restarts` counts these of the last 24 hours as a warning. Nothing is left to repair: send the threads whose turn ended their next message.
|
|
382
377
|
- `WIP_GUARD_HEAVY`: a warning of `worker:wip-guard`: a run of the work-in-progress guard in the last 24 hours took longer than `resourceSafety.wipGuard.slowRunSeconds` or used more than `peakWarnMiB` (`ansible/ubuntu/policy.json`). Each run ends with a JSON `run` line in `journalctl --user -u personal-worker-wip-guard.service`. The cost is a worktree with a large tree of files Git does not ignore: ignore its build output or remove the worktree.
|
|
378
|
+
- `T3_BOOT_SERVING_LATE`: a failure of `worker:t3-health`: T3 answers now, but its first successful loopback probe was later than `t3Service.bootServingSeconds` (`ansible/ubuntu/policy.json`) after this boot. A worker that lost power is given that long to serve on loopback with no one at the machine. Read the journal of the T3 unit and of `personal-worker-recovery` for what delayed the start.
|
|
383
379
|
- `T3_HANG_SNAPSHOT`: not a failure. `personal-worker-recovery` logs it on the first failed check of the T3 local API with the directory it wrote under `~/.local/state/personal/t3-hangs` (the newest ten are kept): each thread of T3 with the kernel call it waits in (`wchan`), the pressure, the busiest processes and the journal of the unit. Read it before the third failed check restarts T3 and destroys the evidence. `worker:t3-health` names the newest one after a restart.
|
|
384
380
|
- `T3_RESTART_BACKOFF`: not a failure. `personal-worker-recovery` logs it when T3 is unresponsive again soon after the watchdog restarted it: each restart for unresponsiveness within the hour makes the next one wait twice as long (`t3Service.restartBackoffBaseSeconds`, at most `restartBackoffMaxSeconds` in `ansible/ubuntu/policy.json`), so a persistent fault does not restart T3 every few minutes. Find the cause in the snapshots (`T3_HANG_SNAPSHOT`).
|
|
385
381
|
- `T3_RESTARTS_FREQUENT`: a failure of `worker:t3-stability`: the watchdog restarted T3 for being unresponsive more than `t3Stability.maxRestarts24h` times in the last 24 hours. Each restart leaves a server that answers, so no other check reports it. The remedy names the newest snapshots of why T3 hung; look for agents or recovery jobs running heavy work at that time.
|
package/docs/ubuntu-sync.md
CHANGED
|
@@ -579,7 +579,9 @@ by the client with the worker certificate in `check --workers --json`.
|
|
|
579
579
|
|
|
580
580
|
The worker seals the password with systemd credentials and publishes the RDP
|
|
581
581
|
item in the volatile session keyring at startup. Its encrypted login keyring
|
|
582
|
-
can stay locked
|
|
582
|
+
can stay locked: the desktop app stores Chromium passwords in a file
|
|
583
|
+
(`--password-store=basic` on `t3code-desktop.service`), so a locked keyring
|
|
584
|
+
never blocks T3. The desktop service shares the existing primary display.
|
|
583
585
|
The manager checks pre-authentication negotiation and the certificate.
|
|
584
586
|
A client login is needed to confirm authenticated control.
|
|
585
587
|
|
package/docs/worker-contract.md
CHANGED
|
@@ -89,8 +89,11 @@ a blocking socket send (`wchan` `sock_alloc_send_pskb`) while the local API
|
|
|
89
89
|
timed out, and every stop waited the full stop timeout (#501). The headless
|
|
90
90
|
server (`t3code-headless.service`) is the same server without any of those
|
|
91
91
|
peers: it starts at boot with nobody logged in, needs no display manager, GPU
|
|
92
|
-
or desktop packages, and waits for no graphical session.
|
|
93
|
-
the
|
|
92
|
+
or desktop packages, and waits for no graphical session. A desktop worker that
|
|
93
|
+
stays on the desktop app stores Chromium passwords in a file
|
|
94
|
+
(`--password-store=basic`), so the locked login keyring of an unattended
|
|
95
|
+
session cannot block its main thread either. Whether headless also stops the
|
|
96
|
+
stalls is measured on the canary, not assumed (below).
|
|
94
97
|
|
|
95
98
|
What on a worker needs the desktop app, and what does not. Each row says where
|
|
96
99
|
it is established:
|
|
@@ -160,10 +163,9 @@ removes the desktop unit, installs `t3code-headless.service` from the pinned
|
|
|
160
163
|
server archive the toolchain already holds, keeps `~/.t3` (environment
|
|
161
164
|
identity, pairing, history), repoints recovery to the new unit and starts it;
|
|
162
165
|
`converge --dry-run` lists what the worker loses. Back to `desktop` is the same
|
|
163
|
-
edit and also keeps `~/.t3`.
|
|
164
|
-
`fleet.json`: moving the MS-A2 workers is that consumer's change.
|
|
166
|
+
edit and also keeps `~/.t3`. Apply this change in the consumer project.
|
|
165
167
|
|
|
166
|
-
Canary, before more workers follow: converge one
|
|
168
|
+
Canary, before more workers follow: converge one unattended worker, confirm
|
|
167
169
|
`worker:t3-recovery`, `worker:t3-health`, `worker:t3-protection` and the
|
|
168
170
|
resource checks pass and the manager's link reconnects; open T3's preview
|
|
169
171
|
browser on a thread of that worker; and compare the restarts and slow probes
|
|
@@ -337,6 +339,22 @@ one:
|
|
|
337
339
|
drop SSH. `converge --maintenance-reboot` upgrades it to the pin in a
|
|
338
340
|
detached unit and waits for the worker to answer again.
|
|
339
341
|
|
|
342
|
+
After an unclean power loss a worker reaches "T3 answers on loopback" with
|
|
343
|
+
no one at the machine. `t3Service.bootServingSeconds` (`ansible/ubuntu/policy.json`,
|
|
344
|
+
180 seconds from the boot) is that limit, and `worker:t3-health` fails with
|
|
345
|
+
`T3_BOOT_SERVING_LATE` when the first successful loopback probe exceeds that limit.
|
|
346
|
+
The boot-time probe keeps its first observation in the worker's runtime
|
|
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
|
|
350
|
+
worker's unit stores Chromium passwords in a file under `T3CODE_HOME`
|
|
351
|
+
(`--password-store=basic`), so a locked login keyring never blocks the T3
|
|
352
|
+
path; the RDP credential stays in the volatile session keyring. The VM test
|
|
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.
|
|
357
|
+
|
|
340
358
|
A package run cut off by a power loss is finished by the next sync: the
|
|
341
359
|
baseline waits for the APT lock, runs `dpkg --configure -a` once (bounded to
|
|
342
360
|
ten minutes) and audits again; only a database still inconsistent stops with
|