Fieldnotes / engineering
← Replication and consistency

Watch & compare

Replication and consistency

Different ways to see the same idea. Play one cut at a time, then return to the guide to try it yourself.

Why we recommend Verify the write

Start with Verify the write: it keeps the acknowledged revision, stale observation and unchanged write count visible together, making the decision not to repeat a successful mutation explicit. The original is the simplest picture of asynchronous copying and stale reads. Read your write adds a useful next step: a wrapper holds a dependent action and releases it after verification, at the cost of a busier five-node diagram.

Original · 26 sec

Original explanation

Replication copies data across nodes, while consistency rules determine what reads can observe.

Read the video sequence
  1. 0–8s: A replica initially returns v1. The primary commits v2 and acknowledges it while the replica still holds v1.
  2. 9.5–14.5s: A replica read returns stale v1; reading the primary instead returns v2.
  3. 17.5–22.5s: Replication applies v2 to the replica, and a later replica read returns the new value.
About this cut

Production: Original prototype; model not recorded.

Recommended · Astra · 30 sec

Verify the write

A stale verification read is not proof that a write failed: check the committed revision through a fresh authoritative read before taking another action.

Read the video sequence
  1. 0–5.4s An agent tool reads a caught-up replica. Version 7 returns and matches the current state; no write has been made.
  2. 5.4–10.4s One write commits version 8 on the primary. The acknowledgement makes the agent expect version 8, while the replica still holds version 7.
  3. 10.4–16.2s Verification reads the replica and receives version 7. The tool shows the mismatch and holds further action; it does not repeat the write. Attention shifts to the primary.
  4. 16.2–21s A fresh primary read returns version 8, matching the acknowledged revision. Verification succeeds even though the replica is still behind. This example assumes one writer and no intervening cache.
  5. 21–30s Replication later applies version 8 on the replica. The write count remains one. The scene fades to its matching dark endpoint; the illustrated delay is not a latency guarantee.
About this cut

Production: gpt-6-astra.

Illustrative single-writer sequence; timings are not measured replica lag.

Primary verification assumes a fresh post-commit query, no intervening cache, and an available primary.

Application revisions and HOLD policy are proposed tool design, not automatic model or database guarantees.

Does not demonstrate failover, concurrent writers, synchronous replication modes, external deployment completion, or permission enforcement.

Audio was analyzed numerically and visually, not physically listened to.

Self-reviewed; independent comparative ranking and editorial promotion remain separate.

Alternative · Sol · 32 sec

Read your write

Before an agent tool step uses a just-saved plan, check the returned revision and route a stale dependent read to the current primary.

Read the video sequence
  1. 0–6.5s The agent needs plan version 1. A read from the replica returns version 1, the wrapper check passes, and the tool step uses that plan.
  2. 6.5–10.8s The agent saves plan version 2 on the primary and receives a successful acknowledgement. Its next step now requires version 2, but the replica still has version 1.
  3. 10.8–15.4s The replica returns version 1 again. The implemented wrapper detects that this is older than the required version 2 and holds the dependent tool step.
  4. 15.4–21.2s The wrapper retries the read on the current primary. Version 2 passes the check and the tool uses it while the replica still has version 1. This assumes a fresh query after the commit.
  5. 21.2–24.5s Asynchronous replication catches up and the replica becomes version 2. The animated delay is illustrative, not a promised maximum wait.
  6. 24.5–32s A later tool step waits while a fresh replica read returns version 2. The same check passes and sends the approved version down the green gate to the tool step. The resolved state holds, then fades out for the loop. The check controls plan freshness, not permissions.
About this cut

Production: gpt-6.1-sol.

Revision: gpt-6-astra comparative review.

The version check and primary retry are illustrative wrapper code, not behavior guaranteed by an agent or PostgreSQL; prompts do not enforce freshness or permissions.

Assumes one available current primary, a fresh read snapshot after commit, and no competing writers or caches. A revision check is not authorization or an atomic guard against later changes.

Plan revisions and replication delays are illustrative; elapsed time does not guarantee freshness. WAL transport and replay are abstracted into one copy event.

Audio was analysed, not physically heard. A separate comparative review is saved under reviews/comparisons/replication-and-consistency.json; human editorial promotion remains separate.

These animations use sound effects rather than narration. The written guide explains the mechanism and its limits. Model names describe how a cut was made, not a quality ranking.

What the review found