fix: ShapeObservable rejoint la liste de suppression et le contrat dit le trou de refetch

ShapeObservable portait l'annotation honnete kind=invention level=none ref=none
mais siegeait sous l'entete SDK-SHAPED qui promet un equivalent cible pour chaque
symbole. Il passe sous la barriere POLYFILL-ERA, toujours exporte (des
applications l'ecrivent : examples/notebook, e2e/polyfill-entry.ts). ShapeQuery
reste SDK-SHAPED, son enregistrement existe.

Ce n'est pas un adaptateur de framework : il porte le filtre de capacites et la
republication a l'arrivee d'une capacite, deux emulations du portefeuille
partage. Il disparait donc avec lui, migration couplee et non suppression
independante.

Le contrat enonce aussi que refetch() n'a aucun equivalent enregistre : les cinq
champs annonces ne le comptent pas. C'est un fait sur l'enregistrement, pas sur
TanStack ni sur les intentions de NextGraph.

PATCH, par le precedent du 2026-09-28 : aucune signature ne change. Version
1.0.0-dev.13 -> 1.0.0-dev.14, entree dans le contrat concept et dans
docs/api-contract.md section 14, dans le meme commit.
This commit is contained in:
Sylvain Duchesne
2026-10-01 12:10:28 +02:00
parent acdaf8b246
commit 0cebf6e29a
4 changed files with 41 additions and 5 deletions
+29 -1
View File
@@ -118,7 +118,9 @@
export type { Nuri, NuriLike, PrincipalId } from "./model/types";
export { useShape } from "./surface/use-shape";
export { useShapeQuery } from "./surface/use-shape-query";
export type { ShapeQuery, ShapeObservable } from "./surface/use-shape-query";
export type { ShapeQuery } from "./surface/use-shape-query";
// `ShapeObservable` is exported from the POLYFILL-ERA block below, beside `configure`:
// it is `kind=invention level=none ref=none` and carries shared-wallet emulation.
// The ORM's one-shot read and its subscription-free write - WRAPPED, at upstream's own
// names and signatures, never re-exported. `surface/orm.ts` says what each wrapper adds,
// and which neighbours of theirs in `@ng-org/orm`'s entry are deliberately not here
@@ -195,6 +197,32 @@ export type {
GetObjectsLike,
InsertObjectLike,
} from "./model/types";
// `ShapeObservable` - what `useShapeQuery` returns - moved down here on 2026-10-01. It is
// `kind=invention level=none ref=none` (no upstream observable exists; the record behind
// `ShapeQuery` describes a SNAPSHOT shape, not an observable), so it never belonged under
// the SDK-SHAPED heading. It stays EXPORTED: applications genuinely write the type down
// (`examples/notebook/app.ts` holds one in a variable, returns it and takes it as a
// parameter; `e2e/polyfill-entry.ts` annotates it). Only the documenting section changes.
//
// It is NOT a framework adapter. It carries two pieces of shared-wallet emulation:
// - the CAPABILITY FILTER - `getSnapshot()` returns a view filtered by the capabilities
// held (`use-shape-query.ts`, `filterReadable` under `caps.isEnforcing()`);
// - the CAPABILITY-ARRIVAL RE-PUBLISH - a `getCaps().onChange(...)` subscription owned
// by the observable's own lifecycle and released with it.
// A capability arrives MID-SESSION only because the wallet is shared. In the target an
// identity holds its own wallet and its capabilities from the start: nothing to filter,
// no arrival to re-publish on. So `ShapeObservable` dies exactly WHEN THE SHARED WALLET
// DIES - a COUPLED migration with the shared wallet, not an independent symbol removal.
// Deleting the type and "using the hook" is not a step that stands alone.
//
// The announced form cannot carry what ours carries: a TanStack-shaped hook returning a
// snapshot has nowhere to hang a capability-arrival subscription, because the target
// does not need one.
//
// `refetch()` lives on it, and is the ONLY published way out of a read stuck pending.
// The recorded announcement lists five fields, `{ data, isPending, isSuccess, isError,
// error }`, and `refetch` is not among them: it goes with NO RECORDED COUNTERPART.
export type { ShapeObservable } from "./surface/use-shape-query";
// `RegistrySession` went with `getSession` (2026-08-12): it was published for exactly one
// reason — an application typed the session thunk it injected with it — and a published
// type whose signature is gone is a promise about the target that nothing keeps. Upstream a