Skip to content

chore: auto-sync develop → main (direct push failure) - #111

Closed
brendanobra wants to merge 14 commits into
mainfrom
auto-sync/develop-to-main-29949249645
Closed

chore: auto-sync develop → main (direct push failure)#111
brendanobra wants to merge 14 commits into
mainfrom
auto-sync/develop-to-main-29949249645

Conversation

@brendanobra

Copy link
Copy Markdown
Contributor

Automatic sync of developmain could not complete via direct workflow push.

Action required: resolve the conflicts in this PR, then merge it.

Detected reason: direct push failure

Triggered by: daa7cb7 on develop

Copilot AI review requested due to automatic review settings July 22, 2026 19:02

Copilot AI 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.

Pull request overview

Sync-related conflict resolution PR that also brings in the develop → main changeset, including a fix for a subscription-notification race (MONUI-908) by guarding SubscriptionData lifetime and hardening notification dispatch against exceptions.

Changes:

  • Fix potential use-after-free during async event delivery by storing SubscriptionData in shared_ptr and wrapping subscription callbacks with a weak_ptr guard (HelperImpl::subscribe).
  • Prevent notification worker thread termination by catching exceptions (including std::bad_any_cast) per-callback in the gateway notification worker.
  • Add regression tests covering the race scenario and callback-exception behavior; update GitHub workflows to use AUTOMATION_TOKEN and move/replace Copilot guidance with a dedicated coding-guidelines instructions file.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/helpers_impl.h Switch subscriptions storage to shared_ptr and wrap callbacks with weak_ptr to drop in-flight notifications safely after unsubscribe.
include/firebolt/helpers.h Improve robustness of onPropertyChangedCallback by handling std::bad_any_cast explicitly and tightening log message formatting.
src/gateway.cpp Wrap notification callback dispatch in try/catch to avoid std::terminate on callback exceptions.
test/unit/helperTest.cpp Add regression tests for weak_ptr-guarded subscription callbacks covering unsubscribe races.
test/unit/gatewayTest.cpp Add regression test ensuring notification worker continues after a callback throws.
.github/workflows/sync-develop-to-main.yml Replace token secret usage with AUTOMATION_TOKEN for checkout/PR creation.
.github/workflows/release.yml Replace token secret usage with AUTOMATION_TOKEN for checkout/semantic-release.
.github/instructions/coding-guidelines.instructions.md Add comprehensive coding guidelines instruction file (applied to C++/CMake).
.github/copilot-instructions.md Remove prior Copilot instructions file (superseded by new instructions).

Comment thread src/helpers_impl.h
Comment on lines +82 to 84
void* notificationPtr = static_cast<void*>(it->second.get());
auto errorStatus{gateway_.unsubscribe(it->second->eventName, notificationPtr)};
subscriptions_.erase(it);
@dhillomk dhillomk closed this Jul 22, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 22, 2026
@dhillomk
dhillomk deleted the auto-sync/develop-to-main-29949249645 branch July 22, 2026 20:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants