{
  "schema": "vedokrok.public-item.v1",
  "release_id": "MHC-RPUB-20260920-75ad787a",
  "url": "/knowledge/make-the-write-conditional-on-the-version-you-reviewed",
  "id": "MHC-D-RESEARCH-0977",
  "version": "0.1.0",
  "title": "Make the write conditional on the version you reviewed",
  "summary": "A careful review of yesterday's value does not authorize overwriting today's change.",
  "kind": "protocol",
  "body": "Bind the update to the version that informed it. With a supported HTTP interface, an entity tag and If-Match can provide this check. If the version changed, reread and reconcile the difference instead of forcing the old update through.",
  "limits": [
    "Reading twice is not atomic protection. The check must be enforced by the receiving system, with the correct version scope."
  ],
  "topics": [
    "work-01-reliable-changes"
  ],
  "intents": [],
  "source_ids": [
    "RS-8500D155C07EFEF9"
  ],
  "evidence": [
    {
      "claim": "HTTP If-Match can make a state-changing request conditional on a matching representation version and prevent lost updates.",
      "source_id": "RS-8500D155C07EFEF9",
      "role": "supports",
      "note": "A client-side read followed by an unconditional write is not an atomic version check.",
      "locator": "RFC 9110, section 13.1.1"
    }
  ],
  "use_when": [
    "Another person or process can edit the same record before your update reaches it."
  ],
  "avoid_when": [
    "Reading twice is not atomic protection. The check must be enforced by the receiving system, with the correct version scope."
  ],
  "example": "While you correct an address, another user changes the contact details. A version conflict prevents your stale full-record payload from silently erasing that work.",
  "check": "A test that changes the record between read and write is rejected or handled as a documented conflict.",
  "steps": [
    "Read the value and its server-provided version together.",
    "Submit the change with an enforced version precondition.",
    "On conflict, inspect the new state and prepare a fresh, reviewed update."
  ],
  "sources": [
    {
      "id": "RS-8500D155C07EFEF9",
      "title": "RFC 9110: HTTP Semantics",
      "url": "https://www.rfc-editor.org/rfc/rfc9110.html"
    }
  ],
  "relations": [
    {
      "from": "MHC-D-RESEARCH-0977",
      "to": "MHC-D-RESEARCH-0978",
      "type": "useful_with",
      "url": "/knowledge/reverse-the-business-effect-without-restoring-stale-history"
    }
  ],
  "collections": [
    {
      "id": "RC-8F91DD82E91EA56B",
      "title": "Find the failure without creating a second incident",
      "url": "/collections/find-the-failure-without-creating-a-second-incident"
    }
  ]
}
