Repost exposes two data planes with different consistency guarantees. An agent that knows which plane answers which question avoids both wasted round-trips and false negatives: concluding an event "didn't arrive" when it simply wasn't indexed yet.
Live stream versus indexed store#
expect and tail read a real-time observe stream. events search, forwards search, and events get read an indexed store that trails arrival by a short interval.
Observe stream (expect, tail) | Indexed store (events / forwards search) | |
|---|---|---|
| Latency | Real-time | Trails arrival by an indexing delay |
| Time range | Only events after you connect, no backfill | The full searchable history |
| Best for | Confirming something happens now | Investigating what already happened |
| Consistency | Push, at-most-once while connected | Eventually consistent |
There is a blind spot between the planes: an event that just arrived is too recent to appear in search, and a stream you open after it arrived will never replay it. To observe the result of an action, open expect/tail before you trigger the action, not after.
Pick the plane by question#
flowchart TD
Q{What are you asking?}
Q -->|Will this happen / did it just happen?| L[expect / tail<br/>open before triggering]
Q -->|What happened earlier?| S[events / forwards search<br/>bounded query]
Q -->|Exact detail of one known ID?| G[events get / forwards chain]Stale reads cause conflicts#
The indexed store is eventually consistent, so a value you read can move before you act on it. When you cache a resource's state and then mutate it, a concurrent change makes the write fail with conflict (exit 1). Your view was stale, not your command wrong. Re-read, recompute, and retry idempotently: Safe mutations → Recover from conflict.
Consistency rules
- Confirm now →
expect/tail, opened before triggering the action (the stream has no backfill). - Investigate past →
events/forwards search(indexed; trails arrival; absence of a just-sent event is not proof it failed). - Exact record →
events get/forwards chainby ID. conflict(exit 1) means a stale read → re-read state, recompute, retry with--idempotency-key.