From c42236bc008e15be0ef8ccc0e68bea4d20c1db8e Mon Sep 17 00:00:00 2001 From: Sylvain Duchesne Date: Tue, 4 Aug 2026 18:14:53 +0200 Subject: [PATCH] =?UTF-8?q?test:=20l'inventaire=20du=20contrat=20est=20ten?= =?UTF-8?q?u=20par=20un=20test,=20plus=20=C3=A0=20la=20main?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit L'appendice « inventaire des exports pour diff » d'`api-contract.md` était périmé : il listait encore les internes du shim dans le namespace `storeRegistry` alors que l'entrée avait été réduite à sept fonctions. Or c'est précisément l'instrument qu'on diffe quand la surface bouge — et un inventaire périmé est pire qu'aucun, il se lit comme vérifié. Régénéré depuis les `export`, et désormais tenu par `vocabulary.test.ts` : si la liste et le code divergent, le test échoue. Le document suit le code au lieu de dériver. Au passage, le contrôle de vocabulaire suit maintenant `export * from`, ce qui lui a fait voir trois types qu'il ignorait — d'où le suffixe structurel `…Like` (`NgLike` = « ce qui a la forme de ng ») déclaré comme de la glue de typage et non un mot de domaine. 162 tests unitaires, typecheck src/test/e2e vert. --- docs/api-contract.md | 18 +++++++++++++++--- packages/client/test/vocabulary.test.ts | Bin 7440 -> 10620 bytes 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/api-contract.md b/docs/api-contract.md index a5620d6..389a2e5 100644 --- a/docs/api-contract.md +++ b/docs/api-contract.md @@ -607,8 +607,20 @@ Exported, but not SDK surface. Coding against these builds knowledge that migrat ## Appendix — full export inventory (for diffing) -`@ng-eventually/client` (from `index.ts`): types `Nuri`, `ReadCap`, `Scope`, `PrincipalId`, `NgLike`, `UseShapeLike`, `ShapeQuery`, `ShapeObservable`, `DocChange`, `DocChangeType`, `Unsubscribe`, `UnionSubject`, `VirtualUserRecord`, `RegistrySession`, `VirtualUserStorage`, `Deposit`, `PostOptions` (via namespaces), re-exported `ShapeType`, `BaseType`, `Schema`, `DeepSignalSet`, `NG`; values `ng`, `useShape`, `watchShape`, `init`, `initNg`, `subscribeDoc`, `subscribeDocs`, `docChangeType`, `escapeLiteral`, `escapeIri`, `assertNuri`, `isNuri`, `hasReadCap`; namespaces `inbox` (`post`, `postToDocument`, `shareCap`, `read`, `materialize`, `readSynced`, `processInbox`, `watch`), `docs` (`docCreate`, `sparqlUpdate`, `sparqlQuery`, `depositInto`), `readUnion` (`readUnion`), `storeRegistry` (`reservedAccount`, `resetRegistryCache`, `resolveAccount`, `ensureAccount`, `resolveWriteGraph`, `resolveScopeGraph`, `userInbox`, `isOwnInbox`, `createEntityDoc`, `userStoreDoc`, `openDocumentInbox`, `documentInboxAddress`, `myInboxes`, `addLink`, `readLinks`, `listMyEntityDocs`), `virtualUsers` (`ACCOUNT_STORAGE_KEY`, `IdentityStore`, `browserIdentityStore`). +*Generated from the `export` statements, and pinned by `packages/client/test/vocabulary.test.ts` — if this list and the code disagree, that test fails. It went stale once, still listing `storeRegistry`'s shim internals after the entry had been narrowed, which is what a hand-maintained inventory does.* -`@ng-eventually/client/polyfill` (from `polyfill.ts`): types `StoreRegistryDeps`, `EventuallyConfig`; values `configure`, `getConfig`, `resetConfig`, `configureStoreRegistry`, `getStoreRegistryDeps`, `resetStoreRegistry`, `setCurrentUser`, `getCurrentUser`, `getCaps`, `capFor`, `resetCaps`, `CapRegistry`, `shareCap`, `connectedUser`. +### `@ng-eventually/client` — `src/index.ts` -Not exported from either entry (internal, listed to preempt "why isn't X documented"): `nuri.targetOf` / `parseNuri` / `mintCap`, `subscribePhysicalDoc`, `machinery.*`, `open-repo.*`, `read-filter.*`, `reach.*`, `physical.*`, `access-log.*`, `outbox-log.*`, `connect.startConnect`. +```text +direct: BaseType, DeepSignalSet, DocChange, DocChangeType, InboxScope, NG, NgLike, Nuri, PrincipalId, ReadCap, Schema, Scope, ShapeObservable, ShapeQuery, ShapeType, UnionSubject, Unsubscribe, UseShapeLike, assertNuri, docChangeType, escapeIri, escapeLiteral, hasReadCap, init, initNg, isNuri, ng, readUnion, subscribeDoc, subscribeDocs, useShape, watchShape +docs: depositInto, docCreate, sparqlQuery, sparqlUpdate +inbox: Deposit, PostOptions, materialize, post, postToDocument, processInbox, read, readSynced, shareCap, watch +storeRegistry: createEntityDoc, documentInboxAddress, listMyEntityDocs, openDocumentInbox, resolveScopeGraph, resolveWriteGraph, userInbox +``` + +### `@ng-eventually/client/polyfill` — `src/polyfill.ts` + +```text +direct: CapRegistry, EventuallyConfig, RegistrySession, StoreRegistryDeps, VirtualUserRecord, VirtualUserStorage, capFor, configure, configureStoreRegistry, connectedUser, getCaps, getConfig, getCurrentUser, getStoreRegistryDeps, resetCaps, resetConfig, resetStoreRegistry, setCurrentUser, shareCap +virtualUsers: ACCOUNT_STORAGE_KEY, IdentityStore, VirtualUserStorage, browserIdentityStore +``` diff --git a/packages/client/test/vocabulary.test.ts b/packages/client/test/vocabulary.test.ts index f54332f9513edb80dc2a3fd101256a4150ab044d..2962e433197e455e5e62b2048492e77a263842cf 100644 GIT binary patch delta 2914 zcmb7GO^e$`7(Vq-ACi_(D5ZyYos!BMuiP98#mOclA%&DSf!*HL4jM}%d$Q6<)r{6_ z7NgK#P}tsj@41jee?k99en$^|-Wl0e!X{9I*R#^h`}sW2JHL(pJ^HJ<))0+G6uo)% z=a1@CMx+c0GPbH?TUR1Gu&Yw(Ihi_5)j0*xv$@}QNd4tPSa~KZS_ngW{sX`j-n$f+NW&ifI)dG$M0^1#0{#9^*Ti=1u2XkH|B zCJ{@ViAtLA@{3Qy#-E>rlTmQ;qCdSo=#S=u0bRf;f8s(LOR2)SLn?(`gf9!FgX5#e zL&{I?O!w$Eyj#;B+-*;&l!Cp~gz{V&YmQes4){21!j@IKmYbby`zdmTW$dq{NWRC$ z?TI1vYny(zvz!(c1wNoWry?aA=EBB{hglYkUR-{DY-<2M4a!99kt}i*_n~Cbcb4xx7Z|&O^H=k$m9FPp>!H-|wLxM@YkM7iB4R z0{9@%C@Eqy5~VuWI12M7iD)L`Q#iB*MHe)$in<)Tei>RvX!}0>3><6?Ih4+&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