feat: 完成 P6 通知渠道收口 - #1275
Conversation
🤖 自动审查报告
📁 修改的文件
... 还有 9 个文件 🧠 AI 代码审查意见结论Ready to Merge 结构化审查结果
必改项无。基于当前可见的 diff、详细的 PR 描述和全面的验证结果,未发现阻碍 PR 合并的正确性、安全性、CI 不通过或描述与实际改动存在实质性矛盾的问题。 建议项
|
ZhuLinsen
left a comment
There was a problem hiding this comment.
评审结论
- 必要性:通过,P6 通知渠道收口与 #1200 剩余工作相关,新增 Gotify 一等渠道并同步配置、文档、Web 与测试矩阵有明确价值。
- 是否有对应 issue:有,Refs #1200。
- PR 类型:feat,主改动是新增 Gotify 通知渠道;同时包含 ntfy 校验修复、文档与测试补充。
- description 完整性:完整,已说明范围、兼容性、外部 Gotify API 依据、验证结果、未做真实 Gotify smoke 的原因与回滚方案,符合 AGENTS.md 对用户可见能力、配置与文档同步的要求。
- 是否可直接合入:可,当前 CI 为 success,改动覆盖
.env.example、专题文档、双语文档、CHANGELOG、Web 配置元数据与后端测试;mergeable_state=blocked更像分支保护状态,不构成本次代码审查阻断点。
🤖 此回复由 OpenReview Bot 自动生成,仅供参考。如有疑问请 @维护者。
|
@codex review |
ZhuLinsen
left a comment
There was a problem hiding this comment.
跟进结论
- 结论:接受 + 最新 head 复核后,Gotify 运行时接入、Web/API、路由、诊断、Actions env、文档和测试矩阵基本一致,维持可合入判断。
- 是否仍有阻断:无 + 当前 CI 全部成功;
mergeable_state=blocked不单独构成代码审查阻断。
说明
src/notification_sender/gotify_sender.py:GOTIFY_URL作为 base URL 拼接/message、token 走X-Gotify-Key、payload 使用 JSON 和 Markdown extras;与 Gotify 官方 push/message extras/API 说明一致(https://gotify.net/docs/pushmsg、https://gotify.net/docs/msgextras、https://pkg.go.dev/github.com/gotify/server/v2/docs)。src/services/system_config_service.py/tests/test_system_config_service.py:Web 测试不会持久化临时 Gotify 配置,masked secret 不会覆盖已有值;结构化事实里的“运行时模型清理”提示不落在本次新增 Gotify 通知字段上,未看到静默清空用户通知配置的问题。.env.example、docs/notifications.md、docs/full-guide.md、docs/full-guide_EN.md、docs/CHANGELOG.md已同步 Gotify、ntfy 收紧、Bark custom webhook 和 WebPush/Apprise docs-only 范围;README 未改符合仓库规则。- 未执行真实 Gotify endpoint smoke 仍是剩余风险,但 PR 已明确说明,并已有 mock 测试覆盖 endpoint、header auth、payload、timeout、失败隔离和脱敏;不作为阻断。
🤖 此回复由 OpenReview Bot 自动生成,仅供参考。如有疑问请 @维护者。
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
PR Type
Background And Problem
Issue #1200 的 P6-A ntfy 已合并,本 PR 收口剩余 P6-B/C/D,避免把通知矩阵、文档、changelog 和 Web 配置元数据拆成多个互相冲突的小 PR。
本 PR 不关闭 #1200,只作为剩余 P6 工作的合并收口。
Why Combined
本 PR 有意将 P6-B / P6-C / P6-D 合并为一个 draft PR,而不是拆成三个独立 PR。原因是三段工作共享同一组通知矩阵、
.env.example、Web 配置 schema/help、workflow env、专题文档和docs/CHANGELOG.md;拆开提交会让这些文件反复产生重叠修改和 merge conflict,review 时也更难判断最终通知能力矩阵是否一致。范围上仍按 P6-B/C/D 分段隔离:P6-B 是现有渠道校验和文档收口,P6-C 是 Gotify runtime,P6-D 仅是 WebPush / Apprise docs-only 评估;本 PR 不把 WebPush / Apprise 或 Bark 混入运行时实现。
Scope Of Change
P6-B:
https://ntfy.sh/%20这类 URL 编码空白 topic 被误判为有效 topic endpoint 的问题。BARK_*或一等渠道。P6-C:
GOTIFY_URL/GOTIFY_TOKEN。GOTIFY_URL是 Gotify server base URL,可包含反向代理 path prefix,但不包含/message;sender 内部拼接/message。X-Gotify-Keyheader 发送,不放入 URL;payload 使用 JSON 并声明 Markdown display extras。P6-D:
docs/notifications.md增加 WebPush / Apprise docs-only 评估。同步更新:
.env.example、docs/notifications.md、docs/full-guide.md、docs/full-guide_EN.md、docs/CHANGELOG.md、Web 设置 help 与测试。Issue Link
Refs #1200
Verification Commands And Results
结果:通过,无 whitespace error。
结果:通过。该脚本由
.github/workflows/daily_analysis.yml的执行股票分析steprun:内容提取生成,用于校验 workflow shell 片段语法。结果:
373 passed, 35 warnings, 43 subtests passed。结果:测试
1 passed / 3 tests passed,lint 通过,build 通过;Vite 仍提示现有大 chunk warning。PATH=.venv/bin:$PATH ./scripts/ci_gate.sh结果:
1924 passed, 2 deselected, 42 warnings, 166 subtests passed,backend-gate: all checks passed。Compatibility And Risk
BARK_*配置。/message推送;REST API 支持通过X-Gotify-Keyheader 传 token;Message Extras 支持client::display.contentType=text/markdown。Rollback Plan
Revert this PR 即可回滚 Gotify 渠道、ntfy 校验收紧、Bark 文档补充和 WebPush / Apprise 评估文档;无需数据迁移。若已配置
GOTIFY_URL/GOTIFY_TOKEN,回滚后这些 env 会被旧版本忽略。EXTRACT_PROMPT Change (if applicable)
未修改
src/services/image_stock_extractor.py或EXTRACT_PROMPT。展开 / Expand: Full EXTRACT_PROMPT
Checklist
docs/CHANGELOG.md;README.md仅在首页级信息变化时更新,细节优先写入docs/*.md/ If user-visible changes are included, relevant docs anddocs/CHANGELOG.mdare updated;README.mdis updated only for homepage-level changes, with details kept indocs/*.md