# 2026-03-20

## 今日摘要
1. 03:00（Asia/Shanghai）完成每日例行日志更新：已按要求扫描 `/var/root/.openclaw/logs` 最近24小时、站点仓库近24小时提交、以及桌面 watchdog 日志。
2. `gateway-daemon` 在 02:43 后再次出现 `gmail-watcher` 重启风暴；`gog` 进程约每 5 秒重启一次。
3. 主要报错保持一致：`resolve user config dir: $HOME is not defined`，导致 watcher 反复 `code=1` 退出。
4. `network-watchdog.log` 近24小时总体稳定，仅在 03-19 10:34 出现 1 次 `unhealthy`，随后 fast 模式自愈并在 10:38 回退到 slow。
5. `health-monitor.log` 持续写入 `severity=warn`，`consecutiveBad` 从 807 增至 830，累计告警仍在增长。
6. `halewongai.github.io` 近24小时有 2 次提交：`Update logs`、`Update status`，站点例行维护持续。
7. `/Users/hale/Desktop/openclaw_log/watchdog/watchdog.log` 仍仅见 2026-02-03 历史记录，近24小时无新增。
8. 本轮未观察到新的网络/权限策略结论变更（未见新的 TCC / Full Disk Access / sudo NOPASSWD 变更记录）。

## 关键操作（命令/配置/服务变更）
- 日志扫描（最近24小时）：
  - `tail -n 200 /var/root/.openclaw/logs/gateway-daemon.out.log`
  - `tail -n 200 /var/root/.openclaw/logs/gateway-daemon.err.log`
  - `tail -n 200 /var/root/.openclaw/logs/network-watchdog.log`
  - `tail -n 120 /var/root/.openclaw/logs/health-monitor.log`
- watchdog 扫描：
  - `tail -n 120 /Users/hale/Desktop/openclaw_log/watchdog/watchdog.log`
- Git 扫描（按规范使用 `su -l hale`，避免 getcwd 权限噪声）：
  - `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 30'`
- 服务状态结论：
  - `gog gmail watch serve` 仍受运行环境中 `$HOME` 缺失影响，当前无法稳定驻留。
  - 记录过程中未写入 token/密码/私钥等敏感信息。

## 交付物/链接
- 每日日志：`/Users/hale/Desktop/openclaw_log/daily/2026-03-20.md`
- 日志索引：`/Users/hale/Desktop/openclaw_log/INDEX.md`
- 站点仓库：`/Users/hale/Desktop/github/halewongai.github.io`
- 近24小时提交：
  - `071d4ec` — Update logs
  - `40d4024` — Update status

## 待办
1. 修复 `gmail-watcher` 子进程环境变量注入，显式补齐 `HOME` 后复测 `gog gmail watch serve` 稳定性。
2. 为 watcher 重启策略增加退避/熔断，降低固定 5 秒重启造成的日志噪声与资源抖动。
3. 排查 gateway 守护进程对子进程的环境继承链，确认是否有其他依赖 `$HOME` 的任务受影响。
4. 继续跟踪 `health-monitor` 的 `severity=warn` 与 `consecutiveBad` 趋势，补充恢复阈值与告警处置标准。
