mirror of
https://github.com/microsoft/semantic-kernel.git
synced 2026-10-12 11:19:56 +00:00
### Motivation and Context Resolves #10642 -- failure of `KernelProcessEventVisibility.Public` events to propagate. ### Description First, `KernelProcessEvent` was configured to use enum values -- though throughout the code, `KernelProcessEvent.visibility` is compared as an enum. Second, when handling events emitted by a KernelProcessStep, any `Public` visibility events are/were passed through `LocalStep.scoped_event` (which modifies the event's namespace) *before* queueing up any matching edges on the source step. This change to the event namespace effectively prevents the event from propagating (since I don't know how we'd 'listen' for events on the local process handle from within the function that builds that very process...) Allowing `visibility` on `KernelProcessEvent` to be an enum, combined with an exchange in the order of processing event messages (matching event to edge _before_ re-emitting any events marked as 'Public') causes public events to propagate as expected. ### Contribution Checklist - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄