Skip to content

Runtime: wait for notify events to send#1390

Merged
josephjclark merged 2 commits intorelease/nextfrom
fix-errant-step-start
Apr 24, 2026
Merged

Runtime: wait for notify events to send#1390
josephjclark merged 2 commits intorelease/nextfrom
fix-errant-step-start

Conversation

@josephjclark
Copy link
Copy Markdown
Collaborator

Short Description

This PR ensures that when the runtime publishes an event, like run:start, it awaits the publication before carrying on.

This might address #1072 but I'm not sure, I don't have a local repro

I can't really line it up in my head. If run:start is published and processed async, then the runtime might complete a step quickly and publish run:complete before the run:start processed. But the start event still went on the stack before the publish event. I suppose it might yield and let the complete event through first.

But in the case I'm looking at, the start event has tiny payload, the step takes a few SECONDS to actually run, and then the complete payload was very large and got redacted. So I can;'t believe that step complete just won the race. Also it looks from the logs like the start event doesn't get published AT ALL.

So this might help some cases. Certainly feels like the right thing to do. Not sure it'll close the issue.

AI Usage

Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):

  • I have used Claude Code
  • I have used another model
  • I have not used AI

You can read more details in our
Responsible AI Policy

We added an async await to ensurePayloadSize a little while ago, but the runtime doens't actually wait for this. It's plausble that while waiting for a payload to be calculated, a step could finish and trigger the complete event early
@github-project-automation github-project-automation Bot moved this to New Issues in Core Apr 24, 2026
@josephjclark josephjclark changed the base branch from main to release/next April 24, 2026 11:00
@josephjclark josephjclark merged commit a75d37b into release/next Apr 24, 2026
8 checks passed
@josephjclark josephjclark deleted the fix-errant-step-start branch April 24, 2026 11:01
@github-project-automation github-project-automation Bot moved this from New Issues to Done in Core Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants