[Good first issue] 新建新闻提醒只检查创建后的新闻
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- bun, typescript
- Domain
- backend
Research direction
Start with evaluateRule in packages/shared/src/alerts/evaluators.ts (around lines 195-213), where the new_news branch picks its lower time bound, and check the createdAt and cursor fields in packages/core/src/alert-rules.ts. Run bun test packages/shared/src/alerts/evaluators.test.ts to see the existing offline cases and the mocked research.news setup. Done means a first evaluation counts only news published after createdAt, later evaluations keep using the saved cursor, and the three fixed-clock scenarios in the issue pass.
Written by the indexing model from the issue text.
Description
最小复现
用模拟 research.news 给同一标的返回两条新闻,一条早于规则的 createdAt,一条晚于它。对刚创建的 new_news 规则调用 evaluateRule,首次评估把两条都放进了通知。现有代码缺少历史游标时从 Unix 时间原点开始筛选,新建规则首次检查时可能推送历史新闻。
验证环境为 Windows、Bun 1.4.2,基于 main 的 579395e。
验收标准
- 首次评估以规则创建时间为下限,仅把创建后发布的新闻计入新消息。
- 后续评估继续沿用保存的检查或触发时间。用固定时钟覆盖只有历史新闻、创建后有新新闻、已有检查游标三个场景。
源码起点
验证入口 bun test packages/shared/src/alerts/evaluators.test.ts。
可以先在本条说明准备完成的范围,再评论 /claim。贡献入口见 #7。
- Dominant language
- TypeScript
- Stars
- 206
- Forks
- 37
- Avg merge
- 8h 8m
- Merged PRs (30d)
- 7
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ydflow/Trail
-
area:desktop bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
area:desktop bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
area:desktop bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
[Security]Unauthenticated WebSocket JSON.parse Without Error Handling Leads to Process TerminationOpen
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
nocobase/nocobase#11711 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Y2025: QBI forms print a negative taxable income; Form 8995-A lines 14b/14c check the wrong columnOpen
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
readest/readest#7903 · 1 comment ·
Maintainers usually reply within 1 day