Skip to content

fix(sdk): allow CJK-adjacent @mentions without breaking emails (#3904) - #3917

Open
Chessing234 wants to merge 5 commits into
block:mainfrom
Chessing234:fix/cjk-mention-boundary-3904
Open

fix(sdk): allow CJK-adjacent @mentions without breaking emails (#3904)#3917
Chessing234 wants to merge 5 commits into
block:mainfrom
Chessing234:fix/cjk-mention-boundary-3904

Conversation

@Chessing234

Copy link
Copy Markdown
Contributor

Summary

  • Open @mention extraction when @ is preceded by anything other than an ASCII letter/digit — so 交给@Scout处理 emits a p tag while user@example.com stays inert (Proposal: define CLI/SDK @mention behavior next to CJK text #3904).
  • Align extract_at_mentions_with_known with the same char-aware boundary (it previously inspected a single UTF-8 byte) and treat trailing CJK as a word boundary.
  • Document the rule in docs/mention-boundaries.md, AGENTS gotchas, CONTRIBUTING, and the CLI README.

Test plan

  • cargo test -p buzz-sdk extract_at_names
  • cargo test -p buzz-sdk extract_at_mentions_with_known_allows_cjk_adjacent
  • cargo test -p buzz-sdk email_address_not_matched
  • buzz messages send --content "交给@Scout处理" against a channel where Scout is a member → Scout receives a mention / agent wakes

Closes #3904

Made with Cursor

@Chessing234
Chessing234 requested a review from a team as a code owner July 31, 2026 12:19
@Chessing234

Copy link
Copy Markdown
Contributor Author

Friendly review ping for @block/buzz-oss-team — CI/DCO are green on the latest push and this is ready for a maintainer pass when you have bandwidth. Happy to rebase or split if that helps review.

CJK and other scripts often omit spaces around agent names. Treat any
non-alphanumeric ASCII predecessor as a mention boundary while still
rejecting email-like `user@host` (block#3904).

Signed-off-by: Taksh <takshkothari09@gmail.com>

Signed-off-by: Taksh <takshkothari09@gmail.com>
Give operators and agent authors a short table for block#3904 without reading
the Rust module docs.

Signed-off-by: Taksh <takshkothari09@gmail.com>

Signed-off-by: Taksh <takshkothari09@gmail.com>
Point agent authors at the boundary rule so handoffs without spaces still
wake harnesses (block#3904).

Signed-off-by: Taksh <takshkothari09@gmail.com>

Signed-off-by: Taksh <takshkothari09@gmail.com>
Keep the CJK vs email rule discoverable from the contributor guide (block#3904).

Signed-off-by: Taksh <takshkothari09@gmail.com>

Signed-off-by: Taksh <takshkothari09@gmail.com>
Demonstrate that messages send emits p-tags for spaced-less handoffs.

Signed-off-by: Taksh <takshkothari09@gmail.com>

Signed-off-by: Taksh <takshkothari09@gmail.com>
@Chessing234
Chessing234 force-pushed the fix/cjk-mention-boundary-3904 branch from 2edbe97 to 86a52d0 Compare August 2, 2026 03:58
@Chessing234

Copy link
Copy Markdown
Contributor Author

Rebased onto latest upstream/main with Signed-off-by on all commits and force-pushed. CI should re-run shortly — still ready for @block/buzz-oss-team review when you have bandwidth.

@Chessing234

Copy link
Copy Markdown
Contributor Author

@tlongwell-block @wesbillman @wpfleger96 mind taking a look when you get a chance?

@Chessing234
Chessing234 force-pushed the fix/cjk-mention-boundary-3904 branch from 86a52d0 to 3344196 Compare August 5, 2026 10:34
@Chessing234

Copy link
Copy Markdown
Contributor Author

@wesbillman sdk @mention fix for cjk-adjacent tokens without breaking emails. tip is rebased + dco. review/merge when you can?

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.

Proposal: define CLI/SDK @mention behavior next to CJK text

1 participant