Skip to content

fix(screening): 正确记录最新新闻时间 - #219

Merged
helsome merged 1 commit into
helsome:mainfrom
Guo-Yixin:fix/screening-newest-news
Oct 13, 2026
Merged

helsome merged 1 commit into
helsome:mainfrom
Guo-Yixin:fix/screening-newest-news

Conversation

@Guo-Yixin

Copy link
Copy Markdown
Contributor

改动说明

修复 news-surge 筛选策略把返回数组第一项当作“最新新闻”的问题。新闻 provider 返回顺序未写入数据契约,乱序结果会让候选的 newestTimestamp 证据指向旧新闻。

本次改为在近期新闻中选择时间戳最大的条目,仅修正证据指标,不改变近期新闻数量、评分或筛选阈值。

关联 Issue

N/A:独立的小范围数据正确性修复。

测试报告

环境

  • Bun:1.3.14
  • OS:Windows

实际执行命令与结果

bun test packages/shared/src/screening/strategies.test.ts
→ 28 passed / 0 failed / 170 expect() calls

bun run --filter @finagent/shared typecheck
→ Exited with code 0

git diff --check
→ pass

新增回归测试在修复前失败:乱序新闻的 newestTimestamp 收到旧条目的 1699827200,而预期最新时间为 1700000000;修复后通过。

已知失败 / Baseline

未将并行执行的 shared 全量测试作为本 PR 的通过依据:本地该命令触发了项目既有的长驻测试进程,未在预期时间内退出;本 PR 的 focused test 和 shared typecheck 均已独立通过。

UI 截图

  • 本 PR 无可见 UI 变化(无需截图)

Scope / 后续

仅修正 news-surge 的最新新闻证据字段,不改变筛选规则语义。

@helsome helsome left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

独立的小范围修复成立:fresh 数量门槛已保证非空,再选 timestamp 最大值,不修改筛选阈值或评分,不依赖 provider 数组排序。作者 Windows/Bun 1.3.14、准确 focused 命令 28/0 与 shared typecheck 报告充分;全量未完成未被当作通过。当前 PR CI 为 action_required,非质量失败。这里无新外部接入或可见 UI,不要求额外 API/E2E,批准。

@helsome
helsome merged commit 0a7e5c8 into helsome:main Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants