Expand description
HOW an artifact family’s addresses END — the extension word’s six forms, as a model.
A blob’s address is <slot>/<seg1>/…/<segN>[.<ext>], and the suffix is the one part of it that
does not come from the key. It exists for browsability — a human opening the store’s directory
sees 12.png rather than 12 — and for the hosts that read a type off a name.
§Six forms, four keys, and why the count is what it is
extension = "png" static
(omitted) extensionless
extension(from = "format", any_of = ["png", "jpg"]) a String column, output-fenced
extension(from(field = "format", type = "app::Format")) an enum column, full set
extension(from(…), variants = ["app::Format::Png", …]) an enum column, a subset
extension(from(…), with = "app::suffix_of") the author's own renderTwo spellings were REFUSED in the design and are refused by the parser: a bare array
(extension = ["png", "jpg"]) cannot answer which one is entry 42, so a family with several
suffixes has to say what decides; and the parenthesized single value (extension("png")) is a
single fact, which this grammar writes as a key-value everywhere else.
§The two fences point in opposite directions, which is why there are two words
variants is an INPUT fence — WHICH values of the column are
admitted — and only the enum road has one, a subset of a type’s variants being the only input set
this grammar can name. any_of is an OUTPUT fence — which SUFFIXES may
be produced — and it is REQUIRED on the string road, where nothing else bounds what a column
holds. On the enum road the full variant set already fences the input by construction, so
any_of there is an extra promise about the rendering rather than the only one there is.
Both compose with with, which is the whole reason they are separate
words: a hook takes the column value (fenced by variants) and returns a suffix (fenced by
any_of).
§The column is the ENTITY’s, and it is a PURE INPUT
from names a column the locate-field resolver already holds hydrated — self — so a dynamic
suffix costs no round trip and the zero-I/O pin on locate survives intact. What it does NOT
survive on its own is the WRITE side: the lane renders the stored name from
upstream(…, extension = "<upstream field>"), and the framework cannot prove at read time that the
two are the same source. That seam is documented law with three mitigations, one of which — a
framework-written materialization that is same-source by construction — is reserved and not built.
Structs§
- Column
Extension - A suffix decided PER ENTRY — the block form, in all four of its shapes.
Enums§
- Extension
- HOW this artifact family’s addresses end.
- Extension
Source - WHICH column an artifact family reads its suffix out of, and how the column’s type is known.
Constants§
- EXTENSION
- The word itself, spelled once.
Functions§
- admissible_
suffix - Whether
suffixcan be the tail of an address at all. - wrong_
kind - What an author who wrote
extensionon the wrong kind is told.