Skip to content

Patterns (L3)

The link ops on posthaste-client-link (the link-ops half of the former RuntimeCore split) keep renderer state delivery behind one link cursor:

let link = runtime.open_link(caller).await?;
let snapshot = runtime
    .open_link_view(caller, link.link_id.clone(), descriptor)
    .await?;
let frames = runtime
    .subscribe_runtime_frames(caller, link.link_id, Some(RuntimeLinkSeq::new(0)))
    .await?;

The runtime generates opaque link ids, stores active link views, and forwards ViewFrame updates as RuntimeFrame::ViewSnapshot or RuntimeFrame::ViewReplace. Adapters serialize RuntimeFrame values and use RuntimeLinkSeq as the SSE id or native resume cursor. Reconnect handling collapses stale history to current snapshots for open views rather than replaying per-view deltas.

RuntimeFrame::ViewDelta is the incremental mail-list variant for links that opt in (replication client-link L1 §4); the whole-view ViewSnapshot/ViewReplace path remains the baseline and the reserved frame for initial load, window extension, and coverage change.

A per-view ViewFrame bridge remains available for transitional callers, but RuntimeFrame is the link-scoped envelope for view snapshots/replacements, view closure, mutation settlement, notifications, and heartbeats.

2. Validation

2.1 Runtime boundary tests

Tests cover that the UI adapter can open a query view, receive initial state, run a mutation, and receive updated view state without provider round trips on the local phase.

2.2 View window tests

Tests cover that mail-list snapshots include stable row keys, opaque continuation cursors, lifecycle affordances, pending row markers, and anchor status for around-anchor window requests.

2.3 Multi-window tests

Tests cover two renderer links observing the same runtime state: a mutation from one link updates the other through the runtime event bus.

3. Assertions

ID Sev. Assertion
link-stream-runtime-frame MUST Renderer link streams carry RuntimeFrame values with RuntimeLinkSeq resume cursors instead of exposing transport-specific SSE frames to runtime code.
mutation-settlement-link-frame MUST Link-scoped runtime mutations emit RuntimeFrame::MutationSettlement frames on the same link stream as view and notification frames.
multi-window-shared-runtime MUST Multiple UI links observe the same authority server state.