From 07312cd0a232d60df44bdd39de68a802d21f5bdf Mon Sep 17 00:00:00 2001 From: Sylvain Duchesne Date: Mon, 3 Aug 2026 17:40:50 +0200 Subject: [PATCH] docs: doc_fetch_*_subscribe ne remplacent pas doc_subscribe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vérifié parce qu'elles ressemblent à des appels « ouvrir un repo » tout faits, ce qui aurait rendu notre `ensureRepoOpen` redondant. Elles ne le sont pas : ni l'une ni l'autre ne fait d'I/O — chacune construit un `AppRequest` et le renvoie sérialisé (`lib.rs:1890`, `:1900`), sans session_id ni callback. `doc_subscribe` construit la MÊME requête (`AppRequest::doc_fetch_repo_subscribe` → `Fetch(Subscribe)`), y ajoute la session et la passe à `app_request_stream_`. Ce sont des constructeurs de requête pour qui veut dépêcher lui-même. Donc rien à récupérer : les employer reviendrait à réimplémenter ce que `doc_subscribe` fait déjà. Et `doc_fetch_private_subscribe` ne diffère que par sa cible (le store-root privé), ce qui ne change rien à la barrière — un store-root n'en a toujours pas. --- docs/nextgraph-current-state.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/nextgraph-current-state.md b/docs/nextgraph-current-state.md index fc3b36c..2ca2459 100644 --- a/docs/nextgraph-current-state.md +++ b/docs/nextgraph-current-state.md @@ -293,6 +293,21 @@ has both**: has no first-`State` barrier**: an anchored read on it can return 0 rows during sync-lag with no signal distinguishing "still syncing" from "genuinely empty". +> **`doc_fetch_repo_subscribe` / `doc_fetch_private_subscribe` are NOT alternatives to +> `doc_subscribe`** — checked 2026-08-03, because they look like ready-made +> "open a repo" calls and they are not. Neither performs any I/O: each **builds an +> `AppRequest` and returns it serialized** (`sdk/js/lib-wasm/src/lib.rs:1890`, `:1900`), +> with no `session_id` and no callback. `doc_subscribe` builds the *same* request +> (`AppRequest::doc_fetch_repo_subscribe`, `engine/net/src/app_protocol.rs:930` → +> `Fetch(Subscribe)`), then adds the session id and runs it through +> `app_request_stream_` (`lib.rs:1921-1923`). They exist for a caller that wants to +> construct the request and dispatch it itself. So `ensureRepoOpen`'s +> `doc_subscribe` + wait-for-first-`State` is not duplicating an available call — using +> them instead would mean re-implementing what `doc_subscribe` already does. The +> difference in `doc_fetch_private_subscribe` is only its target +> (`NuriV0::new_private_store_target()`, the private store-root), which changes nothing +> about the barrier: a store-root still has none. + These two are **mutually exclusive**: the guessable target (store-root) is not barrier-authoritative, and the barrier-authoritative target (`o:` repo) is not guessable. **Consequence:** you cannot build a lookup table that is BOTH reachable