fix: Xvfb 管道挂死根因修复 + 日报窗口 mtime 兜底 + 翻译切换 dashscope

- domestic_crawl_8g.sh: Xvfb 启动脱离管道 fd(</dev/null + 重定向日志 + disown)。
  修复 2026-09-06 事故:Xvfb 常驻进程继承 'bash crawl | tee' 管道写端,
  tee 永远收不到 EOF → domestic_full.sh 卡死 M1 → 日报永不生成
- scheduler/reporter.py: _load_events_window 对 'publish_time 过期' 的文件
  增加 mtime 兜底(本次窗口内新翻译的事件不被低质量 publish_time 误伤)。
  修复空日报:date-only/美式日期错位的 publish_time 使窗口 articles=0
- configs/system.yaml: M4 翻译 provider 切换 deepseek → dashscope(qwen3.7-flash),
  降低翻译成本(输出单价约降 ~9 倍);daily_report 保持 deepseek 不变
This commit is contained in:
2026-09-06 11:52:31 +08:00
parent c1ab751d95
commit e9f8ef13ef
3 changed files with 26 additions and 6 deletions
+11 -1
View File
@@ -243,7 +243,17 @@ def _load_events_window(now: datetime) -> list[dict]:
continue
if pt < cutoff:
continue
# publish_time 质量兜底:部分源(zerohedge/cnbc 等)publish_time
# 仅日期(按 00:00 UTC 处理)或美式日期错位(如 09/05 → 5 月 9 日)。
# 这类文章在报告非 07:00 运行时易被 25h 窗口误伤。若事件文件本身
# 是窗口内新生成的(mtime ≥ cutoff,即本次管道刚翻译),予以保留。
# (2026-09-06 空日报事故教训:窗口 articles=0 → AI 摘要为空)
try:
mtime = datetime.fromtimestamp(fp.stat().st_mtime, tz=UTC)
except OSError:
mtime = None
if mtime is None or mtime < cutoff:
continue
articles.append(data)
except (json.JSONDecodeError, OSError):
pass