---
id: ADR-PFM-QRY-016
title: Definition replacement uses the version previously read
product_area: platform
module: queries
revision: 1
status: proposed
design_intent: confirmed
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
decision: >-
  Editable query definitions, Explorer preferences, reports, schedules, custom tables and
  assignments, search settings and workspace export settings require the version read by the writer.
constrains:
  - DOM-PFM-QRY-001
  - DOM-PFM-QRY-002
  - DOM-PFM-QRY-003
  - DOM-PFM-QRY-004
  - DOM-PFM-QRY-005
origin: 'docs/standards/record-write-contracts.md (D-05, Andrew 2026-10-19)'
alternatives:
  - option: Accept the last write regardless of version
    why_not: One writer could silently discard the other’s changes.
consequences:
  - A missing version is refused and an outdated version conflicts.
  - A conflict requires a fresh read before the user can deliberately apply another edit.
supersedes: []
evidence:
  - 'services-platform at ad3f6a6: docs/standards/record-write-contracts.md'
---

# Definition replacement uses the version previously read

## Context

Two people or browser tabs can edit the same definition. The write contract must detect a stale replacement.

## Decision

Editable query definitions, Explorer preferences, reports, schedules, custom tables and assignments, search settings and workspace export settings require the version read by the writer.

## Alternatives Considered

Accept the last write regardless of version: One writer could silently discard the other’s changes.

## Consequences

A missing version is refused and an outdated version conflicts. A conflict requires a fresh read before the user can deliberately apply another edit.
