fix: untrack host-disk-bands.json and document gitignored status
PR Pipeline — Authorize → Validate → Review → Merge / auth (pull_request) Successful in 7s
PR Pipeline — Authorize → Validate → Review → Merge / validate (pull_request) Successful in 3s
PR Pipeline — Authorize → Validate → Review → Merge / lint (pull_request) Successful in 3s
PR Pipeline — Authorize → Validate → Review → Merge / ai-review (pull_request) Successful in 8s
PR Pipeline — Authorize → Validate → Review → Merge / gate (pull_request) Successful in 0s
PR Pipeline — Authorize → Validate → Review → Merge / auth (pull_request) Successful in 7s
PR Pipeline — Authorize → Validate → Review → Merge / validate (pull_request) Successful in 3s
PR Pipeline — Authorize → Validate → Review → Merge / lint (pull_request) Successful in 3s
PR Pipeline — Authorize → Validate → Review → Merge / ai-review (pull_request) Successful in 8s
PR Pipeline — Authorize → Validate → Review → Merge / gate (pull_request) Successful in 0s
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 <abs path> and is gitignored runtime state - the scanner creates it on first run'.
This commit is contained in:
@@ -1 +1,2 @@
|
|||||||
__pycache__/
|
__pycache__/
|
||||||
|
state/host-disk-bands.json
|
||||||
|
|||||||
@@ -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.
|
**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:
|
**Volume naming rule:** Every host line MUST name the volume and what lives on it. Example output:
|
||||||
|
|
||||||
|
|||||||
@@ -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"
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user