Read After Write Across Hubs

The rule: once a node write's terminal has been delivered, a read of that node issued from ANY hub afterwards sees the write. Order the read after the write by composing it onto the write's terminal (Update(...).Take(1).SelectMany(_ => hub.GetMeshNodeOutcome(path))). Nothing orders a read against a write you only posted: a read and a patch from different hubs travel different routes and the mesh promises no arrival order between senders.

Why it was false (Plugins#5816, cross-hub read-after-write triage item)

The owner of a node keeps two reduced streams of it, each its own sync/{id} hub with its own turn queue:

Stream Used by
workspace.GetStream(reference) — the plain reduce the cross-hub patch handler (ApplyMeshNodePatchInTurn), which waits on it for the commit echo
workspace.GetNullableStream(reference) — the shared read view every GetDataRequest, i.e. GetMeshNode / GetMeshNodeOutcome (HandleGetDataRequest)

They are separate since #3432 (a read used to mint a permanent hub per call). The owner posted its PatchDataResponse when the first stream echoed the write, so the ack could leave while the second still held the node as it stood before the write. A read issued after the writer's terminal (from portal/reads-{meshId}, or any hub) then answered the pre-write node. Measured with a held read view: write terminal delivered, read after it answered "before".

UpdateUnifiedReferenceRequest already fenced on the shared read view (WaitForSharedReadVersion); the cross-hub patch did not.

The fix

ApplyMeshNodePatchInTurn now composes ReadViewHoldsTheWrite into the ack: the PatchDataResponse leaves when both the durable flush and the shared read view hold the stamped write (same entity id, Version at or past the minted stamp). The write's terminal therefore implies readability. The leg is total: a missing stream, a stream that ends, or DataExtensions.ReadViewBound (5 s) elapsing all let the ack leave, logged as READ_VIEW_OUTLIVED_BOUND — the commit is the verdict (#3112), this only decides when the ack leaves.

Pinned by AWriteTerminalMeansTheNodeIsReadableFromAnyHubTest: with the read view's turn held, the terminal must not be delivered (red before the fix); a negative control with nothing held shows terminal and read agree.

Can the 5 s wait stack under load?

What this does NOT cover

Inventory (2026-11-23): writes followed by a read of the same node through another hub

Found by scanning core src/ and Plugins for a GetMeshNode/GetMeshNodeOutcome within 40 lines after an Update/CreateNode; each was read for whether the read is composed onto the write's terminal.

A caller that still polls for its own write (Plugins InvitationDispatcher.ReadOwner, #5816) can drop the poll once its resolved platform contains this change.