Skip to content

fix(gateway): preserve underscores in plain-text identifiers#26582

Closed
that-ambuj wants to merge 1 commit into
NousResearch:mainfrom
that-ambuj:fix/plain-text-underscore-identifiers
Closed

fix(gateway): preserve underscores in plain-text identifiers#26582
that-ambuj wants to merge 1 commit into
NousResearch:mainfrom
that-ambuj:fix/plain-text-underscore-identifiers

Conversation

@that-ambuj

@that-ambuj that-ambuj commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Preserve underscores inside identifiers when stripping Markdown for plain-text gateway senders
  • Keep underscore emphasis handling for standalone _italic_ and __bold__ spans
  • Add a BlueBubbles regression test with generic route/env-var/filename examples

Affected senders

The changed helper is used by these plain-text paths:

  • BlueBubbles/iMessage (gateway/platforms/bluebubbles.py)
  • SMS (gateway/platforms/sms.py)
  • Feishu text fallbacks (gateway/platforms/feishu.py)
  • QQBot plain-text / non-Markdown mode (gateway/platforms/qqbot/adapter.py)

Before this fix, those senders could remove underscores from slash-command routes, environment variable names, and filenames while stripping Markdown.

Test plan

  • python -m pytest tests/gateway/test_bluebubbles.py tests/gateway/test_sms.py -q -o 'addopts='

@that-ambuj that-ambuj force-pushed the fix/plain-text-underscore-identifiers branch 2 times, most recently from 8d2955b to 5a4e009 Compare May 15, 2026 21:04
@that-ambuj that-ambuj force-pushed the fix/plain-text-underscore-identifiers branch from 5a4e009 to ec83fbf Compare May 15, 2026 21:06
@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists labels May 15, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related: #11775, #15451, and #15076 all address the same underscore-stripping bug in gateway helpers. #13652 (merged) fixed the CLI side. This PR appears to be a fresh take with BlueBubbles regression test coverage.

teknium1 added a commit that referenced this pull request May 17, 2026
…tors

Adds release-note attribution mappings for 9 contributors from group 4:
- @EloquentBrush0x (PR #26657)
- @subtract0 (PR #25658)
- @zwolniony (PR #26961)
- @that-ambuj (PR #26582)
- @zccyman (PR #25294)
- @lidge-jun (PR #26814)
- @phoenixshen (PR #26768)
- @AhmetArif0 (PR #26635)
- (francip already mapped from prior PR #26134 attribution)

#27147 dropped from this batch — already landed on main as 4b17c24.
@teknium1

Copy link
Copy Markdown
Contributor

Merged via PR #27308 — your commit was cherry-picked onto current main as part of a batch salvage of low-risk new-contributor PRs. Authorship preserved (fix(gateway): preserve underscores in plain-text identifiers). Thanks for the contribution.

@teknium1 teknium1 closed this May 17, 2026
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…tors

Adds release-note attribution mappings for 9 contributors from group 4:
- @EloquentBrush0x (PR NousResearch#26657)
- @subtract0 (PR NousResearch#25658)
- @zwolniony (PR NousResearch#26961)
- @that-ambuj (PR NousResearch#26582)
- @zccyman (PR NousResearch#25294)
- @lidge-jun (PR NousResearch#26814)
- @phoenixshen (PR NousResearch#26768)
- @AhmetArif0 (PR NousResearch#26635)
- (francip already mapped from prior PR NousResearch#26134 attribution)

NousResearch#27147 dropped from this batch — already landed on main as 4b17c24.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants