Skip to content

Dedup: identifier tokens from scope names leak into the content-token floor (P2, post-merge follow-up on #417) #421

Closed

Description

@abogartz

Summary

Reported by @WhollyMindless in a post-merge comment on #417. The #417 identifier tokenizer lets scope/type metadata bypass dedup's non-Latin content floor: two unrelated rows with non-Latin content in the same snake_case scope are treated as near-copies and one is hidden from recall when dedup is enabled. Rows are not deleted; a distinct recall result disappears.

Reproduction (from the report, v0.26.1 / integrated main)

Append two settled learning rows in scope auth_token_refresh_policy with unrelated contents:

  • 登录令牌在刷新后必须轮换并且旧令牌立即失效
  • 数据库连接池的最大连接数应该根据并发量调整

Recall with query: "auth_token_refresh_policy", default limit:

Mechanism

contentTokens() (src/recall/dedupe.ts) tokenizes haystack(m) (content + keywords + scope + type) and removes only the WHOLE scope/type token strings. The #417 tokenizer splits auth_token_refresh_policy into auth/token/refresh/policy, which survive the deletion. Non-Latin content contributes no Latin tokens, so both rows' content-token sets become exactly the scope tokens: Jaccard 1, and both clear MIN_CONTENT=4 because the scope supplies four tokens. Before #417 their content-token sets were empty and the floor preserved both rows.

Fix direction (as suggested in the report)

Construct the dedup vocabulary directly from the intended fields (content + keywords) instead of haystack-minus-whole-tokens, and add the composed-handler regression case above.

Provenance

Post-merge follow-up comment on #417 (2026-11-17). Authorship disclosure in the original: reproduced follow-up on the maintainer-authored integration, not an independent approval.

Activity

  1. added a commit that references this issue on Nov 17, 2026
  2. abogartz-opencode-self-improvement commented on Nov 17, 2026

    @abogartz-opencode-self-improvement

    🎉 This issue has been resolved in version 0.28.1 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions