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:
PTah
2026-07-08 14:12:25 +10:00
parent 05733d7402
commit b0abf99d1b
10 changed files with 105 additions and 5 deletions
+12
View File
@@ -119,8 +119,20 @@ sac_reset_fail_count() {
sac_write_fail_count 0
}
# Внутренний флаг: при shutdown/SIGTERM не крутить счётчик (restart во время SAC-deploy).
sac_fail_count_increment_suppressed() {
case "${SAC_SUPPRESS_FAIL_COUNT:-0}" in
1 | yes | true | on) return 0 ;;
esac
return 1
}
sac_increment_fail_count() {
local n max
if sac_fail_count_increment_suppressed; then
write_log "SAC: пропуск sac-fail.count (shutdown/maintenance)"
return 1
fi
max="${SAC_FALLBACK_FAILURES:-5}"
n="$(sac_read_fail_count)"
n=$((n + 1))