Skip to content

fix(buzz): require explicit display-name mentions - #74467

Closed
davidrobertson wants to merge 1 commit into
NousResearch:mainfrom
davidrobertson:fix/buzz-strict-mentions
Closed

davidrobertson wants to merge 1 commit into
NousResearch:mainfrom
davidrobertson:fix/buzz-strict-mentions

Conversation

@davidrobertson

Copy link
Copy Markdown
Contributor

Summary

  • require an explicit @ before the Buzz agent display name
  • prevent ordinary references to an agent's name from waking it
  • add a regression test for a message addressed to one agent that merely references another

Root cause

The display-name matcher used @?, making the @ optional even when require_mention was enabled. A message such as @Hermes did you see Chip's request? therefore dispatched to both Hermes and Chip.

Verification

python -m pytest tests/gateway/test_buzz_adapter.py -q
24 passed

@alt-glitch alt-glitch added type/bug Something isn't working comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have labels Jul 30, 2026
@teknium1

Copy link
Copy Markdown
Collaborator

Thanks — this is a narrow fix for a confirmed current-main message-routing bug.

  • Current main makes the display-name @ optional in plugins/platforms/buzz/adapter.py:1123, while the shared-channel gate calls _is_mentioned() at plugins/platforms/buzz/adapter.py:1012.
  • The PR changes that one matcher and adds an end-to-end polling/dispatch regression in tests/gateway/test_buzz_adapter.py:247.
  • The timeline cross-reference to fix(buzz): resolve outbound @mentions to member pubkeys #74830 is complementary: it concerns outbound Buzz mentions, while this PR changes the inbound mention gate.
  • The PR base is an ancestor of current main and the target matcher is unchanged, so salvage should be mechanical.

No substantive changes requested. This is an automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 30, 2026

@GottZ GottZ left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This was generated by AI during triage.

Summary

Two PRs address the same root cause: the optional @ in the Buzz display-name matcher allows ordinary name references to trigger dispatch. #74467 fixes that matcher and adds one routing regression test, while #75593 includes the same matcher fix plus mention-stripping boundaries and broader preservation/lookalike coverage.

Related pull requests

  • #74467 related — (+8/-1) — keep open with a salvage path: the diff directly changes @?DisplayName to @DisplayName and tests the reported cross-agent false dispatch. Consistent with its automated keep-open review, it is the narrower base onto which the distinct stripping and lookalike coverage from #75593 can be consolidated.
  • #75593 duplicate — (+88/-13) — overlapping superset with salvageable additions: it duplicates #74467's matcher correction but additionally prevents _strip_mention() from removing bare names or display-name prefixes and tests npub/hex preservation, DMs, disabled mention gating, and lookalikes. Despite the automated keep-open review on #75593, its matcher change is duplicative; its distinct stripping changes and tests should be transferred to #74467 before closure.

Duplicates

#74467 and #75593 make the same display-name matcher correction and overlap on the dispatch regression; #75593 is not a complete duplicate until its _strip_mention() fix and additional boundary/preservation tests are consolidated into #74467.

Suggested consolidation

Keep #74467 open with a salvage path: extend it with #75593's _strip_mention() boundary fix and the nonredundant lookalike, DM, require_mention: false, and npub/hex tests. After those distinct parts are preserved, close #75593 as a duplicate of #74467; this follows the contributor's consolidation request while explicitly accounting for #75593's automated keep-open review through the diff-backed salvage step.

Complex graph

flowchart LR
    classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
    classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
    classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
    classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
    classDef best stroke-width:3px,stroke:#b45309
    classDef target stroke-width:3px,stroke:#4338ca
    subgraph Dup74467 ["PRs duplicating each other"]
        P74467["PR #74467 (open)"]
        P75593["PR #75593 (open)"]
    end
    class P74467 open
    class P75593 open
    class P74467 target
    click P74467 "https://github.com/NousResearch/hermes-agent/pull/74467"
    click P75593 "https://github.com/NousResearch/hermes-agent/pull/75593"
Loading

Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label).

Cross-PR triage: Reviewed 2 pull requests and 0 issues in this complex. Each diff was read against this issue; Assessment working set: 9 kB of PR diffs, 6 kB of issue/PR text, <1 kB of discussion (1 comments), 0 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.

@riyaazd29

Copy link
Copy Markdown

I extracted the non-overlapping mention-stripping/lookalike work from #75593 directly onto this PR’s head and opened a tiny fork-to-fork salvage PR:

https://github.com/davidrobertson/hermes-agent/pull/1

It leaves your explicit-@ matcher unchanged and adds only the boundary fix plus DM, disabled-gating, lookalike, regex-character and npub/hex preservation tests. Verification: RED 3 expected failures on this head; GREEN 8 focused tests; full Buzz adapter file 39 passed; Ruff and diff check clean. Once merged, #75593 can stay closed without losing its unique work.

@davidrobertson davidrobertson closed this by deleting the head repository Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants