Implement SAND-WP-0008: host telemetry and self-canary

Add profile.sandbox-canary, HostSnapshot/inventory/stale schemas, SSH
collectors, before/after provision deltas, telemetry export to State Hub
and local JSON, default `sandboxer create` self-deploy, inspect/reap-stale
CLI, runbook, and CoulombCore verification (26 tests pass).
This commit is contained in:
2026-06-23 19:53:51 +02:00
parent 582c1dd3c6
commit c0a9261cdc
22 changed files with 1047 additions and 26 deletions

View File

@@ -4,7 +4,7 @@ type: workplan
title: "Host telemetry and self-canary introspection"
domain: infotech
repo: sand-boxer
status: ready
status: finished
owner: codex
topic_slug: custodian
created: "2026-06-23"
@@ -42,7 +42,7 @@ later).
```task
id: SAND-WP-0008-T01
status: todo
status: done
priority: high
state_hub_task_id: "8f7b46e3-045e-481c-81bd-1c61734c6eb3"
```
@@ -64,7 +64,7 @@ does not own long-term metrics DB).
```task
id: SAND-WP-0008-T02
status: todo
status: done
priority: high
state_hub_task_id: "732bae4e-2dd9-4500-a86d-e869007bb383"
```
@@ -86,7 +86,7 @@ Canary deliverable on `ready`: JSON `IntrospectionReport` in sandbox status
```task
id: SAND-WP-0008-T03
status: todo
status: done
priority: high
state_hub_task_id: "7bd22f27-5058-4c19-98b6-b923909a8815"
```
@@ -105,7 +105,7 @@ command output.
```task
id: SAND-WP-0008-T04
status: todo
status: done
priority: high
state_hub_task_id: "c2d19bb7-9322-4744-a71e-75f7701a6fb2"
```
@@ -124,7 +124,7 @@ No automatic deletion in this task — dry-run only.
```task
id: SAND-WP-0008-T05
status: todo
status: done
priority: medium
state_hub_task_id: "b6b02289-d36e-4ee1-9ff7-dc59a1d24886"
```
@@ -143,7 +143,7 @@ Same pattern on `destroy` for teardown impact. Tests mock SSH collector.
```task
id: SAND-WP-0008-T06
status: todo
status: done
priority: high
state_hub_task_id: "d9941d93-a662-45c0-820b-88d32266c653"
```
@@ -168,7 +168,7 @@ sandboxer create --input repo=/other/repo # unchanged behavior
```task
id: SAND-WP-0008-T07
status: todo
status: done
priority: high
state_hub_task_id: "76430452-c98e-44e5-b625-e243dc12b8a5"
```
@@ -185,7 +185,7 @@ After `wait_ready` for canary profile:
```task
id: SAND-WP-0008-T08
status: todo
status: done
priority: medium
state_hub_task_id: "4ee4b95b-e7b5-4893-b78e-914f808bc00a"
```
@@ -207,7 +207,7 @@ activity-core may schedule periodic canary runs later — out of scope here.
```task
id: SAND-WP-0008-T09
status: todo
status: done
priority: medium
state_hub_task_id: "6ea8eda6-491b-460a-a526-7565962f449e"
```
@@ -225,7 +225,7 @@ sandboxer reap-stale --apply [--older-than 24h] # T10+; gated behind --apply
```task
id: SAND-WP-0008-T10
status: todo
status: done
priority: medium
state_hub_task_id: "435a3993-d8d3-4280-b68a-c37e34d20312"
```
@@ -268,4 +268,13 @@ After merging task status updates:
```bash
cd ~/state-hub && make fix-consistency REPO=sand-boxer
```
```
## Verification record (2026-06-23)
CoulombCore remote proof:
1. `sandboxer create` (no args) → `ready` + `telemetry.provision_delta`
2. `sandboxer inspect host` → load/mem metrics returned
3. Stale orphans from prior runs detected in `stale_candidates`
4. `sandboxer destroy``destroy_delta` with load Δ -0.09, mem +54 MB