fix: lire un document par la requête ancrée, readUnion ayant quitté le polyfill

Le contrat polyfill-surface passe de 1.0.0-dev.6 à 1.0.0-dev.15, épinglé
désormais sur le tag polyfill/v1.0.0-dev.15. readUnion et UnionSubject ont
été retirés en dev.8 : l'application e2e lit un document par un SELECT ancré
regroupé par sujet, en ignorant les registres urn:ng-eventually: que la
requête renvoie désormais.

La déclaration usage_ng-helpers retire ce que l'engagement a absorbé
(exemple de forme, initNg, orm_start_graph corrigé en dev.7, comportement
d'un document illisible, lecture d'un document public par sa seule
référence, pin par tag) et garde les demandes encore ouvertes.

contract_indexing-layer 4.0.1 (patch) : la lecture d'un index ne cite plus
readUnion.
This commit is contained in:
Sylvain Duchesne
2026-10-01 16:22:02 +02:00
parent 71667ca14e
commit 8bcea7c5be
12 changed files with 305 additions and 82 deletions
+14 -5
View File
@@ -14,14 +14,23 @@
* ends up typed as a reference.
*/
import type { UnionSubject } from "@ng-eventually/polyfill";
/**
* One subject of a document and everything the document says about it, keyed by
* predicate. Declared here because nothing publishes it: the polyfill withdrew its own
* (`UnionSubject`, with `readUnion`) in `1.0.0-dev.8`, and grouping the rows of an
* anchored query is the application's business -- see `readDocument` in the page.
*/
export interface DocumentSubject {
readonly subject: string;
readonly props: Readonly<Record<string, readonly string[]>>;
}
/**
* One entry, as THIS APPLICATION decodes one out of the index document.
*
* It is declared here and not imported, because `@ng-helpers/indexing` publishes no
* such type and no call that produces one: an index is an ordinary document, so its
* contents are whatever `readUnion` hands back, read with the two published IRIs.
* contents are whatever an anchored query hands back, read with the two published IRIs.
* A subject carrying several values shows up as several rows — the document's own
* truth, and the application's business to make something of.
*/
@@ -120,13 +129,13 @@ export interface IndexingBridge {
rebuildHandle(): Promise<void>;
/**
* The index's entries, ordered by value — decoded BY THIS APPLICATION, out of an
* ordinary `readUnion` of the index document, with nothing from the library but the
* ordinary anchored read of the index document, with nothing from the library but the
* two IRIs it publishes. That the suite can do this at all is the claim under test.
*/
read(index: string): Promise<IndexRow[]>;
/** What a document literally holds, straight off `readUnion` — the write-form probe. */
readRaw(doc: string): Promise<UnionSubject[]>;
/** What a document literally holds, grouped by subject — the write-form probe. */
readRaw(doc: string): Promise<DocumentSubject[]>;
/**
* Run a SPARQL SELECT anchored on a document, through `docs.sparqlQuery`.
*