From 39209c7ac9b12c77ac89995d4a66ea5f8b2594bf Mon Sep 17 00:00:00 2001 From: root Date: Wed, 16 Sep 2026 00:45:46 +0000 Subject: [PATCH] fix: untrack host-disk-bands.json and document gitignored status The state file is runtime state (rewritten every scan), so tracking it in git means: - every executor's clone becomes permanently dirty after one run - a scan in one clone produces a merge conflict with a scan in another - the committed baseline can be stale in a way nobody notices Added to .gitignore and removed from the index. Contract updated to say 'the state file lives at and is gitignored runtime state - the scanner creates it on first run'. --- .gitignore | 1 + disk-gc-threat-response.prose.md | 2 +- state/host-disk-bands.json | 18 ------------------ 3 files changed, 2 insertions(+), 19 deletions(-) delete mode 100644 state/host-disk-bands.json diff --git a/.gitignore b/.gitignore index c18dd8d..ded977d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ __pycache__/ +state/host-disk-bands.json diff --git a/disk-gc-threat-response.prose.md b/disk-gc-threat-response.prose.md index 2c879a1..82be7b6 100644 --- a/disk-gc-threat-response.prose.md +++ b/disk-gc-threat-response.prose.md @@ -65,7 +65,7 @@ Host filesystems have their own risk profile and their own bands. A host root ne **Escalations are STATE-CHANGE driven, not per-run.** A volume alerts ONCE when it enters a higher band (GREEN->WARN, WARN->AMBER, AMBER->RED) and ONCE when it drops back down (a recovery notice). While a volume stays in the same band, it is reported in the scan output only — no DM, no channel alert. This prevents the same 96% easystore2 from re-DMing the owner on every 6-hour scan and drowning a real warning in noise. -**State lives in a small JSON state file:** the scanner resolves it to an absolute path from the script's location — `$(dirname "$0")/state/host-disk-bands.json` (i.e., the `state/` directory next to the `scripts/` directory in the prose-contracts repo). Keyed by `host/volume` → last-seen band. The scanner reads the prior band, compares to the current band, and DMs only on a transition. The state file is written after every scan. (Chosen over a periodic digest because the scan already runs every 6h and a transition is genuinely new, actionable state that warrants an immediate DM — but only once.) +**State lives in a small JSON state file:** the scanner resolves it to an absolute path from the script's location — `$(dirname "$0")/state/host-disk-bands.json` (i.e., the `state/` directory next to the `scripts/` directory in the prose-contracts repo). The state file is gitignored runtime state — the scanner creates it on first run. Keyed by `host/volume` → last-seen band. The scanner reads the prior band, compares to the current band, and DMs only on a transition. The state file is written after every scan. (Chosen over a periodic digest because the scan already runs every 6h and a transition is genuinely new, actionable state that warrants an immediate DM — but only once.) **Volume naming rule:** Every host line MUST name the volume and what lives on it. Example output: diff --git a/state/host-disk-bands.json b/state/host-disk-bands.json deleted file mode 100644 index 6a15325..0000000 --- a/state/host-disk-bands.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "acerpve//": "GREEN", - "acerpve//media/mediastore": "GREEN", - "acerpve//media/storage": "GREEN", - "amdpve//": "GREEN", - "amdpve//media/mediastore": "GREEN", - "amdpve//media/storage": "GREEN", - "storepve//": "GREEN", - "storepve//media/easystore2": "HOST-RED", - "storepve//media/mediastore": "GREEN", - "storepve//media/reanim": "HOST-WARN", - "storepve//media/storage": "GREEN", - "minipve//": "GREEN", - "minipve//media/storage": "GREEN", - "ocupve//": "GREEN", - "ocupve//media/mediastore": "GREEN", - "ocupve//media/storage": "GREEN" -} \ No newline at end of file