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:
+8
-8
@@ -221,7 +221,7 @@ const { check, journey, finish } = declareSuite({
|
||||
{
|
||||
name: "The index answers an ordinary SPARQL query",
|
||||
checks: [
|
||||
"readUnion returns both entries and the index's own declaration",
|
||||
"reading the document returns both entries and the index's own declaration",
|
||||
"a SELECT for the entry predicate returns both entries, with their values",
|
||||
"a SELECT of the index's own subject returns the field it declares",
|
||||
"a stranger's SELECT returns the same entries",
|
||||
@@ -278,7 +278,7 @@ function step<T>(what: string, ms: number, task: () => Promise<T>): Promise<T> {
|
||||
* to suit it.
|
||||
*
|
||||
* ── It reads the way an application reads ───────────────────────────────────
|
||||
* `read` is an ordinary `readUnion` of an ordinary document, or an anchored SELECT — the
|
||||
* `read` is an ordinary anchored read of an ordinary document, or a narrower SELECT — the
|
||||
* only two ways anyone has of reading an index, the harness included. Nothing here reaches
|
||||
* for a way to hurry the layer below, because a consumer has none either.
|
||||
*
|
||||
@@ -455,9 +455,9 @@ async function main(): Promise<void> {
|
||||
const declared = self?.props[INDEX_FIELD] ?? [];
|
||||
check(
|
||||
"the index document declares the field it indexes by",
|
||||
declared.length === 1 && declared[0] === PUBLISHED_AT && self?.graph === index,
|
||||
declared.length === 1 && declared[0] === PUBLISHED_AT,
|
||||
`subjects=${raw.length} self=${self === undefined ? "(not found)" : "found"} ` +
|
||||
`graph=${self?.graph} declared=${JSON.stringify(declared)}`,
|
||||
`declared=${JSON.stringify(declared)}`,
|
||||
);
|
||||
},
|
||||
});
|
||||
@@ -762,8 +762,8 @@ async function main(): Promise<void> {
|
||||
// which is the state the question is about — one entry cannot tell a query that
|
||||
// returns everything from one that returns the first thing it finds.
|
||||
//
|
||||
// WHAT IS BEING ASKED. This package documents one way of reading an index
|
||||
// (`readUnion`) and issues no query of its own, so "an index is an ordinary document
|
||||
// WHAT IS BEING ASKED. This package documents how to read an index and issues no
|
||||
// query of its own, so "an index is an ordinary document
|
||||
// anyone queries normally" has never been anything but plausible. These four checks
|
||||
// are a measurement of that sentence, not a feature: an empty answer is a RESULT and
|
||||
// is reported as one, and a rejection is reported apart from it, because "the query
|
||||
@@ -789,7 +789,7 @@ async function main(): Promise<void> {
|
||||
PUBLISHED_AT,
|
||||
);
|
||||
check(
|
||||
"readUnion returns both entries and the index's own declaration",
|
||||
"reading the document returns both entries and the index's own declaration",
|
||||
held.size === 2 && declares,
|
||||
`entries=${JSON.stringify([...held.keys()])} declares=${declares}`,
|
||||
);
|
||||
@@ -826,7 +826,7 @@ async function main(): Promise<void> {
|
||||
);
|
||||
|
||||
// The reader who matters: an index exists to be read by people who own neither it
|
||||
// nor anything in it. `readUnion` already answers him (the journey above); whether
|
||||
// nor anything in it. Reading the whole document already answers him (the journey above); whether
|
||||
// a query does is a separate question, and it is the one an application asks.
|
||||
const theirs = await step("Bob querying the index he does not own", BRIDGE_MS, () =>
|
||||
bob!.frame.evaluate(
|
||||
|
||||
Reference in New Issue
Block a user