@crvouga/homelab 0.23.2 → 0.23.4

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.
@@ -34,7 +34,7 @@ def endpoint_health(endpoint, key, request=cloud_state.request):
34
34
 
35
35
  def cloud_health(restic):
36
36
  snapshot = cloud_state.latest(restic)
37
- cloud_state.fresh(snapshot["time"], 45 * 60)
37
+ cloud_state.fresh(snapshot["time"], 3 * 60 * 60)
38
38
  path = snapshot["paths"][0].rstrip("/") + "/state/status/gc-success.json"
39
39
  gc = json.loads(restic("dump", snapshot["id"], path))
40
40
  cloud_state.fresh(gc["time"], 9 * 86400)
@@ -60,7 +60,7 @@ def main():
60
60
  try:
61
61
  cloud_health(cloud_state.client(data))
62
62
  print(
63
- "PASS: cloud checkpoint under 45 minutes old; successful GC under nine days old."
63
+ "PASS: cloud checkpoint under 3 hours old; successful GC under nine days old."
64
64
  )
65
65
  except Exception:
66
66
  errors.append("Cloud checkpoint or GC freshness/readability failed.")
@@ -34,8 +34,8 @@ if not f.exists():
34
34
  else:
35
35
  try:
36
36
  t = datetime.datetime.fromisoformat(json.loads(f.read_text())["time"])
37
- if (datetime.datetime.now(datetime.timezone.utc) - t).total_seconds() > 45 * 60:
38
- issues.append("Cloud checkpoint older than 45 minutes.")
37
+ if (datetime.datetime.now(datetime.timezone.utc) - t).total_seconds() > 3 * 60 * 60:
38
+ issues.append("Cloud checkpoint older than 3 hours.")
39
39
  except Exception:
40
40
  issues.append("Invalid backup status record.")
41
41
  if (r / "state/status/vault-failed").exists():
@@ -1,7 +1,7 @@
1
1
  [Unit]
2
- Description=CLIProxyAPI cloud checkpoint every 15 minutes (brief capture pause)
2
+ Description=CLIProxyAPI cloud checkpoint every hour (brief capture pause)
3
3
  [Timer]
4
- OnCalendar=*:0/15
4
+ OnCalendar=hourly
5
5
  RandomizedDelaySec=30s
6
6
  Persistent=true
7
7
  [Install]
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 495 codes; 105 need a person.
17
+ There are 498 codes; 105 need a person.
18
18
 
19
19
  ## Bootstrap of a new or returning worker
20
20
 
@@ -759,3 +759,14 @@ See the GNOME desktop sharing and manager keychain procedures in
759
759
  ### Directed T3 grants
760
760
 
761
761
  To authorize every enrolled environment's agents to work with full access on every other enrolled environment, set `t3.meshAccess` to `"full-access"` in fleet.json. Preview with `homelab converge --dry-run`. Each `t3:mesh-link` names the source, destination and measured grant. An unreachable environment or changed identity is reported by `t3:mesh-member`. Restore its T3 service and enrolled tailnet connection, then run converge. Sync adopts healthy grants in place and replaces incorrect grants or grants expiring within seven days. Scheduled sync retries outstanding pairs. Use `homelab check` to measure the links from their sources.
762
+
763
+ ## Resource protection coverage and collection
764
+
765
+ - **Meaning:** The manager reports platform coverage separately from disk collection. A finished collector run may still contain failed or refused operations.
766
+ - **Confirm:** Run `homelab check --json` and inspect `manager:resource-coverage`, `manager:legacy-agents` and the disk GC checks. Check the collector's operation failure count and disk target, and its service or LaunchAgent result.
767
+ - **Fix:** Run `homelab converge` to restore user log rotation and retire replaced legacy jobs. Restore free space or credentials before retrying a failed collector operation. The macOS manager's unsupported admission and writer guards require keeping capacity available and placing agent workloads on Ubuntu workers; [the worker contract](worker-contract.md#manager-resource-coverage) states the boundary.
768
+ - **Escalate:** If replaced legacy jobs remain after convergence, or collection repeatedly fails, file an issue with check IDs and failure counts. Never include credentials or raw authentication output.
769
+
770
+ - `DISK_GC_OPERATIONS_FAILED`: one or more collector operations failed, were refused by the reserve, or could not safely inventory open temporary packs. A successful scheduler exit does not establish successful collection.
771
+ - `MANAGER_LEGACY_AGENTS_REMAIN`: an exact historical LaunchAgent label remains installed or loaded. Convergence removes it only after its replacement is loaded, preserving service availability.
772
+ - `MANAGER_RESOURCE_GUARD_UNSUPPORTED`: macOS has no supported fleet CPU/memory/I/O admission, pressure guard or low-disk writer guard. Scheduled collection and background job priority do not provide those guarantees.
@@ -279,3 +279,27 @@ The normal manager apply flow reports configuration application separately
279
279
  from readiness and advances the applied-revision receipt only after required
280
280
  acceptance succeeds. Read the remaining release gates in [ubuntu-sync.md](ubuntu-sync.md)
281
281
  before treating any release as complete fleet certification.
282
+
283
+ ## Manager resource coverage
284
+
285
+ The macOS manager has scheduled disk collection, bounded scheduled-job logs,
286
+ and background CPU and I/O priority for its collection and notification jobs.
287
+ These persist as user LaunchAgents at login. Converge installs and reloads
288
+ the jobs; `manager:job-logs`, `manager:disk-gc` and `manager:legacy-agents`
289
+ measure their configuration and loaded state.
290
+
291
+ macOS does not provide the Ubuntu workers' cgroup CPU/memory/I/O admission,
292
+ pressure guard or low-disk writer guard. `manager:resource-coverage` always
293
+ warns with `MANAGER_RESOURCE_GUARD_UNSUPPORTED` and enumerates those gaps.
294
+ The collector's target is a cleanup goal, not a disk reserve. Check
295
+ `manager:disk` and `manager:disk-gc` for early capacity warnings, retain room
296
+ for the manager's services, and run agent workloads on protected Ubuntu
297
+ workers. A missed target or a failed collection operation remains a warning.
298
+
299
+ On Ubuntu workers the low-disk guard covers user leaf cgroups and the managed
300
+ collector's cgroup, including slow writers and newly appearing groups. It
301
+ does not stop unrelated system services. The collector refuses remote fetches
302
+ below its declared pressure reserve and caps each fetch process’s output file
303
+ size using the policy’s `diskGcFetchMaxMiB`; a failed/refused fetch keeps worktrees.
304
+ Stale unopened Git temporary packs are collected independently of fetching.
305
+ An incomplete open-file inventory keeps all temporary packs.