Skip to content

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

Closed
brendanobra wants to merge 15 commits into
mainfrom
auto-sync/develop-to-main-29949278276
Closed

chore: auto-sync develop → main (direct push failure)#112
brendanobra wants to merge 15 commits into
mainfrom
auto-sync/develop-to-main-29949278276

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

This PR is an automated developmain sync PR created after a direct workflow push failure, bringing in the latest changes including a subscription-notification race fix and related regression tests, plus workflow token updates and Copilot instruction restructuring.

Changes:

  • Add weak_ptr-based guarding for subscription callback dispatch to prevent use-after-free during unsubscribe races.
  • Add regression tests for the race condition and for notification-worker exception containment.
  • Update GitHub Actions workflows to use secrets.AUTOMATION_TOKEN, and replace .github/copilot-instructions.md with a repo-scoped instructions file.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/helpers_impl.h Store subscriptions as shared_ptr<SubscriptionData> and wrap event callbacks with a weak_ptr guard to safely drop in-flight notifications after unsubscribe.
include/firebolt/helpers.h Adjust onPropertyChangedCallback to handle std::bad_any_cast and improve log message formatting.
src/gateway.cpp Prevent notification worker thread termination by catching exceptions per-callback during dispatch.
test/unit/helperTest.cpp Add regression tests validating notification delivery while subscribed and safe dropping after unsubscribe/unsubscribeAll.
test/unit/gatewayTest.cpp Add regression test ensuring notification worker continues dispatch after a callback throws.
.github/workflows/sync-develop-to-main.yml Switch workflow authentication to secrets.AUTOMATION_TOKEN for sync/push/PR creation steps.
.github/workflows/release.yml Switch release workflow authentication to secrets.AUTOMATION_TOKEN.
.github/instructions/coding-guidelines.instructions.md Add consolidated coding guidelines for the repository.
.github/copilot-instructions.md Remove legacy Copilot instructions file (superseded by the new instructions document).

Comment thread src/helpers_impl.h
Comment on lines +82 to 85
void* notificationPtr = static_cast<void*>(it->second.get());
auto errorStatus{gateway_.unsubscribe(it->second->eventName, notificationPtr)};
subscriptions_.erase(it);
return Result<void>{errorStatus};
Comment on lines 62 to 66
catch (const std::exception& e)
{
FIREBOLT_LOG_ERROR("Event", "Cannot parse event data for event %s, payload: %s",
FIREBOLT_LOG_ERROR("Event", "Cannot parse event data for event '%s', payload: %s",
subscriptionData->eventName.c_str(), jsonResponse.dump().c_str());
}
@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-29949278276 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