feat: suppress sac-fail.count on shutdown (2.3.2-SAC)

Phase 4.2: SAC_SUPPRESS_FAIL_COUNT during lifecycle shutdown so restart during SAC deploy does not trip Telegram fallback. Add docs/sac-ingest.ru.md for SAC_TIMEOUT_SEC guidance, smoke test, and release manifest.
This commit is contained in:
2026-07-08 14:12:25 +10:00
parent 05733d7402
commit b0abf99d1b
10 changed files with 105 additions and 5 deletions
+32
View File
@@ -0,0 +1,32 @@
#!/bin/bash
# Smoke-test sac-fail.count suppress on shutdown flag. Run from repo root.
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
tmpdir="$(mktemp -d)"
trap 'rm -rf "$tmpdir"' EXIT
write_log() { :; }
ssh_monitor_secure_file() { :; }
ssh_monitor_secure_dir() { mkdir -p "$1"; }
# shellcheck source=sac-client.sh
source "$ROOT/sac-client.sh"
export SAC_FAIL_COUNT_FILE="${tmpdir}/sac-fail.count"
sac_write_fail_count 0
sac_increment_fail_count
[ "$(sac_read_fail_count)" = "1" ] || {
echo "FAIL: expected count 1 after increment" >&2
exit 1
}
SAC_SUPPRESS_FAIL_COUNT=1
sac_increment_fail_count || true
[ "$(sac_read_fail_count)" = "1" ] || {
echo "FAIL: count changed under SAC_SUPPRESS_FAIL_COUNT" >&2
exit 1
}
echo "OK sac-fail.count suppress"