- postgres 1g + oom_score_adj -500; api 1536m + init; web 768m; caddy 128m
(BUG-2416 hardening kept; web keeps its own SIGTERM handling)
- disk alert 80% -> 65%, below the 70% backup stop line
- ops-check: container_memory_high at 85% of the container's own limit
- after a verified production deploy: keep newest 5 pre-release recovery
points (+ baseline) and current/previous app images; dry-run supported
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
Mobile Safari and WeChat drop a download started after an await. The export
sheet now asks for its code on open; the click marks and downloads at once,
then confirms the code in the background (confirm_report_export: edition,
scope, exported_at). With no code at hand the file is exported unmarked, no
error toast, and the server logs one [ops-signal] export_unmarked line
(monitor threshold 3 per window, Feishu wording added).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
Alert only, never blocks or slows a user. Counts reuse BUG-2402's
request_rate_counters (digests only, no question text); one [ops-signal]
line per account and window with a UUID-shaped HMAC account reference that
the admin customers search resolves. Monitor maps the three codes
(threshold 1, Chinese labels). Defaults: exports >20/h or >60/day,
same question on >5 profiles/h, >10 new profiles/h; env-configurable.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
- 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
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)