4 Commits
Author SHA1 Message Date
ClaudeandClaude Opus 5.5 caf3af6b7e fix(monitor): alerts by Feishu and email, host checks, OTP retry, off-host probe (BUG-2348)
- notify-feishu.sh: add a Resend email channel (key read from .env.production
  via a header file, never argv/stdout); both channels when configured, one
  acceptance counts; fixed Chinese labels on every alert line.
- classify_error_log.py: per-code thresholds for low-volume signals, the
  [ops-signal] marker, api access-log 429/5xx counted without query strings.
- ops-check.sh: container restarts/OOM, host memory, report queue wait, new
  feedback count (no content).
- OTP sender: retry network/429/5xx once with the same idempotency key; final
  failure logs otp_send_failed (no address).
- install-production-monitor.sh: idempotent cron install + --test-alert.
- monitor-public-health.yml: off-host probe every 5 minutes on the runner.
- Tests: tests/test_monitor_alerts_2348.py (on the quick list), OTP sender and
  ops-signal tests. Issues #350, #354.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-25 11:03:45 +08:00
ClaudeandClaude Opus 5.5 049614ffa0 fix(model): the admin's fallback model answers when the default provider fails (BUG-2347, #352)
Independent Staging Quality Gate / validate-python (push) Successful in 6m38s
Independent Staging Quality Gate / validate-frontend (push) Successful in 6m48s
Independent Staging Quality Gate / publish (push) Successful in 7m54s
- A provider-side failure (401/403/408/409/429/5xx, timeout, network) before any
  answer content reached the user moves the call once to the published fallback
  model; a stream is never switched after content has streamed.
- Settlement prices the tokens with the model that answered (per-request /
  per-job scope); credits charged are unchanged.
- 功能开关「暂停聊天」 (ops.chat_paused): an emergency stop, answered before any
  credit is reserved; a failed read keeps chat open.
- Daily model spend alert from usage_ledger (MODEL_DAILY_SPEND_ALERT_USD, default
  $30), throttled, forwarded by the monitor on first occurrence; per-user spend
  view on /admin/usage.

Checks: tsc clean; eslint 0 errors; new tests model-fallback-2347 (11) and
model-spend-alert-2347 (5) pass; digest Python tests pass; Python quick gate
passed; full frontend suite 5334 tests, 28 failures, all the known
environment set (PostgreSQL, compose, YAML, staging sync, swisseph).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-25 10:58:47 +08:00
jesse-uxandGrok (agent loop) 9455fbfc4f fix(release): keep daily backups from stalling when the disk fills
Expired daily files are pruned before a new backup, a verify older than 36 hours raises an alert, and the host monitors call sudo with the production env file. The Linux 0600 check is on the staging quick list.

Co-Authored-By: Grok (agent loop)
2026-10-15 17:24:26 +08:00
jesse-uxandGrok (agent loop) 53d8df257d 给内测补上每日加密备份、宕机告警和日志上限。
主机安装和一次恢复演练留给产品。页面没有变化。

Co-Authored-By: Grok (agent loop)
2026-10-15 12:58:34 +08:00