From f7dd9223e045baeb7ec1ef79888e7b6a707d5588 Mon Sep 17 00:00:00 2001 From: Sylvain Duchesne Date: Tue, 7 Jul 2026 09:39:42 +0200 Subject: [PATCH] docs(read-model): distinguish the GRAPH ?g scan from a GRAPH write MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Append to the probe section: the anchorless GRAPH ?g SCAN spans every named graph (O(wallet) union — the reason reads are per-doc anchored, preserved) is distinct from a constant anchored GRAPH WRITE, which round-trips to the same repo (no phantom graph, verified by packages/client/e2e/). Re-verify via the harness if the broker version changes. Co-Authored-By: Claude Opus 4.8 (1M context) --- docs/read-model.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/read-model.md b/docs/read-model.md index a574d31..bb50f90 100644 --- a/docs/read-model.md +++ b/docs/read-model.md @@ -172,6 +172,19 @@ and never iterates the other named graphs. (A repo absent from `self.repos` thro `RepoNotFound` and is skipped per-doc, see the VERIFIED note above — the read cannot sync an unknown repo.) +> **Re-confirmed by the standing e2e harness (`packages/client/e2e/`, broker +> `@ng-org/web 0.1.2-alpha.13`).** The `docRoundTrip` check measures all three shapes +> anchored to a doc D: (a) a no-GRAPH default-graph write round-trips; (b) an explicit +> `INSERT DATA { GRAPH {…} }` — a **constant** plain NURI — **also** round-trips +> (readable both as the anchored default graph and via `GRAPH `), i.e. when anchored +> it resolves to the **same repo graph** — there is **no phantom graph**; (c) an +> **anchorless** `SELECT … WHERE { GRAPH ?g {…} }` — a **variable** `?g` scan — spans +> **every** named graph in the session store (it saw both D and a second doc, and 32 +> graphs total on the shared wallet). Note the distinction: it is the **variable** +> `GRAPH ?g` *scan* that is unbounded (the O(wallet) union — the reason the read path +> is per-doc anchored, preserved above), **not** a **constant** `GRAPH ` write, +> which lands in D's repo. Re-run that harness to re-verify against a newer broker. + ## Implementation — `read-model.ts` `readModel.readUnion(docs)` implements this: for each requested doc NURI (the