Skip to content

fix GMCP error caused by forwarding External.Discord.Get to MUME - #553

Closed
nschimme wants to merge 9 commits into
MUME:masterfrom
nschimme:fix-gmcp-external-discord-get-5724644234687142926
Closed

nschimme wants to merge 9 commits into
MUME:masterfrom
nschimme:fix-gmcp-external-discord-get-5724644234687142926

Conversation

@nschimme

@nschimme nschimme commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Handle External.Discord.Get messages locally to avoid MUME GMCP errors.

Bug Fixes:

  • Prevent unsupported External.Discord.Get messages from being forwarded to MUME and triggering GMCP protocol errors.

Enhancements:

  • Register External.Discord.Get as a recognized GMCP message type.

Tests:

  • Add coverage for deserializing and identifying External.Discord.Get messages.

Summary by Sourcery

Prevent External.Discord.Get messages from reaching MUME and causing GMCP errors.

Bug Fixes:

  • Handle External.Discord.Get messages locally instead of forwarding them to MUME, preventing GMCP protocol errors.

Enhancements:

  • Recognize External.Discord.Get as a supported GMCP message type.

Tests:

  • Add coverage for deserializing and identifying External.Discord.Get messages.

Eat External.Discord.Get in UserTelnet instead of forwarding it to
MUME. MUME does not support External.Discord.Get and responds with
a MUME.Client.Error, which MMapper was displaying as a protocol error.
Eat External.Discord.Get in UserTelnet instead of forwarding it to
MUME. MUME does not support External.Discord.Get and responds with
a MUME.Client.Error, which MMapper was displaying as a protocol error.

@sourcery-ai sourcery-ai 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.

Sorry @nschimme, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 20 hours and 20 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Sep 13, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The proxy now registers and identifies External.Discord.Get messages, then consumes them locally so unsupported requests are not forwarded to MUME and cannot trigger GMCP protocol errors. Tests cover deserialization, message naming, and type recognition.

Sequence diagram for local handling of External.Discord.Get

sequenceDiagram
    participant Client
    participant UserTelnet
    participant MUME

    Client->>UserTelnet: External.Discord.Get
    UserTelnet->>UserTelnet: isExternalDiscordGet()
    UserTelnet-->>Client: Consume message locally
    Note over UserTelnet,MUME: Message is not forwarded to MUME
Loading

File-Level Changes

Change Details Files
Recognize External.Discord.Get as a first-class GMCP message type.
  • Added the message to the centralized type registry and generated enum/count metadata.
  • Added deserialization and type-identification test coverage.
src/proxy/GmcpMessage.h
tests/TestProxy.cpp
Consume External.Discord.Get locally instead of forwarding it to MUME.
  • Added an early-return handler in the user Telnet GMCP receive path to suppress the unsupported message before forwarding.
src/proxy/UserTelnet.cpp

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 27.28%. Comparing base (1e3eafb) to head (f5245d8).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #553      +/-   ##
==========================================
+ Coverage   25.08%   27.28%   +2.19%     
==========================================
  Files         528      559      +31     
  Lines       44211    45915    +1704     
  Branches     4793     4879      +86     
==========================================
+ Hits        11092    12527    +1435     
- Misses      33119    33388     +269     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Eat External.Discord.Get in UserTelnet instead of forwarding it to
MUME. MUME does not support External.Discord.Get and responds with
a MUME.Client.Error, which MMapper was displaying as a protocol error.
sourcery-ai[bot]
sourcery-ai Bot previously approved these changes Sep 14, 2026

@sourcery-ai sourcery-ai 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.

Sourcery assessment

Approved.

Eat External.Discord.Get in UserTelnet instead of forwarding it to
MUME. MUME does not support External.Discord.Get and responds with
a MUME.Client.Error, which MMapper was displaying as a protocol error.
Eat External.Discord.Get in UserTelnet instead of forwarding it to
MUME. MUME does not support External.Discord.Get and responds with
a MUME.Client.Error. In addition, log MUME.Client.Error internally
rather than printing it to the user's game text console.
sourcery-ai[bot]
sourcery-ai Bot previously approved these changes Sep 14, 2026

@sourcery-ai sourcery-ai 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.

Sourcery assessment

Approved.

Register External.Discord.Get as a known GMCP message type so that
it is correctly recognized and relayed directly to MUME over the proxy.
sourcery-ai[bot]
sourcery-ai Bot previously approved these changes Sep 14, 2026

@sourcery-ai sourcery-ai 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.

Sourcery assessment

Approved.

Register External.Discord.Get as a known GMCP message type so that
it is recognized into an enum and passed through directly between
the user client and MUME.
Register External.Discord.Get as a known GMCP message type so that
it is recognized into an enum and passed directly through between
the user client and MUME.
Register External.Discord.Get as a known GMCP message type so that
it is recognized into an enum and passed directly through between
the user client and MUME. Also log out-of-band MUME.Client.Error
messages via qWarning rather than displaying them in the user text stream.
@nschimme nschimme closed this Sep 14, 2026
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