Skip to content

fix: 新仓库榜反刷星(克隆簇 / 假关注 / 零 fork / 黑名单) - #24

Merged
jammyfu merged 1 commit into
mainfrom
fix/anti-star-farming
Nov 14, 2026
Merged

jammyfu merged 1 commit into
mainfrom
fix/anti-star-farming

Conversation

@jammyfu

@jammyfu jammyfu commented Nov 14, 2026

Copy link
Copy Markdown
Owner

问题

2026-11-14 的「最热新仓库(7 天)」被刷:AI 榜 20 个里 19 个、Web 榜 20 个里 19 个都是 <不同账号>/ai--manus。这些仓库描述一字不差,2026-11-13 几分钟内批量建出来,每个约 270 星、0 fork;建仓的账号注册约 30 天、0 粉丝。GitHub 搜索一共能搜到 547 个。

根因:新仓库榜只看「非 fork、≥100 星」再按星/天排序,没有任何规则识别「同一个仓库挂在许多不同账号下」。刷出来的克隆还把每个分类 30 个复查名额全占了,真项目连候选都进不去。

改了什么

文件 改动
tools/antiabuse.py(新) 反刷过滤:克隆簇、黑名单、低 fork、假关注、新号;每次运行共用一个 Guard,查账号有缓存和次数上限
data/anti_abuse.json(新) 所有阈值和黑名单(黑名单先放了 ai--manus)
tools/newcomers.py 复查前先过滤克隆簇、黑名单和极端低 fork,复查后再看关注数和账号;剔除记录写入 anti_abuse
tools/update_stars.py 黑名单对所有榜生效:命中的项目标 blocked;日志打印剔除摘要
tools/risers_core.py rank() 不排 blocked 项目,周、月、年、总星榜都跟着生效
tools/archive.py, tools/i18n.py 加一条五语「刷星迹象 ⚠」说明。原来的破解说明不动,所以历史快照渲染结果完全不变
tests/test_antiabuse.py(新) 22 个测试
docs/ANTI_ABUSE.md(新),以及 CATEGORIES、NEW_ARRIVALS、治理文档 规则说明和记录

过滤规则(默认值)

直接剔除(不进任何 README 或 latest,只记在 stats.json 的 newcomers.categories.<id>.anti_abuse):

  • 克隆簇:同一描述(≥24 个字母)出现在 ≥2 个账号下;或同名同描述出现在 ≥2 个账号下;或同名出现在 ≥3 个账号下。整簇剔除,只有当最早的成员属于可信账号(注册 ≥365 天且 ≥50 粉丝)时才保留它这一个。前面分类里查到的簇,后面的分类也一并剔除。
  • 黑名单:按仓库、账号或名称正则匹配,对所有榜都生效。
  • 极端低 fork:星数 ≥150,且 星数÷(fork+1) ≥500。
  • 假关注:关注数(watchers)≥ 星数的 40%。
  • 新号加低 fork:账号建仓时注册不满 60 天、粉丝少于 5,且 星数÷(fork+1) ≥100。

只标 ⚠ 排到最后,不当榜首(避免误杀):单独低 fork(比值 ≥100)、单独新号、fork 数 ≥ 星数的 90%。

查不到账号或没有 fork 数据时,相关规则一律不触发。原有的破解和盗版规则不变。

验证

python3 tools/verify.py          # 266 tests OK,README/站点检查通过
python3 tools/next_plan.py --check
python3 tools/data_checks.py     # 对实跑生成的 stats.json:passed, 0 warning

历史回放:把 rankings/ 下所有历史新仓库榜里的 408 个仓库用 API 重新读了一遍。

  • 其中 148 个已被 GitHub 删除。
  • 剩下的会剔除 74 个:38 个 ai--manus;26 个约 1100 星或约 300 星、0 到 1 个 fork 的破解或刷星仓;4 个假关注仓。
  • 正常热门项目(yogurt、islandcn、lot-map、HolyArrs、serveros panel 等)一个都没受影响。

实跑:用新逻辑对当前数据重跑了一遍新仓库发现,结果没有提交,只在临时目录里看。

  • AI 榜:剔除 311 个,包括 227 个 ai--manus(黑名单)、73 个新冒出来的 manus--ai 克隆簇、11 个假关注 blender-ai-copilot-* 仓。榜单补位后第 1 到 10 名依次是 yogurt、agentes-chat、gpucanvas、legwork-osint、lot-map……共 19 个。
  • Web 榜:剔除 300 个(同一批克隆),补位后是 islandcn、HGhub、DeskVoice、chiban-oss。
  • 开发者工具榜:剔除 7 个「新号 + 0 fork」的 *-desktop 破解仓(cubase、coreldraw、wondershare 等)。
  • 查账号 51 次,在 150 次上限内。
  • 五种语言的 README 都不再出现 ai--manus 或 manus--ai。

可能误杀或误标

  • 会被剔除的边缘案例:dhruvthakur11/youtube-ai-video-editing-system(387 星、1 fork、当天注册的号、0 粉丝),历史回放里命中「新号 + 低 fork」。
  • 只标 ⚠、不剔除的:Cattmonkey/ChaosIntelligence(428 星 0 fork)、bookleme/bookleme(221 星 1 fork)、AbhiKamane/ai-app-builder-open(384 星 0 fork)、zeemscript/block-roll(fork 数接近星数)、MuseumCassowaryCarve/twitch-drops-miner(新号)。这几个也可能是真项目,所以只是往后排,没有隐藏。
  • 放行办法:调 data/anti_abuse.json 里的阈值即可。

说明

  • 这个 PR 只改代码和文档,不带数据。合并后下一次每日任务(或手动触发 daily-update)就会按新规则重新生成全部榜单和多语言 README。
  • 没有新增任何网络目标,只用 api.github.com 的 /users/{u} 接口,零遥测。

…rk) from new-repo boards

The 2026-11-14 AI and Web new-repo boards were 19/20 copies of <account>/ai--manus from
throwaway accounts. Adds tools/antiabuse.py + data/anti_abuse.json: clone clusters,
blocklist (every board), low-fork, fake watchers, fresh owners; dropped repos are logged in
stats.json under anti_abuse and never rendered. Borderline signals are flagged and ranked last.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T16:13:59.712576Z 62c4b68 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 62c4b68fd1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Comment thread tools/antiabuse.py
Comment on lines +141 to +143
for idx in list(by_name.values()) + list(by_desc.values()):
for j in idx[1:]:
union(idx[0], j)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Apply clone thresholds before unioning matching groups

When an unrelated repository shares a name with just one member of a description-based clone cluster, the unconditional union pulls it into that cluster even though the name match does not meet name_min_owners. For example, original/agent with a unique description, farm/agent with description X, and farm2/other with description X become one cluster, and all three are dropped if no owner passes the credibility check. The original has neither a qualifying shared name nor a shared description. Apply the owner thresholds to each matching group before creating union edges so a below-threshold match cannot remove unrelated projects.

Useful? React with 👍 / 👎.

Comment thread tools/antiabuse.py
Comment on lines +294 to +298
_, name = split_name(m["full_name"])
self.cluster_keys.add("n:" + norm_name(name))
d = norm_desc(m.get("description"))
if len(d) >= int(self.cfg["clone_clusters"]["min_desc_chars"]):
self.cluster_keys.add("d:" + d)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve credible originals across category screening

When a credible original is retained from a clone cluster, its copies still add their shared name and description to cluster_keys. On the next category, _remembered() consequently drops the retained original too, without checking its exemption. This loses a legitimate project entirely when the first category did not display it—for example, when it was excluded there as an already tracked project or fell outside the refresh budget—even though it could qualify for a later category. Preserve retained originals explicitly across calls while continuing to reject their copies.

Useful? React with 👍 / 👎.

@jammyfu
jammyfu merged commit f147955 into main Nov 14, 2026
1 check passed
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.

1 participant