- 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
- 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