# 2026-03-31

## 今日摘要
1. 03:00（Asia/Shanghai）完成每日日志更新：已扫描 `/var/root/.openclaw/logs/`、站点仓库近24h提交、以及 `openclaw_log/watchdog/watchdog.log`。
2. 近24h `network-watchdog.log` 多次出现 `unhealthy -> fast(2m) -> healthy`，整体仍可自愈，但恢复频率偏高。
3. 2026-03-30 20:46~20:53 出现连续失败（最高 `fails=5`），触发多轮自动恢复链路（重启 Clash Party/mihomo、刷新系统代理、bounce Wi-Fi），最终恢复。
4. 2026-03-31 00:46 再次触发到 `fails=3`，执行重启后在 00:47 记录 `RECOVERED: after restart clash`。
5. `gateway-daemon.err.log` 持续报错：`[gmail-watcher] [gog] resolve user config dir: $HOME is not defined`，导致 watcher 约每 5 秒退出并重启。
6. `gateway-daemon.out.log` 与之对应，02:26~03:00 持续记录 gmail watcher 高频启动，重启风暴未缓解。
7. `health-monitor.log` 近24h按小时写入 `severity=warn`，`consecutiveBad` 由 1071 增至 1094，告警长期未清零。
8. 站点仓库 `halewongai.github.io` 近24h有 2 次提交：`0626897 Update logs`、`0a172d6 Update status`。
9. `/Users/hale/Desktop/openclaw_log/watchdog/watchdog.log` 仅有 2026-02-03 历史记录，近24h无新增。
10. 本日网络/权限关键结论：未发现新的 TCC / Full Disk Access / sudo NOPASSWD 变更；当前主要问题仍是 gmail watcher 缺失 HOME 环境与网络抖动期间的恢复压力。

## 关键操作（命令/配置/服务变更）
- 日志扫描：
  - `tail -n 400 /var/root/.openclaw/logs/gateway-daemon.out.log | egrep ...`
  - `tail -n 400 /var/root/.openclaw/logs/gateway-daemon.err.log | egrep ...`
  - `tail -n 300 /var/root/.openclaw/logs/network-watchdog.log`
  - `tail -n 200 /var/root/.openclaw/logs/health-monitor.log`
  - `tail -n 200 /Users/hale/Desktop/openclaw_log/watchdog/watchdog.log`
- Git 核查（按要求使用登录壳）：
  - `su -l hale -c 'cd /Users/hale/Desktop/github/halewongai.github.io && git log --since="24 hours ago" --date=iso --pretty=format:"%h | %ad | %s"'`
- 近24h日志中确认的服务动作：
  - network-watchdog 在失败阈值触发后执行自动恢复链路（重启代理/刷新代理/bounce 网络服务）。
  - gmail watcher 持续 crash-loop（原因：HOME 环境缺失）。

## 交付物/链接
- 每日日志：`/Users/hale/Desktop/openclaw_log/daily/2026-03-31.md`
- 日志索引：`/Users/hale/Desktop/openclaw_log/INDEX.md`
- 仓库：`/Users/hale/Desktop/github/halewongai.github.io`
- 近24h提交：
  - `0626897` — Update logs
  - `0a172d6` — Update status

## 待办
1. 给 gmail watcher 补齐用户环境变量（至少 `HOME`），停止 5 秒重启循环。
2. 为 watcher 增加退避/熔断，避免持续重启放大日志与资源消耗。
3. 复盘 20:46~20:53 与 00:46 两次高风险网络抖动，区分代理进程问题与链路质量问题。
4. 继续优化 network-watchdog 恢复策略，降低多轮重复动作（重启+刷新+bounce）的触发频率。
5. 针对 health-monitor 长期 `severity=warn` 建立阈值化处置（自动告警/人工检查/重置条件）。
