Avoiding a race condition on initial subscription in turbo-rails

I would look at establishing the web socket stream before the form submission. You could use the current user or session ID, or use a uniq identifier for each form

<% blog_guid = SecureRandom.uuid %>

<%= form_with(model: @post, local: true) do |form| %>
  ...
  <%= form.hidden_field :blog_guid, value: blog_guid %>
<% end %>

<%= turbo_stream_from blog_guid %>