docs: doc_fetch_*_subscribe ne remplacent pas doc_subscribe
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.
This commit is contained in:
@@ -293,6 +293,21 @@ has both**:
|
|||||||
has no first-`State` barrier**: an anchored read on it can return 0 rows during
|
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".
|
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
|
These two are **mutually exclusive**: the guessable target (store-root) is not
|
||||||
barrier-authoritative, and the barrier-authoritative target (`o:` repo) 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
|
guessable. **Consequence:** you cannot build a lookup table that is BOTH reachable
|
||||||
|
|||||||
Reference in New Issue
Block a user