fix: ng-helpers rejoint la surface dev.6, et son faux suit le contrat

This commit is contained in:
Sylvain Duchesne
2026-09-21 12:16:42 +02:00
parent e566c5b0b3
commit 71667ca14e
11 changed files with 482 additions and 90 deletions
+11 -6
View File
@@ -207,7 +207,7 @@ const { check, journey, finish } = declareSuite({
name: "An index whose inbox cannot be opened leaves a document behind",
checks: [
"createIndex refuses when the inbox cannot be opened",
"a document was nevertheless created in the owner's public store",
"a document was nevertheless created, and its owner still holds it",
"the leaked document carries a descriptor but accepts no deposit",
],
},
@@ -654,15 +654,20 @@ async function main(): Promise<void> {
outcome.rejected !== null && outcome.returned === null,
`rejected=${outcome.rejected} returned=${outcome.returned}`,
);
// WHAT IS OBSERVED HERE, and what is not. There is no call that lists a store any
// more, so the leak is found by reading every index document Alice HOLDS and
// diffing: that establishes the document survived, not which store it sits in.
// `observed` travels with it because an empty answer only means "nothing turned
// up" under `success` -- under any other state it means nobody answered.
check(
"a document was nevertheless created in the owner's public store",
outcome.appeared.length === 1,
`appeared=${JSON.stringify(outcome.appeared)}`,
"a document was nevertheless created, and its owner still holds it",
outcome.appeared.length === 1 && outcome.observed === "success",
`appeared=${JSON.stringify(outcome.appeared)} observed=${outcome.observed}`,
);
// What the leaked document IS: an index in every respect but the one that makes
// it usable. Alice found it in her own store — the only way anyone can, since
// `createIndex` threw its reference away.
// it usable. Alice found it among the documents she holds -- the only way anyone
// can, since `createIndex` threw its reference away.
const leaked = outcome.appeared[0];
if (leaked === undefined) {
check(