Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: fix nil pointer dereference in ReportTask#19045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ThomasK33 merged 1 commit intomainfromtk/fix-mcp-task-nil-panic
Jul 28, 2025

Conversation

ThomasK33
Copy link
Member

This pull request addresses a bug related to a nil pointer dereference in the task reporting functionality.

Bug Fixes and Error Handling:

  • UpdatedRegisterTools inmcp.go to skip registering theReportTask tool in the remote MCP context when a task reporter is not configured, preventing potential nil pointer dereference panics.
  • Added a check intoolsdk.go to ensure task reporting dependencies are available before invoking the reporter, returning an appropriate error if not.

Test Coverage:

  • AddedTestReportTaskNilPointerDeref intoolsdk_test.go to verify that the system does not panic when task reporting dependencies are missing and instead returns a clear error message.
  • AddedTestReportTaskWithReporter intoolsdk_test.go to validate correct behavior when a task reporter is configured, ensuring the handler processes the request as expected.

@ThomasK33ThomasK33 changed the titlefix: nil pointer dereference in ReportTaskfix: fix nil pointer dereference in ReportTaskJul 27, 2025
@ThomasK33ThomasK33 requested a review fromjohnstcnJuly 28, 2025 09:06
Change-Id: I9a9886e004fb377950be523a79a1a51a3c954d5bSigned-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33ThomasK33force-pushed thetk/fix-mcp-task-nil-panic branch from10fb76f to6d31272CompareJuly 28, 2025 09:11
@ThomasK33ThomasK33 merged commitd159578 intomainJul 28, 2025
26 checks passed
@ThomasK33ThomasK33 deleted the tk/fix-mcp-task-nil-panic branchJuly 28, 2025 09:23
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJul 28, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

Assignees

@ThomasK33ThomasK33

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@ThomasK33@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp