docs: 补齐告警中心 P0 基线与契约 - #1301
Merged
ZhuLinsen merged 2 commits intoMay 15, 2026
Merged
Conversation
🤖 自动审查报告
📁 修改的文件
|
Collaborator
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. ℹ️ 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". |
ZhuLinsen
reviewed
May 14, 2026
ZhuLinsen
left a comment
Owner
There was a problem hiding this comment.
评审结论
- 必要性:通过,Issue #1202 P0 需要先固化告警中心基线、契约和兼容边界,本 PR 的文档与契约测试覆盖该目标。
- 是否有对应 issue:有,Refs #1202。
- PR 类型:docs/test,主要新增
docs/alerts.md与文档索引/CHANGELOG,同时补充 focused tests 锁定 EventMonitor、schedule mode 和文档结构契约。 - description 完整性:完整,已包含背景、范围、issue、验证命令与结果、兼容性风险、回滚方案,并符合 AGENTS.md 对 CHANGELOG 扁平条目和 README 克制更新的要求。
- 是否可直接合入:可,当前 CI 为 success,改动未触及运行时代码、API、数据库 schema、
.env.example、Web 或通知实现;mergeable_state=blocked不单独构成代码阻断,按仓库分支保护由具备权限的维护者合入即可。
🤖 此回复由 OpenReview Bot 自动生成,仅供参考。如有疑问请 @维护者。
Anyone878
pushed a commit
to Anyone878/daily_stock_analysis
that referenced
this pull request
May 17, 2026
Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
11 tasks
EchoingFootsteps
pushed a commit
to EchoingFootsteps/daily_stock_analysis
that referenced
this pull request
Jul 4, 2026
Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
Closed
bmwu
pushed a commit
to bmwu/daily_stock_analysis
that referenced
this pull request
Aug 24, 2026
Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Type
Background And Problem
Issue #1202 的 P0 需要先收口告警中心基线、数据契约、存储评估和 legacy 配置兼容边界,方便后续 P1/P2 在不改变现有
EventMonitor/AGENT_EVENT_ALERT_RULES_JSON行为的前提下继续实现。当前仓库已有
EventMonitor、三类 runtime alert rule 和 schedule mode 后台任务入口,但缺少专题文档说明 Phase 边界、后续实体契约和存储落点评估,也缺少 focused tests 锁住这些 P0 契约。Scope Of Change
docs/alerts.md,说明 EventMonitor 当前基线、三类 runtime rule、legacy JSON 兼容关系、四类告警实体契约、存储方案评估、Phase 边界和 P0 non-goals。docs/INDEX.md/docs/INDEX_EN.md,在文档索引加入告警中心入口,英文索引按现有惯例标注 Chinese-only。docs/CHANGELOG.md的[Unreleased]段,按仓库规则追加一条扁平[文档]条目。tests/test_alerts_docs.py,对告警中心文档做结构性契约检查,并校验存储评估引用的src/storage.py当前存在。tests/test_multi_agent.py::TestEventMonitor,覆盖三类 runtime rule 的序列化 key、status 值和 unsupported placeholder rule skip 行为。tests/test_main_schedule_mode.py,覆盖 schedule mode 下 EventMonitor background task 注册,以及无有效 monitor 时不注册 task。Issue Link
Refs #1202
Verification Commands And Results
.venv/bin/python -m pytest tests/test_alerts_docs.py tests/test_main_schedule_mode.py tests/test_multi_agent.py::TestEventMonitor -q .venv/bin/python -m pytest tests/test_multi_agent.py::TestEventMonitorConfigIntegration tests/test_system_config_service.py::SystemConfigServiceTestCase::test_validate_accepts_blank_optional_json tests/test_system_config_service.py::SystemConfigServiceTestCase::test_validate_accepts_price_change_percent_event_rule tests/test_system_config_service.py::SystemConfigServiceTestCase::test_validate_rejects_unsupported_event_rule_type -q .venv/bin/python -m py_compile tests/test_alerts_docs.py tests/test_main_schedule_mode.py tests/test_multi_agent.py git diff --check PATH=.venv/bin:$PATH ./scripts/ci_gate.sh关键输出/结论:
31 passed, 4 warnings9 passedpy_compile: passedgit diff --check: passedci_gate.sh:1933 passed, 2 deselected, 42 warnings, 166 subtests passed;backend-gate: all checks passedCompatibility And Risk
.env.example、Web 页面或通知发送实现。AGENT_EVENT_ALERT_RULES_JSON;文档明确 P0 只定义契约和边界。Rollback Plan
Revert this PR 即可回滚;本 PR 不包含数据库迁移、配置迁移或运行时状态写入,不需要额外数据/配置回滚。
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