# 2026-04-01

## 今日摘要
1. 03:00（Asia/Shanghai）完成每日日志更新：已扫描 `/var/root/.openclaw/logs/`、站点仓库近24h提交、以及 `openclaw_log/watchdog/watchdog.log`。
2. 近24h `network-watchdog.log` 显示主线状态为可恢复：03:44~04:03 出现一轮持续异常（`fails` 最高到 8），经多次自动恢复后回到 healthy。
3. 06:45、08:45、09:45、13:45、17:45 出现短时抖动，其中 17:47~17:53 触发恢复动作（重启代理 + bounce Wi-Fi）后恢复。
4. 18:45 到次日 02:45 的每小时慢速检查均为 healthy，夜间链路稳定性较前半日改善。
5. `gateway-daemon.err.log` 近24h仍持续出现 `gmail-watcher` 报错：`[gog] resolve user config dir: $HOME is not defined`，并按 5 秒间隔重启，问题未闭环。
6. `gateway-daemon.out.log` 与上述错误对应，持续记录 watcher 重启启动行为，属于稳定复现的 crash-loop。
7. `health-monitor.log` 按小时写入 `severity=warn`，`consecutiveBad` 从 1095 递增到 1118，告警状态持续累积。
8. 站点仓库 `halewongai.github.io` 近24h有 2 次提交：`b687dba Update logs`、`011c740 Update status`。
9. `/Users/hale/Desktop/openclaw_log/watchdog/watchdog.log` 仍仅有 2026-02-03 历史记录，近24h无新增。
10. 本日网络/权限关键结论：未观察到新的 TCC / Full Disk Access / sudo NOPASSWD 变更；核心风险仍为 gmail watcher 环境变量缺失与白天网络波动段的恢复压力。

## 关键操作（命令/配置/服务变更）
- 日志扫描：
  - `ls -lt /var/root/.openclaw/logs`
  - `awk '$0 >= "[2026-03-31 03:00"' /var/root/.openclaw/logs/network-watchdog.log | egrep 'unhealthy|healthy|ACTION|fails'`
  - `awk '$0 >= "[2026-03-31 03:00"' /var/root/.openclaw/logs/health-monitor.log`
  - `grep -a "gmail-watcher" /var/root/.openclaw/logs/gateway-daemon.err.log | tail`
  - `grep -aE "gmail watcher|gmail-watcher|watch" /var/root/.openclaw/logs/gateway-daemon.out.log | tail`
- 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|%an|%s" -n 50'`
- 近24h确认到的服务动作：
  - network-watchdog 在阈值触发时执行自动恢复链路（重启 Clash Party/mihomo、bounce Wi-Fi），并在多数场景下恢复为 healthy。
  - gmail watcher 持续 crash-loop（`$HOME` 缺失），尚未看到修复动作生效。

## 交付物/链接
- 每日日志：`/Users/hale/Desktop/openclaw_log/daily/2026-04-01.md`
- 日志索引：`/Users/hale/Desktop/openclaw_log/INDEX.md`
- 仓库：`/Users/hale/Desktop/github/halewongai.github.io`
- 近24h提交：
  - `b687dba` — Update logs
  - `011c740` — Update status

## 待办
1. 为 gmail watcher 补齐运行环境（至少 `HOME`），终止 5 秒重启循环。
2. 为 watcher 增加退避/熔断策略，避免 crash-loop 造成日志与资源放大。
3. 复盘 03:44~04:03 与 17:45~17:53 两段异常，拆分“网络链路波动”与“代理进程不稳定”贡献。
4. 优化 network-watchdog 恢复编排，减少连续重复动作（重启 + bounce）的触发次数。
5. 针对 health-monitor 长期 `severity=warn` 建立明确处置阈值（自动告警/人工介入/重置条件）。
