[Bug] 涨跌幅超过 10% 时,涨幅榜和跌幅榜仍应按实际幅度排序
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 87/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- bun, typescript
- Domain
- backend-api-design, data
Research direction
Start with the scoring logic in packages/shared/src/screening/strategies.ts and the sorting and limit handling in packages/shared/src/screening/service.ts. Run the two named test files, then add cases for the supplied gainers and losers quotes with both input orders. Done means limit: 1 returns +25% and −25%, scores remain in the 0–1 range, and other strategies keep their sorting behavior.
Written by the indexing model from the issue text.
Description
用模拟行情给 AAPL.US、MSFT.US 分别设置 +11%、+25%,按这个顺序传给 ScreeningService.runScreening。策略用 top-gainers,只取一条结果,当前榜首是 +11% 的 AAPL.US。改用 top-losers 并传入 −11%、−25%,榜首同样选中了幅度较小的 −11%。
把 limit 调到 2,可以看到两条候选的 score 都是 1。服务按分数排序后直接截取结果。两种策略的评分 · 排序和截取
验收标准
- 用以上两组模拟报价,
limit: 1分别返回 +25% 和 −25%。对调证券输入顺序也得到同一个榜首。 - 保留候选评分的 0–1 范围,以及其他筛选策略已有的排序含义。
- 可用
{ persist: false }直接测筛选服务,运行bun test packages/shared/src/screening/service.test.ts packages/shared/src/screening/strategies.test.ts。
欢迎熟悉 TypeScript 或喜欢数据排序的朋友评论 /claim,整个复现只需两条假报价。
- Dominant language
- TypeScript
- Stars
- 206
- Forks
- 37
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 26
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
-
documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
accessibility area:desktop good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
area:evaluation bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
platform:windows provider:antigravity-cli providers setup triaged wontfix
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
can1357/oh-my-pi#21349 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ohcnetwork/care_fe#17474 ·
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 90/100