Skip to content

readShapeTier

readShapeTier(shape): ShapeTier

Defined in: packages/contracts/src/config.ts:464

The tier a shape declares, or a refusal.

The tier is not configured; it is read off which field the author declared — scope for shared, rowFilter for private. That makes a shape’s tier evident from its authoring and impossible to leave ambiguous, which matters because the two differ in whether their bytes are user-independent, and so in whether they may be shared and cached at all.

Declaring both is refused rather than resolved by precedence. A rowFilter fuses the subject into the predicate, which is exactly what makes a stream unshareable; silently letting it ride along on a shape declared as shared would produce a stream that is cached under a scope key while carrying subject-dependent bytes — a disclosure, not a stale row.

ShapeSpec

ShapeTier