VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

How Superintelligence Shifts Education Coursework | Retooling for the Next Era in Education: The Optimistic Concurrency and Lost Updates Lab — How Can Two Correct Edits Conflict When They Begin From the Same Older Record?

How Can Two Correct Edits Conflict When They Begin From the Same Older Record? Preserve the version that an editor read and compare it with the authoritative version when committing. Two individually sensible edits can lose information when both are calculated from a stale record. Learners should distinguish a successful write from a correct combined result and explain when a retry must recompute or seek clarification.

This international lab extends Transaction Atomicity, Idempotency and Retry, Stale Copies and Update Propagation, and Version Merge using fictional single-record edits. Vocabulary Coding and Engineering and EnDist are proposed frameworks, not validated interventions. No live database or real resource is modified; future superintelligence remains hypothetical.

  • Trace two edits calculated from the same committed state.
  • Construct a lost-update counterexample.
  • Use an atomic compare-and-update rule with monotone versions.
  • Recompute a delta after conflict rather than resubmit a stale replacement.
  • Separate version conflict from ambiguous acknowledgement and idempotency.
  • Independently verify a new capacity-limited scenario.

Coursework series: Transaction Atomicity Lab · Idempotency and Retry Lab · Stale Copies and Update Propagation Lab · Version Merge Studio · Vocabulary Coding and Engineering

Continue this coursework series: Convolution and Moving Window Lab · Optimistic Concurrency and Lost Updates Lab (this article) · Total Expectation and Variance Lab · Parallel Structure and Coordination Studio

Full chapter index

Chapters 1–5
  1. The capability: preserve changes made by different editors
  2. Define the single-record model
  3. Vocabulary Coding and Engineering for concurrent edits
  4. Read the fictional register
  5. Trace an unprotected replacement strategy
Chapters 6–10
  1. Reverse the order of unprotected writes
  2. Declare the atomic compare-and-update rule
  3. Trace a successful write and a rejected stale edit
  4. Recompute the additive intent
  5. Detect the stale-retry error
Chapters 11–15
  1. Check a different type of edit
  2. Add a capacity constraint
  3. Compare the reverse accepted order under capacity
  4. Separate version conflict from a lost acknowledgement
  5. Inspect the scope of the protected record
Chapters 16–20
  1. Recognise the need for an authoritative comparison
  2. Audit an AI-generated trace
  3. A prompt for inspectable concurrent reasoning
  4. A proposed assessment rubric
  5. Independent transfer: a bounded register
Chapters 21–25
  1. Primary learning: shared number cards
  2. Secondary learning: trace interleavings and constraints
  3. University, institutions and EnDist
  4. A four-week coursework sequence
  5. Questions about version checks
Chapter 26
  1. Sources, boundaries and next steps

CHAPTER 1 OF 26 · Understand the capability

1. The capability: preserve changes made by different editors

Two helpers update a fictional display register. Each reads the current quantity, computes an intended change and writes a replacement value. Both can follow their individual arithmetic correctly while their combined result is wrong if the second write overwrites the first. The problem is in the relationship between observations and updates.

The coursework deliverables are a versioned state register, a lost-update trace, a conditional-write protocol, a repaired trace and a new transfer. The goal is to reason about shared information when work overlaps, rather than assuming a fluent agent or an atomic individual write settles every concurrency question.

Contents · Next chapter

CHAPTER 2 OF 26 · Understand the capability

2. Define the single-record model

The authoritative record consists of a quantity q and a nonnegative integer version v. Reading returns a snapshot of both. A successful conditional write checks the expected version, validates the proposed new quantity and changes both fields as one atomic operation. Each successful change increments the version by one.

All actions in the exercise are simulated, with check and update treated as indivisible at the record. Versions never wrap or repeat within the toy model. Real implementations need suitable database semantics and constraint enforcement; reading a version and later writing without an atomic condition would not implement this contract.

Background reading: PostgreSQL: transaction isolation and concurrent updates.

Contents · Previous chapter · Next chapter

CHAPTER 3 OF 26 · Understand the capability

3. Vocabulary Coding and Engineering for concurrent edits

Distinguish snapshot, stale snapshot, intent, proposed value, expected version, accepted change, conflict and acknowledgement. A proposed value may be correct relative to the version read and incorrect relative to the current record. A rejected conflict does not necessarily mean the underlying intent is invalid.

VCE asks learners to preserve the original intent alongside the proposed state. An instruction to add three units is not the same as an instruction to set the total to thirteen. Reusing the former after a fresh read may be reasonable under the declared policy; repeating the latter could erase somebody else’s change.

Related framework: Vocabulary Coding and Engineering.

Contents · Previous chapter · Next chapter

CHAPTER 4 OF 26 · Work through the example

4. Read the fictional register

The Alder practice archive has quantity q=10 and version v=4. Editor Ada is authorised to add three units; editor Ben is authorised to add five units. These are additive changes to a fictional recorded quantity, not actual movements of resources. Assume quantities must remain nonnegative and there is no maximum in the main example.

Both editors initially read (10,4). Ada calculates proposed q=13 and Ben calculates q=15. The two proposed values are each arithmetically correct for the snapshot they used. If both intended additions are accepted exactly once, the combined quantity should be eighteen.

Contents · Previous chapter · Next chapter

CHAPTER 5 OF 26 · Work through the example

5. Trace an unprotected replacement strategy

Consider a flawed rule that accepts every proposed quantity, replaces q and increases the version, without checking the expected version. Ada writes 13 first, giving state (13,5). Ben then writes his previously computed 15, giving state (15,6).

The final quantity fifteen does not equal the intended total eighteen. Ada’s addition is lost although her write was accepted and version incremented. The second write overwrote the absolute value rather than adding five to the current quantity. A version counter by itself has not protected the data.

ActionExpected snapshotProposed qAuthority after
Initial——(10,4)
Ada replaces(10,4)13(13,5)
Ben replaces(10,4)15(15,6)
Flawed unconditional replacements: Ada’s intended contribution is lost.

Contents · Previous chapter · Next chapter

CHAPTER 6 OF 26 · Work through the example

6. Reverse the order of unprotected writes

In a separate execution, Ben’s replacement is accepted first, producing (15,5). Ada’s stale replacement is accepted next, giving (13,6). Ben’s addition is now lost.

Both flawed traces contain two individually successful replacements. Their outcomes depend on the interleaving, yet neither implements both additive intents correctly. This is a concrete lost-update example. If a reader sees only the final version six, the number does not establish that the two intended changes are reflected in the quantity.

Contents · Previous chapter · Next chapter

CHAPTER 7 OF 26 · Work through the example

7. Declare the atomic compare-and-update rule

To submit an edit, provide the expected version and proposed quantity. If the current version differs, return a conflict without changing either field. If the version matches, validate the proposed quantity under the current record contract; if valid, atomically replace the quantity and increment the version.

The comparison, validation and write must occur together at the authority, not as separate unprotected steps. In a database, a conditional update can use a version predicate and an appropriate mechanism for determining whether the row was changed. PostgreSQL’s transaction-isolation documentation explains when conditions are rechecked and how concurrency behaviour depends on isolation.

Contents · Previous chapter · Next chapter

CHAPTER 8 OF 26 · Work through the example

8. Trace a successful write and a rejected stale edit

Return to initial state (10,4). Ada submits expected version four and proposed quantity thirteen. It matches, so the committed state becomes (13,5). Ben submits expected version four and proposed quantity fifteen. The current version is five, so the request conflicts.

The record remains (13,5) after Ben’s rejection. The stale proposal was never accepted. In this version-mismatch scenario, a conflict tells Ben that his expected version no longer matches the authority; it does not by itself determine whether his intended addition can still be applied.

Contents · Previous chapter · Next chapter

CHAPTER 9 OF 26 · Work through the example

9. Recompute the additive intent

Ben reads the new state (13,5) and reapplies his authorised instruction to add five, obtaining proposed q=18. He submits expected version five. Assuming no intervening accepted change and all constraints pass, the new committed state is (18,6).

If Ben’s first proposal had succeeded instead, Ada could refresh from (15,5) and propose eighteen. Both serially applied additive intents lead to the same quantity in this simple model. This conclusion depends on the operation being additive and unrestricted by additional constraints; other edits may not commute.

ActionExpected vProposed qResult and state
Ada submits413Accept; (13,5)
Ben submits stale415Conflict; (13,5)
Ben refreshes518Accept; (18,6)
Atomic version comparison, with recomputation of the retained additive intent.

Contents · Previous chapter · Next chapter

CHAPTER 10 OF 26 · Identify failure modes

10. Detect the stale-retry error

A generated repair says that after Ben’s conflict, he should change only the expected version from four to five while keeping proposed quantity fifteen. If accepted, this would again give (15,6) and erase Ada’s addition. The version predicate would be technically satisfied but the intended operation would be wrong.

Repair by recomputing the proposed value from the current snapshot and retained intent, or asking for a revised decision if automatic recomputation is not authorised. Version checking is not a substitute for meaning. A successful conditional write establishes that a condition matched, not that the proposed value embodied the correct business rule.

Contents · Previous chapter · Next chapter

CHAPTER 11 OF 26 · Identify failure modes

11. Check a different type of edit

Suppose instead that Ben’s authorised instruction is to set the quantity to fifteen, regardless of the current number. Under that changed contract, a fresh, authorised replacement of thirteen with fifteen could be correct. It would not be equivalent to adding five.

Do not silently reinterpret an absolute assignment as a delta. When two intentions genuinely conflict, a receiver may need a decision from the authorised owner. Version checking makes the conflict visible; it does not determine which of two incompatible goals should take priority.

Contents · Previous chapter · Next chapter

CHAPTER 12 OF 26 · Identify failure modes

12. Add a capacity constraint

Consider a separate register with the same initial state (10,4) but maximum permitted quantity sixteen. Ada’s addition of three succeeds first, giving thirteen. After a conflict and fresh read, Ben’s addition of five would produce eighteen, violating the maximum.

The recomputed proposal must be rejected for capacity. The final state remains (13,5) with only Ada’s addition accepted. A stale request cannot be made valid merely by using the new version. Validation must reflect the current state and every applicable constraint.

Contents · Previous chapter · Next chapter

CHAPTER 13 OF 26 · Identify failure modes

13. Compare the reverse accepted order under capacity

In the same maximum-sixteen variant, suppose Ben is accepted first. The quantity becomes fifteen, version five. Ada then conflicts, refreshes, and computes eighteen. Her proposed update also violates capacity, so it is rejected.

The final quantity is fifteen instead of thirteen. Both executions satisfy the constraint and accept one edit. Their different results expose an ordering or prioritisation question not solved by the version predicate. A real policy might require fair allocation or a coordinator’s decision; no such policy is stipulated here.

Contents · Previous chapter · Next chapter

CHAPTER 14 OF 26 · Identify failure modes

14. Separate version conflict from a lost acknowledgement

Imagine that Ada’s conditional write succeeded but her response was lost. The authority now holds (13,5), while Ada is uncertain whether her addition was accepted. Seeing a newer version proves the record changed, but not necessarily which request caused the change if other edits are possible.

To reconcile this uncertainty, a system needs a suitable operation identity and committed outcome record, as in the Idempotency and Retry Lab. Retrying an additive intent after an unknown outcome could apply it twice. A version check alone does not establish exactly-once application.

Contents · Previous chapter · Next chapter

CHAPTER 15 OF 26 · Identify failure modes

15. Inspect the scope of the protected record

The main protocol covers one quantity and its version. A rule involving two different records, such as the total across locations, may require a larger transaction boundary and appropriate concurrency control. Updating each record with an individual version check does not by itself prove the multi-record invariant.

Keep the object identity, version scope and validity rules in the handover. Real database isolation levels and failure behaviours differ. The PostgreSQL reference provides technical context; our simplified model is not a production recipe or certification that arbitrary concurrent workloads are safe.

Contents · Previous chapter · Next chapter

CHAPTER 16 OF 26 · Identify failure modes

16. Recognise the need for an authoritative comparison

If two disconnected copies both believe version four is current and independently accept edits, both might label their new versions five. They have not performed the single-authority conditional operation stipulated here. Equal labels alone are not evidence of a unique committed history.

A distributed design needs a specified authority or coordination and merge policy. We do not supply one in this exercise. The Stale Copies lab studies downstream version use; this lab protects the write boundary in its single-record model. Avoid generalising either exercise beyond its assumptions.

Contents · Previous chapter · Next chapter

CHAPTER 17 OF 26 · Identify failure modes

17. Audit an AI-generated trace

Give an assistant the initial quantity and two intentions. Ask it to distinguish snapshots, expected versions, proposals, commit results and the current state. Independently inspect the first stale proposal and the repaired proposal. Check that rejection does not increment the version.

Then change one additive intent to an absolute replacement and ask whether automatic recomputation is still justified. A model that produces the same repair in every case has ignored a semantic difference. Retain the operation’s meaning, not just the latest record value.

Contents · Previous chapter · Next chapter

CHAPTER 18 OF 26 · Identify failure modes

18. A prompt for inspectable concurrent reasoning

Try: Start with q=10 and version four. Ada intends +3 and Ben +5; both read the initial snapshot. Show lost updates when stale replacements are accepted in both orders. Then use an atomic rule that accepts only a matching version and valid proposed quantity, increments version on success and leaves state unchanged on rejection.

Continue: show Ben refreshing and recomputing after Ada succeeds. Add maximum quantity sixteen as a separate variant and compare both orders. Explain why lost acknowledgement requires operation-identity evidence rather than a blind retry. Do not connect the classroom exercise to an actual database or shared resource.

Contents · Previous chapter · Next chapter

CHAPTER 19 OF 26 · Identify failure modes

19. A proposed assessment rubric

Score five dimensions from zero to three: state and intent definition; correct interleaving trace; atomic version predicate and conflict handling; preservation of validity rules and acknowledgement boundaries; independent transfer. Zero means absent evidence, one major errors, two mostly correct with a gap, three independently reproducible.

Record assisted output, independent explanation and receiver reconstruction separately. Ordinary accessibility supports remain available. The fifteen-point rubric is proposed teaching material, not a validated computing-proficiency or intelligence assessment. Feedback should identify the missing version, constraint or intent check.

Contents · Previous chapter · Next chapter

CHAPTER 20 OF 26 · Test independent transfer

20. Independent transfer: a bounded register

A fresh fictional register has q=8, v=2 and maximum eleven. Editor Kim intends to add four; editor Lee intends to subtract two. Both read the initial record. Assume a valid subtraction may not produce a negative value. Trace a conditional strategy where Kim attempts first, then Lee, then Kim reassesses after reading the accepted state.

Worked check: Kim initially proposes twelve at version two and is rejected for exceeding eleven; state remains (8,2). Lee proposes six at version two and succeeds, producing (6,3). Kim reads (6,3), recalculates ten and succeeds at expected version three, giving (10,4). If Lee had succeeded before Kim’s first submission, Kim’s version-two proposal would instead conflict; the fresh calculation is still necessary. Both changes are accepted exactly once in the stated successful trace.

AttemptExpected vProposalResult / state
Kim +4212Capacity reject; (8,2)
Lee −226Accept; (6,3)
Kim +4 after refresh310Accept; (10,4)
Fresh transfer with maximum eleven and nonnegative quantities.

Contents · Previous chapter · Next chapter

CHAPTER 21 OF 26 · Test independent transfer

21. Primary learning: shared number cards

Use a pretend register on paper with a quantity card and a version card. Two learners read the same state and write proposed additions on separate sheets. Show how replacing the total with a stale sheet can lose a contribution. Keep numbers manageable and use adult-prepared materials.

Introduce a version check as a rule that asks whether the shared record is still the one the learner read. On a mismatch, reread and recompute. No direct child access to AI is required. The foundational capability is distinguishing what somebody intended from the value previously calculated.

Contents · Previous chapter · Next chapter

CHAPTER 22 OF 26 · Test independent transfer

22. Secondary learning: trace interleavings and constraints

Students can tabulate snapshot versions, proposed quantities and the authoritative state for both acceptance orders. Introduce the capacity variant to show that recomputation does not guarantee acceptance. Compare an additive intent with a fixed replacement.

Use the bounded transfer before revealing its answer. Require an explanation of whether rejection is caused by an invalid proposal or a mismatched version, with the stipulated check order. Accessible tables and verbal traces may replace code. Assess the reasoning, not familiarity with a specific platform.

Contents · Previous chapter · Next chapter

CHAPTER 23 OF 26 · Test independent transfer

23. University, institutions and EnDist

Advanced study can examine isolation anomalies, optimistic concurrency control, version tokens, transactional invariants and application-specific merge policies. Deployment requires appropriate database guarantees, authorisation and testing. The toy protocol does not certify a real implementation or solve every distributed conflict.

Under proposed EnDist, transferring capability means retaining the write contract, original intent, version scope and evidence needed for reconciliation. A recipient should be able to distinguish a stale computation from a legitimate conflict of objectives. Evaluate that capability separately from a generated implementation.

Contents · Previous chapter · Next chapter

CHAPTER 24 OF 26 · Four-week coursework plan

24. A four-week coursework sequence

Week one: define the register and two intents, then construct both flawed interleavings. Week two: implement the atomic comparison on paper and verify the repaired trace. Preserve rejection and commit outcomes as different statuses.

Week three: add capacity, compare absolute and additive edits and inspect uncertain acknowledgements. Week four: release the bounded transfer and ask a new receiver to reconstruct the authority state after each attempt. Adapt pacing and access supports; this is proposed instruction, not a validated intervention.

Contents · Previous chapter · Next chapter

CHAPTER 25 OF 26 · Four-week coursework plan

25. Questions about version checks

Does a version increment by itself prevent lost updates? No; the version must participate in an appropriate conditional operation. Does a mismatch establish that an intention is impossible? No; it establishes that a snapshot is stale under our model. Does replacing the expected version alone make a proposal correct? No.

Can an atomic single-record update enforce every multi-record rule? Not necessarily. Does a timeout prove that an operation failed? No. Retain the operation identity and authoritative evidence when the outcome is uncertain. A version contract helps with stale writes but cannot replace other required guarantees.

Contents · Previous chapter · Next chapter

CHAPTER 26 OF 26 · Four-week coursework plan

26. Sources, boundaries and next steps

PostgreSQL’s transaction-isolation documentation discusses concurrent updates, conditional predicates and differences between isolation levels. All quantities, editors, interleavings, conflict responses, transfer cases and assessments here are original fictional teaching constructions. They are not production tests or evidence of educational effectiveness.

Design a new two-editor case in which the order changes which valid outcome is possible. Give a receiver the initial state, each intent and the exact atomic contract. Ask them to identify where fresh calculation is allowed and where a human decision is required. The enduring capability is preserving meaning and evidence when work overlaps.

References: PostgreSQL: transaction isolation and concurrent updates.

Related coursework: Transaction Atomicity Lab · Idempotency and Retry Lab · Stale Copies and Update Propagation Lab · Version Merge Studio.

Contents · Previous chapter