Skip to content

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

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

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

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 21:08

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 syncs develop into main after an automated direct-push sync failed, bringing in a transport-layer safety fix for event notification dispatch plus associated regression tests and CI workflow token updates.

Changes:

  • Harden subscription notification dispatch against use-after-free by guarding HelperImpl subscription callbacks with a weak_ptr.
  • Prevent the notification worker thread from terminating when callbacks throw by catching exceptions during dispatch, and add regression tests for both behaviors.
  • Update GitHub Actions workflows to use secrets.AUTOMATION_TOKEN, and replace the prior Copilot instruction file with a consolidated coding-guidelines instruction document.

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 Stores subscriptions as shared_ptr and wraps callbacks with a weak_ptr guard to drop in-flight notifications after unsubscribe.
include/firebolt/helpers.h Improves robustness of onPropertyChangedCallback by moving any_cast into the try block and adding a bad_any_cast handler.
src/gateway.cpp Adds exception handling around notification callback dispatch to keep the worker thread alive.
test/unit/helperTest.cpp Adds regression tests validating the weak_ptr guard behavior across unsubscribe paths.
test/unit/gatewayTest.cpp Adds regression test ensuring notification worker continues after a callback throws, plus required header include.
.github/workflows/sync-develop-to-main.yml Switches workflow auth to secrets.AUTOMATION_TOKEN for checkout/PR creation.
.github/workflows/release.yml Switches semantic-release auth to secrets.AUTOMATION_TOKEN.
.github/instructions/coding-guidelines.instructions.md Adds consolidated repository coding guidelines for tooling/agents.
.github/copilot-instructions.md Removes the older Copilot instructions document (superseded by the new guidelines).

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 43 to 47
try
{
auto notifier = std::any_cast<std::function<void(Args...)>>(subscriptionData->notification);
JsonType jsonType;
jsonType.fromJson(jsonResponse);
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 22, 2026
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.

3 participants