Tacnode™
Glossary
Context Vocabulary

What Is Unmergeable State?

Unmergeable state is shared, mutable state whose concurrent updates cannot be combined after the fact without breaking a rule the state must obey. Two writers that each acted correctly on the same earlier version can produce a combined result that is invalid, such as a balance below zero or a budget spent twice. Money, budgets, quotas, spending mandates, velocity counters and database schemas are typical examples. Correct concurrent use of unmergeable state requires coordination before the write, not a merge after it.

Updated

What is unmergeable state?

Unmergeable state is a term Tacnode uses when assessing AI agent workloads, to separate shared state that concurrent writers can safely reconcile from state they cannot. The distinction matters because many concurrent systems already have a working answer to conflicts. Code has git: concurrent changes on branches are merged, conflicts are surfaced, and a person usually reviews the result. A single stored record has a row lock, so the database serializes writers. Neither is unmergeable in this sense. The test Tacnode applies is one question: when two writers hit this state at the same moment, what resolves the conflict today?

The idea has a formal ancestor in database research. Coordination Avoidance in Database Systems (Bailis, Fekete, Franklin, Ghodsi, Hellerstein and Stoica) introduces invariant confluence, a test of whether operations can run without coordination and still preserve an application's invariants when their results are merged. Its analysis shows that a counter with a "greater-than" threshold, such as a balance that must stay above a floor, is invariant confluent for increments but not for decrements. Withdrawals from one balance cannot simply be merged. For that case the paper points to the escrow transactional method, which splits the amount between processes so each can spend its share without coordinating: "a balance of $100 might be divided between five servers, such that each server can dispense $20 without requiring coordination to enforce a non-negative balance invariant."

Conflict-free replicated data types (CRDTs) are the mergeable end of the same spectrum. They are designed so that, in crdt.tech's words, "the data can always be merged into a consistent state." A consistent merge is not the same as one that keeps an application's rules. Unmergeable state is what is left over: state whose rules a merge function cannot guarantee.

How unmergeable state works

The litmus test, applied to common kinds of shared state:

StateWhat resolves concurrent writes todayMergeable?
Source codeBranches, merge and reviewYes
One record, one writer at a timeRow lock or conditional updateSerialized by the database
Page-view counterIncrements add upYes
Account balance with a floorNothing, unless writes are coordinatedNo
Shared budget or quotaNothing, unless writes are coordinatedNo
Database schemaMigrations collideNo

A worked failure, with illustrative numbers. Two agents share a team budget with 400 remaining. Each reads the remaining amount, each sees 400, and each approves a 300 purchase. Both writes are valid against what each read. Combined, the budget is 200 overspent. There is no merge function that fixes this after the fact; one of the two approvals should never have happened.

Three designs keep unmergeable state correct:

  1. 1.Serialize the writers. Lock the budget row, or use a conditional update that re-checks the limit at commit.
  2. 2.Partition the state. Give each writer its own share of the budget, escrow style, and coordinate only to rebalance.
  3. 3.Decide and commit in one transaction. Read the current total and record the decision together, so a second conflicting commit sees the first.

Why unmergeable state matters in real-time systems

Unmergeable state is where concurrency becomes a correctness problem. With mergeable state, a stale read costs a little accuracy. With unmergeable state, a stale read lets a decision approve what it would have blocked if it had seen current state, and the damage is committed before anyone notices.

AI agents raise the stakes because they write. A fleet of agents drawing on one budget, one set of quotas or one customer account is many writers on unmergeable state with no person in between. For state Tacnode holds, such as budgets, holds and per-agent limits written by the decisions themselves, writes are transactional, so two conflicting commits cannot both land. For data owned by another system of record, Tacnode gives each decision accurate, current context to read; the conflict is still resolved where that data lives. The agent side of this is covered in ACID for agents.

FAQ

Related terms

Further reading