What makes a table protected
A table is protected when it:- carries a label other than
label.public: a label, a label family, afamily.and(label), a fact rule (label.field,family.field) with any non-public outcome, or a field label such as a field sealed withlabel.seal(type); - is
erasable; or - declares a
lifetime.
label: label.public), not erasable and with no
lifetime is clear. A clear table’s indexes keep their fields in order at the
store, and every selection in Indexes works on it.
Orders that keep tokens
Every order of a protected table keeps a token instead of its fields: eachindex entry, each unique set and the key. A token is a keyed hash, drawn
from a key the installation’s custody holds, of the order’s values. It is
scoped to the installation, the table, the index and the place the fact sits
at (its label, or its member of a family). Within one place, equal values give
equal tokens. Tokens at two places never match.
Structural fields stay clear: the fact’s id, a series’ at (and the at of
its marks and dirty spans), and a timeline’s validFrom and validTo. An
order that leads with them keeps them clear and in order, and an order made
only of them is clear.
What a protected table answers
bijection/orders.ts
A refused shape names its three fixes:
bijection check lists the same shapes at their call sites, and the kernel
refuses them at the read. An order over t.accepted() merges the admitted
places at one Version, within the read’s 64-place cap.
Fix the place in the frame or the selection. An index with a declared
release: can serve the order across places.
Walk every fact: byId()
table.byId() selects every fact in fact-id order. Fact ids are random, so the
order discloses nothing and means nothing: the store walks it on every table,
protected or not, and ctx.page, .first(n) and ctx.count read it. Walk a
whole table this way to export, sweep or clear it, when the order does not
matter.
bijection/sweep.ts
Walk by valid time: structural walks
A selection whose equality ends inside an order’s leading structural fields, and that ranges or orders by one of them next, fixes no protected field: a structural walk. A series’ valid-time order isat, then its key, so
readings.where({ at: { from, to } }) and readings.by("at") select every
key’s samples by valid time with every verb, a family series’ within the
frame’s member. The store reads the valid-time range, and the kernel opens and
orders its facts; the read set is the whole range. A selection that fixes at and ranges over a key field is not one: it
is the kernel’s bounded evaluation.
Read a small set whole: .atMost(n)
ctx.list(selection.atMost(n)) returns every fact of the selection, filtered
and sorted, or refuses Limit (reason SelectionOverBound) when the selection
holds more than n facts.
bijection/history.ts
n candidate facts. It takes them from an exact
token lookup on an index whose fields are exactly the selection’s equality
fields: ["customer"] here. Without such an index, it takes them in the
table’s structural order (fact id, or valid time on a series or timeline), and
refuses once it passes n. Every candidate joins the read set, so a write to
any of them conflicts with the read. Declare the equality-only index each
bounded selection starts from.
Expose an order to the store
Declarestore: "clear" with a review message on an index to let the store
page, range and sort its listed fields at their existing place. The lock records
each exposure on an exposed line. The deployer’s live grants must clear every
label outcome of the table. App readers still need clearance for the fact’s label.
Erasable and lifetime tables keep their orders sealed, as do tables placed
at members of erasable families.
bijection/tickets.ts
queue and opened. The fact body, including summary, stays sealed.
For a ranked text projection, declare t.text({ store: "clear", message }) on
the field. The store can read the ranked copy of that field and derive postings
and corpus statistics. Other fields retain their existing protection.
For an erasable table or a table with a lifetime, the ordered values stay
sealed under each fact’s unit. For a range or sort over sealed values use
ctx.list(selection.atMost(n)). Fully bound equality lookups and structural
walks can still use their indexes.
For tables without these per-fact erasure obligations, a table with presence: { label: label.public, field, release } has this copy
without declaring it. Each index whose fields are all in presence.field, in
the key or structural is kept as an ordered copy through presence.release.
That is how an index over a public presence field serves public selections
(Presence below the fact).
On a non-closable table, the same declaration can expose a vector, a spatial
index, or a total. Use t.vector(n, { store: "clear", message }), the
spatial index entry with store: "clear" and message, or the same options
on a total entry. The lock lists what each projection discloses. Vector
projections expose the embeddings and filter values, and embeddings can
disclose their source text. Spatial projections expose geometry, location
cells, and partition values. Clear totals expose group keys and running
counts and sums. Comparing consecutive totals can disclose individual
contributions. On a protected table, the original fact body stays sealed.
Share a unique claim: release
A field list such as unique: [["email"]] claims the tuple at the row’s Place.
The object form names a specific family stem and a Release for the claim
verdict. Each judgement discloses taken(k) for a key a writer names at
that instant. A request with several candidate keys in one shared namespace
can learn the single verdict for the group. The verdict omits the holder,
member and failing tuple. A shared bound discloses remaining ≥ r for the
declared reserve it checks. The lock prints those predicates.
Cross-place uniqueness is a membership oracle. A shared bound is a
threshold oracle over the set of reserves printed in the lock.
Bound each shared claim or bound’s release with a
rate guard over its disclosure
records. Each answer is one judgement at the writer’s exact commit place, for
its acting principal and that release. One audit records the judgement at the
asking label. One blind record at the source names the release, outcome,
prober and asking label. The source record omits the key and reserve. Every
signed-out call is its own principal, so a guard that counts per principal
does not bound a public form’s availability check: count across principals,
size the bound for the traffic, or check after sign-in. Once the guard’s
window holds its limit, the request is refused Forbidden.
Use a registered request for a direct client or operator write that receives
the verdict. A named-world request settles its session receipt in Root at the
deciding label and advances the named world on success. A running task,
landing or unfunded inbox delivery can settle its own result as part of the
decision.
A registered reply remains tied to the original decision. A retry checks the
current claim declaration and Release, and that the function’s live grants
still carry the release.
Declare the verdict Release to resolve SharedClaimReleaseMissing, or use
Place-local uniqueness.
bijection/profiles.ts
What the store sees
The store holding a protected table sees:- one token per indexed tuple at each place. Equality, frequency and the number of facts within one place are visible; no token matches across places;
- random fact ids, commit stamps, valid-time bounds, and the partitions facts sit at;
- clear due instants of scheduled tasks, timed lowerings included;
- sealed fact bodies, and sealed tallies for totals;
- the clear values of a reviewed store exposure.
What it costs
- Writes. Each indexed write draws one token from custody per order and place.
- Bounded reads.
.atMost(n)opens up tonfacts in the kernel, and each of them joins the read set. - Totals. A total merges sealed per-fact contributions when it is read.
- Rankings. A reviewed text exposure can rank in the store. Sealed text, vector and spatial paths rank in the kernel.
- Exposure. The lock records the values disclosed by each projection.
Choose a shape
- Fix every field of an index by equality where you can, and give each lookup
its own index:
["customer"]beside["customer", "placed"]. - Read a small set whole with
.atMost(n): a customer’s orders, a ticket’s comments. - Keep counts and sums as a declared total,
not
ctx.count. - Walk a whole table with
byId()when its order does not matter, and a series across its keys by valid time. - Declare an index release only over fields you would publish: queues and times, not names or amounts.