Support for Fire Arrow message channel queue && Upgrade dependencies#11
Open
Support for Fire Arrow message channel queue && Upgrade dependencies#11
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Double base64 encoding for poison queue messages
- sanitizeMessage now reuses the already-base64 payload for base64 mode and only encodes raw JSON in none mode, preventing poison queue double encoding.
Or push these changes by commenting:
@cursor push 375c698c5d
Preview (375c698c5d)
diff --git a/lib/src/fhir_message_client/azure_message_client.dart b/lib/src/fhir_message_client/azure_message_client.dart
--- a/lib/src/fhir_message_client/azure_message_client.dart
+++ b/lib/src/fhir_message_client/azure_message_client.dart
@@ -38,7 +38,9 @@
final message = _serializeToFhirMessage(fhirPoisonedMessage);
// Azure Put Message wraps the body in XML; raw JSON can contain <, >, &
// and invalidate the document. Base64 so the payload is XML-safe.
- final xmlSafeBody = base64.encode(utf8.encode(message));
+ final xmlSafeBody = _messageEncoding == QueueMessageEncoding.base64
+ ? message
+ : base64.encode(utf8.encode(message));
await _storage.putQMessage(
qName: _poisonQueueName,
message: xmlSafeBody,This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Note
Medium Risk
Core message parsing/serialization and event modeling were refactored, so regressions could break queue processing across both formats despite added tests and documentation.
Overview
Adds support for consuming plain JSON HAPI/Fire Arrow MESSAGE-channel subscription notifications alongside existing AHDS/Event Grid CloudEvents by introducing pluggable parsing (
AbstractFhirMessageParser) and queue-body encoding selection (QueueMessageEncoding).Refactors the event model into a common
FhirEventbase with format-specificAhdsFhirEvent/HapiFhirEvent, normalizes event types via converters, and optionally parses full-resource payloads intofhir_r4ResourceviapayloadResource. UpdatesAzureMessageClient/Messenger.setupWithAzureto acceptmessageEncoding+parser, adjusts executor filtering to usefhirEvent.resourceType, and refreshes docs/tests; dependencies are upgraded (Freezed v3, http, addsfhir_r4).Written by Cursor Bugbot for commit 0299b24. This will update automatically on new commits. Configure here.