From 1ecf511e9d8de8e0feb007f3a88f2c0d56ce455a Mon Sep 17 00:00:00 2001 From: Sylvain Duchesne Date: Sun, 16 Aug 2026 10:22:36 +0200 Subject: [PATCH] =?UTF-8?q?docs(contract):=20un=20rejet=20veut=20dire=20?= =?UTF-8?q?=C2=AB=20inconnu=20=C2=BB,=20jamais=20=C2=AB=20absent=20=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Le contrat n'énonçait qu'un cas particulier — createEntityDoc lève si le document ne peut pas être enregistré — alors que c'est devenu la règle de toute une famille d'appels. Ceux qui doivent d'abord SAVOIR si une chose existe avant d'agir lèvent désormais quand ils n'ont pas pu le savoir, au lieu de continuer comme si la réponse était « rien ». C'est ce qui a cessé de fabriquer une seconde inbox, un compte dupliqué ou une racine de registre en double. La conséquence est actionnable et doit être dite : un rejet ne signifie pas que la chose est absente, il signifie qu'on l'ignore. Le relancer ou le remonter, mais surtout ne pas le lire comme un résultat vide — ce qui reviendrait à réintroduire côté appelant exactement le défaut qu'on a retiré. --- .project/concepts/app-contract/contract_polyfill-surface.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.project/concepts/app-contract/contract_polyfill-surface.md b/.project/concepts/app-contract/contract_polyfill-surface.md index efdc269..37df9b7 100644 --- a/.project/concepts/app-contract/contract_polyfill-surface.md +++ b/.project/concepts/app-contract/contract_polyfill-surface.md @@ -122,7 +122,7 @@ It resolves **only once that work has actually completed**: if what was shared w **The session is the package's, not yours.** You never build one, and no call takes one. Call this package's `init` (not the one you passed to `configure`): it captures the session the SDK delivers to `init`'s callback and keeps it, then calls your callback with that same event untouched — so an application that wants the `session_id` for the `docs` primitives reads it there, and one that does not may pass no callback at all. Identity normalisation is the package's too: `@Alice`, `alice ` and `ALICE` are one person. -`createEntityDoc` throws if the document cannot be recorded in its store. +Where a call must first find out whether something already exists — a document's record in its store, a user's inbox — it throws when it could not find out, instead of proceeding as though the answer were "nothing". So `createEntityDoc` throws if the document cannot be recorded in its store, and resolving an inbox throws rather than handing back a second one. **A rejection means "unknown", never "absent"** — retry it or surface it, but do not read it as an empty result. ## Non-guarantees