Commit Graph
20 Commits
Author SHA1 Message Date
simon e9f8ef13ef 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 不变
2026-09-06 11:52:31 +08:00
simon c1ab751d95 feat: 日报改为每日一次 + 新增 LLM 使用/成本/缓存文档
- domestic_full.sh / pipeline.sh 新增 --no-report 参数:跳过日报生成,
  保持 M1 抓取 + M2→M6 管道不变,用于 12:00/18:00 只抓不生成日报
- crontab: 07:00 全量含日报,12:00/18:00 --no-report(日报每日一次,降低 LLM 费用)
- docs/llm-models.md: 各 LLM 调用点分别用的 provider/model 事实清单
- docs/llm-cost-analysis.md: 真实 token 消耗与费用构成、降本建议
- docs/llm-cache-optimization.md: DeepSeek 上下文缓存机制与命中率提升设计
- docs/README.md 增加上述三个文档索引
2026-09-04 10:38:33 +08:00
simon 9e4f5b4c75 fix: 去重合并多来源后同步到 events/Qdrant/MySQL,新增 sync-sources 回填命令
- dedup/pipeline: 合并 source_ids 后自动同步已生成的 events JSON 和 Qdrant payload
- 新增 sync_sources_from_deduped / uv run en-news sync-sources,用于历史数据回填
- sync-sources 会扫描 deduped 多来源唯一篇,更新 events、Qdrant、MySQL news_event.sources
- docs: 补充 sync-sources 使用说明
2026-08-23 10:55:23 +08:00
simon cf74e5e7f5 docs: 记录已验证的 Gitea 提交与推送方式 2026-08-22 21:57:24 +08:00
simon 3b44f64f66 refactor: 清理历史 AI Agent 文档残留 + 重构 docs/ + Pipeline 健壮性修复
- docs: 删除 CLAUDE.md / continuation.md / english-news-plan.md 及旧版 intlnews_usage.*,
        统一迁移到 docs/{README,architecture,quickstart,usage,pipeline,configuration,deployment,development,faq}.md
- README: 精简为仓库入口,指向 docs/
- configs/sources.yaml: 更新注释指向新文档
- .env.example: 修正 DashScope Embedding 端点说明

Pipeline 修复:
- dedup/llm/embedding/vectorstore/reporter: 过滤 M2 no_content / 空正文,避免污染下游与 Qdrant
- dedup/pipeline: 改为先写唯一文件再写指纹,避免崩溃导致文章永久丢失
- crawler/orchestrator: sources_crawled 改为“尝试数”,成功数 = crawled - failed
- crawler/storage: write_index_jsonl 从文章路径推断日期,修复跨天/测试路径问题
- scheduler/pipeline: STEP_TIMEOUTS 实际生效(SIGALRM)
- scheduler/reporter: emb_count 排除 index.json;日报跳过无原文事件
- vectorstore/pipeline: payload 增加 source_ids;--recreate --all 时空日期也重建 collection
- app/cli: extract/dedup/translate/embed/index/pipeline 支持 --date;embed/index 支持 --all;crawl 全源失败返回非零
- scripts: domestic_full/crawl_8g/crawl_2g/pipeline 安全加载 .env;M1 全失败不标记且最终退出码=1
2026-08-22 20:47:53 +08:00
simon 951276a313 feat: 日报多来源入库(news_event.sources 列,JSON 数组,主源居首)
- EventRow 新增 sources 字段;init_schema 幂等 ALTER 补列(MariaDB)
- save_report 写入 sources JSON;_article_sources_full 完整来源列表
- source 字段保持 ≤3 拼接兼容;新增多源完整列表测试
- 已部署 pi5:sources 列写入验证通过(单源数组);完整多源待新数据
m9-sources-column
2026-08-12 13:06:01 +08:00
simon 32e99aeaf6 chore: .gitignore 忽略 data/dedup/ 指纹库(运行产物) 2026-08-12 11:23:35 +08:00
simon 012cb615d3 feat: 脚本执行显性输出当前阶段与 AI 模型供应商/名称
- pipeline.sh 每阶段 banner(━━━ M4 翻译+事件抽取(AI 大模型: deepseek / deepseek-v4-flash)━━━)
- ai_model_info() 从 system.yaml 读取场景模型(translation/daily_report/embedding)
- Python 层:M4/M5/日报 显性打印 provider/model(场景标注)
- 已同步 pi5 实测:客户端初始化日志含供应商/模型
2026-08-12 11:20:51 +08:00
simon bdd936a3e4 feat: 全流程终端实时进度输出 + 步骤日志
- step_run 增加耗时统计(▶ 开始 / ✔ 完成 Ns / ✗ 失败 exit=N)与 STEP_LOG 支持
- domestic_full.sh / pipeline.sh 去掉 tail 截断,输出实时透传终端并 tee 到 logs/*.log
- 退出码用 PIPESTATUS[0] 捕获(规避 pipefail/tee 吞码);全角标点后变量用花括号包裹
- 已同步 pi5 实测:M3 31s / M6 20s 耗时显示正常,日志文件生成
2026-08-12 11:18:08 +08:00
simon 06b00b7f49 feat: 全流程脚本 --resume 断点续跑 + 各步骤文件级增量说明
- 新增 scripts/_step_state.sh:步骤状态库(data/run_state/{date}.state,按天换新)
- pipeline.sh / domestic_full.sh 支持 --resume,按步骤跳过已完成项
- step_run 显式检查退出码(规避 bash set -e 条件上下文陷阱),失败步骤不标记
- M1 保持部分源失败容忍(step_should_run/step_mark 手动控制)
- 确认并文档化各步骤文件级增量:M2/M4/M5 按文件存在跳过、M3 指纹库、M6 upsert 幂等
- 已同步 pi5 并验证(--badarg exit=1、step_run 机制正常)
2026-08-12 11:06:29 +08:00
simon c72a5ed13a feat: AI 模型按场景独立配置(llm_scenes)+ 去重多来源合并
- system.yaml 新增 llm_scenes(translation / daily_report,含用途/方法/模型要求说明)
- load_llm_config(scene=...) 场景覆盖;日报摘要 temperature 0.3 硬编码 → 配置
- M3 去重:唯一篇记录 source_ids(跨源重复合并,首个来源为 source_id)
- source_ids 经翻译透传至 events,日报事件 source 多来源拼接展示(≤3 个)
- 已部署 pi5:merge 实证 10 源合并;日报 report_id=224 正常入库
2026-08-12 09:56:55 +08:00
simon 9aa44e610d feat: LLM/Embedding 重试次数纳入 system.yaml 统一配置
- system.yaml: llm.max_retries(死配置) 改为 llm.max_attempts;embedding 段新增 max_attempts
- llm/client.py: LLMConfig 新增 max_attempts(默认 3 兜底),load_llm_config 读取配置
- llm/extractor.py: translate_and_extract(_async) max_attempts=None 时取 config.max_attempts
- embedding/client.py: load_embedding_config 读取 embedding.max_attempts
- scheduler/reporter.py: _call_llm_simple max_retries=None 时取 max_attempts-1
- 新增 2 个配置读取测试;已同步 pi5 验证
m9-max-attempts
2026-08-05 08:48:43 +08:00
simon d4a55bcaaa feat: M9 日报结构化入库(HTML 改为写入 MySQL news_report/news_event,report_type=intl)
- 新增 report_db/ 包(models/schema/db,复用 news 项目实现,幂等 upsert)
- reporter.py: _build_report_data + generate_report 写库返回 report_id
- pipeline/cli 适配 report_id 返回值;HTML 渲染/上传保留 deprecated
- 新增 tests/test_report_db.py;.env.example 增加 NEWS_DB_* 配置
- 已部署 pi5 并验证:真实生成 report_id=184(12 事件)+ 幂等覆盖
m9-report-db
2026-08-04 11:09:17 +08:00
simonandClaude e1ec5f836d docs: intlnews_usage.html 移至 docs/ + 上传到 doorcome
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-23 09:30:15 +08:00
simonandClaude b2aa62dfa5 docs: 新增 intlnews_usage.html 操作手册
网页版操作手册包含:部署指南、操作命令、新闻源状态、
数据存储、MCP 服务、配置参考、排障指南、变更记录

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-23 09:29:36 +08:00
simonandClaude ea472c8bf8 docs: 更新 README 操作手册
- 13 个源清单及状态表
- 部署架构图更新(海外服务器已停用)
- Pi 前置条件/操作命令/常见问题

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-23 09:27:59 +08:00
simonandClaude f0adf713b7 docs: 更新 continuation.md 2026-07-23 会话记录
- investing.com 反爬策略调整(Google News RSS + magic/stealth)
- forexlive→investinglive 迁移
- 各源抓取状态表更新

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-23 09:26:53 +08:00
simonandClaude 5c106120bf feat: 增强反爬策略 + forexlive 迁移 investinglive
- crawler.py: 启用 magic/stealth 全自动反检测, --disable-webrtc,
  delay_before_return_html=3s, remove_consent_popups, 过滤列表页URL
- rss_crawler.py: 新增 _make_rss_client() 支持 httpx 代理,
  Google News RSS 跳过 article_url_pattern 域名过滤
- sources.yaml: investing.com 改用 Google News RSS 代理绕过Cloudflare;
  forexlive -> investinglive (域名已301重定向)
- domestic_crawl_8g.sh: HTTP_PROXY/HTTPS_PROXY 在 .env 加载前设置

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-23 09:25:23 +08:00
simon fe8b417ab6 初始化 2026-07-18 16:13:52 +08:00
simon c0070f0a5c Initial commit 2026-07-18 16:11:58 +08:00