@@ -203,7 +203,8 @@ Every shipped driver therefore answers it, and the contract still allows a drive
203203conditional-update contract already: ` PATCH ` and ` DELETE ` take an opt-in ` If-Match ` header or ` expectedVersion ` token
204204(` packages/spec/src/api/protocol.zod.ts ` , ` packages/rest/src/crud-routes.ts ` ) and answer ** 409 ` CONCURRENT_UPDATE ` ** when
205205it differs from the row's ` updated_at ` (` packages/metadata-protocol/src/protocol.ts#ConcurrentUpdateError ` ) — compared in
206- ` updateData ` over the existence probe, before ` engine.update ` , so it is compare-then-write, not atomic.
206+ ` updateData ` (over the existence probe, before ` engine.update ` ) and in ` deleteData ` (` assertVersionMatch ` , reading the row
207+ itself), so it is compare-then-write, not atomic.
207208
208209### 2. The pull — HotCRM at ` 8f52859 `
209210
@@ -573,7 +574,9 @@ at merge (the card's own words; HotCRM `AGENTS.md` rule 2: *merged is not availa
573574 words co-exist as ` sys_team ` and ` team ` do.
574575- ** Codes** (ADR-0112 D1, D3 — registered in the ledger by the PR): ` PERMISSION_DENIED ` 403 for a refused claim, release,
575576 move or supplied queue; ` CONCURRENT_UPDATE ` 409 for a lost claim race — the ledger's existing code for a write another
576- writer beat, so the verb carries one 409, not two (ADR-0112 D1); one new code, ` QUEUE_NOT_FOUND ` 422, only for a
577+ writer beat, so the verb carries one 409, not two (ADR-0112 D1); the ledger is keyed by the stamping package, and the
578+ PR adds the row under ` @objectstack/objectql ` , where the claim's 409 is raised; one new code, ` QUEUE_NOT_FOUND ` 422,
579+ only for a
577580 caller-supplied ` queue ` that resolves nowhere in the row's organization. A rule's unresolved target is never a refusal
578581 (D5). D3's registration refusal is thrown at ` registerObject ` , a door Studio and the metadata API reach at request
579582 time, so it carries the ADR-0112 envelope the registry's other field refusals carry — ` INVALID_METADATA ` , 422, as
@@ -734,7 +737,7 @@ objection names the number.
73473716 . ** The by-id write precondition (` expect ` ) is engine-internal — set by the gate for a claim and by the assignment seam
735738 for the cursor, reachable from no data door — and the data API's existing optimistic concurrency stays where it is.**
736739 ` PATCH ` and ` DELETE ` already take ` If-Match ` / ` expectedVersion ` and answer 409 ` CONCURRENT_UPDATE ` , compared in
737- ` updateData ` before ` engine.update ` (Context §1): compare-then-write. The alternative lowers that check onto the same
740+ ` updateData ` / ` deleteData ` before the engine write (Context §1): compare-then-write. The alternative lowers that check onto the same
738741 precondition (` expect: { updated_at: <token> } ` ), making today's optimistic concurrency atomic for every client
739742 already sending the token; its cost is moving the comparison into the write while preserving what the protocol
740743 layer settles around it — the probe-first ordering (404 before 409), the token normalisation, and the conflict's
0 commit comments