Skip to content

RG-T125 Chatbot fix#425

Merged
ucswift merged 1 commit into
masterfrom
develop
Jul 16, 2026
Merged

RG-T125 Chatbot fix#425
ucswift merged 1 commit into
masterfrom
develop

Conversation

@ucswift

@ucswift ucswift commented Jul 16, 2026

Copy link
Copy Markdown
Member

PR Description: RG-T125 Chatbot fix

This pull request fixes an issue with the chatbot messaging functionality by addressing a protobuf serialization defect and adding fail-fast validation for queue message types.

Changes

  1. Added missing [ProtoContract] attribute to ChatbotMessageQueueItem

    • The class was already decorated with [ProtoMember] attributes but was missing the required [ProtoContract] attribute at the class level. Without it, protobuf-net cannot properly serialize instances of this type, causing failures when chatbot messages are published to the RabbitMQ queue.
  2. Extended the Protobuf serializer warmup to cover all queue payload types

    • SerializerHelper.WarmUpProtobufSerializer() now prepares serializers for every payload type published to RabbitMQ (e.g., CallQueueItem, MessageQueueItem, ShiftQueueItem, CqrsEvent, AuditEvent, etc.).
    • This builds the protobuf contracts at application startup, ensuring that any type missing the [ProtoContract] attribute fails immediately on boot rather than surfacing as a runtime error the first time a message of that type is enqueued.

Functional Impact

Chatbot messages will now serialize correctly for queue transport, and the application will detect missing protobuf contract attributes early during startup, preventing similar serialization failures across other message types.

@Resgrid-Bot

Resgrid-Bot commented Jul 16, 2026

Copy link
Copy Markdown

Kody Review Complete

Great news! 🎉
No issues were found that match your current review configurations.

Keep up the excellent work! 🚀

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug
Performance
Security
Business Logic

Access your configuration settings here.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The protobuf warm-up routine now prepares multiple RabbitMQ queue and event payload serializers at startup. ChatbotMessageQueueItem is marked with ProtoContract so it can participate in protobuf serialization.

Changes

Protobuf serializer warm-up

Layer / File(s) Summary
Contract and startup registration
Core/Resgrid.Model/Queue/ChatbotMessageQueueItem.cs, Core/Resgrid.Model/Helpers/SerializerHelper.cs
ChatbotMessageQueueItem gains the ProtoContract attribute, and WarmUpProtobufSerializer() prepares additional queue and event payload serializers during startup.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • Resgrid/Core#372: Both changes extend WarmUpProtobufSerializer() with additional protobuf serializer preparations.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is related to the chatbot changes, but it is too vague to describe the actual serializer/protobuf fix. Rename it to mention the protobuf serialization change, such as adding ProtoContract support for ChatbotMessageQueueItem.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ucswift ucswift merged commit efd0bca into master Jul 16, 2026
19 checks passed
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.

2 participants