ADR-0109: A refusal names a member only through the roster that may name them
Status: Accepted · Date: 2026-08-30 · Track: 006 phase 03
Context
000027 gave every block a version and made a stale write answer 409 instead of
clobbering. It could not say who the writer lost to, so the message has read
"Block was modified elsewhere" ever since — true, useless, and indistinguishable
from the author's own second tab.
Two things were missing, and they are different kinds of thing.
- A stored fact. No column records who last wrote a block.
user_idis the owner-of-record (000026madeworkspace_idthe access boundary and leftuser_idalone), so it answers who created the block. Creator and last writer are the same person exactly until a second member edits — the only case a 409 exists for. - A boundary. A name in a refusal is a disclosure, not a field. The
implementation everyone reaches for,
SELECT name FROM users WHERE user_id = $1, compiles, reads correctly, reviews well, and hands the caller the name of somebody in a workspace they are not in.
ADR-0108 settled what the event carries and deliberately did not settle this:
an origin names a tab so a client can ignore its own echo. It is not a display
fact, and reusing it as one would attribute a change to a browser session.
Decision
1. The stored fact is biolinks_blocks.last_editor_user_id (000035),
written by every path that bumps the version and by nothing else — create, the
compare-and-swap update, reorder. A path that moves the version without claiming
the write leaves the next 409 naming whoever wrote before it, which is worse
than naming nobody. Existing rows are not backfilled from user_id: a guess
here is a name in a sentence a member reads and believes.
2. The name is resolved through the roster of the block's own workspace,
never a user lookup. This is ADR-0107's intersection rule one surface over,
with a sharper edge: presence answers from the intersection of the store and the
roster so it cannot disclose more than GET /workspaces/{id}/members already
would, and the same bound holds here. The caller reads only names they could
already read.
3. Nobody named is a complete answer, and the refusal is otherwise
unchanged. A former member, a deleted account (ON DELETE SET NULL), a row
written before 000035, an unwired roster, a roster read that failed — each
falls back to the sentence the 409 has always shown. A name that cannot be
resolved weakens a message; it never opens a door, so this path degrades instead
of failing closed the way requireCapability does.
4. The refusal carries the fact; the client says the sentence. The 409 body
takes writePlanLimitError's shape — the envelope, a title an API client can
read, and last_editor: {user_id, name} beside it — so the UI renders a t()
key with the name interpolated rather than displaying the server's English
(005). The repository returns the winning writer's id, unresolved: it does
not know which roster the caller may read a name through, and that boundary is
the handler's to draw.
5. The surface's carrier is the response, not the bus. Nothing is published
when a write is refused — the write that won already published
block.changed. So the realtime ledger's row for it names the serving path that
emits the refusal instead of a publisher, and names no channel and no event.
check:realtime gained a carrier field (bus by default) to say that out
loud; a row that claimed an event type it does not have would be the gate making
the tree lie to it.
Consequences
- The conflict arrives as a
*repository.VersionConflictErrorwrapping theErrVersionConflictsentinel, so everyerrors.Iswritten before this keeps working and a caller that does not care about attribution is unchanged. - The attribution is read in the probe that already told "gone" from "moved on", so the refusal costs no extra query.
- The 409 is now harder to reach than it was, because phase 03's live canvas refetches the document when someone else writes. It remains reachable exactly where it matters: a tab whose stream is not delivering — which phase 01 measured happening under load, a 200-event burst arriving as 17.
- Naming a member is a disclosure with a test, not a field with a schema:
TestAttributedConflict_Isolation_AcrossWorkspacesat Go level and a two-context live spec at UI level, both watched failing against the global lookup this ADR forbids.
Source: docs/decisions/0109-a-refusal-names-a-member-only-through-the-roster-that-may-name-them.md