Skip to main content
The six writes change an app’s tables. The host’s own facts, its sys tables, change only through the grave acts: one named verb on a mutation’s ctx for each. bijection check lists the grave acts of every function, and bijection.lock records them on each path, so a review of the lock shows every function that can grant a role, erase a unit or land a branch. Grave acts run in mutations. An act that requires an existing fact refuses Absent when the fact is missing or outside the frame’s clearance.

Read the facts

An ordinary grant is issued at the mutation’s exact commit label. Registering a fresh member issues its declared founder grant as part of registration. An optional release on revoke names a declared release when revoking below the commit label. Direct ctx.grant(pending, { token }) redemption runs at the bearer grant’s label. The Members library accepts new-member requests at public and queues redemption at the exact member. sys holds the facts the grave acts write: sys.grants, sys.tasks, sys.obligations, sys.branches, sys.pins, sys.holds, sys.disclosures, sys.erasures and sys.destructions (written by the host custody collector at erasable.custody). It also holds a platform fact that no act writes: sys.organizationRegistry. Sign-in trust, identity bindings and sessions are rows of sys.grants. Read them with the five reads like any table:
The system tables expose their write acts through ctx. Member and file retirement use ctx.retire. Data verbs that target a system fact refuse Disallowed with reason SysReadOnly.

Grants

ctx.grant and ctx.revoke are how roles reach principals. Grants covers roles, clear, include, issue and the members library that most apps use for them.

Disclosures

ctx.open(sealed) sees a sealed value within the frame’s clearance. A mutation can use ctx.open(sealed, { release }) to open through a declared release and record who did so and when in sys.disclosures. The release must lower from the value’s label to an audience the function’s under clears. bijection check reports incompatible labels.

Erasure

ctx.erase takes one family member, family.of(key), or the point of an erasable fact (table(fields, { erasable: true }), addressed by its minted key). It closes the unit in the same commit, writes a sys.erasures closure fact, and returns the Erasure point directly (there is no erase task and no continuation). Once a unit is closed, every read of it refuses Erased in every version and world. See Data lifetime. While a legal hold of the unit stands at any label, its reads still close at once, and the host custody collector delays physical destruction until the public hold cutoff passes and no standing hold remains, recording destruction in sys.destructions at erasable.custody.
ctx.hold keeps a unit from destruction and records why in sys.holds. See Legal holds.

Branches and pins

ctx.branch, ctx.land and ctx.discard are the branch acts. A landing’s continuation receives t.result(sys.land): the version the landing committed, or Conflict if the branch moved past seen. ctx.pin(version, { until }) keeps one version readable, and ctx.unpin(pin) lets it go. A pin never keeps a version past history: it is admitted within the installation’s retention (its shortest table history, at most 30 days), measured from the version’s commit. Without until it keeps the version to the end of retention, and an until past that end refuses BeyondHistory, naming the latest end. ctx.branch is admitted the same way from its version. A table’s pin option keeps the version or branch a fact names readable instead; see Time and retention. A version pin also keeps the Program installed at that version. Use { in: version, program: version } to replay a query at that version. See Replay the exact code.

Task answers

ctx.answer(task, result) and ctx.withdraw(task, { message }) settle tasks of targets performed by roles, or tasks a performer mutation left open. See Effects.

Guards on grave acts

Every grave act has a guard scope of the same name: act.grant(role), act.revoke(role), act.disclose(release), act.erase(), act.hold(), act.lift(), act.branch(), act.land(), act.discard(), act.pin(), act.unpin(), act.answer(target) and act.withdraw(target). A guard refuses the act when its predicate matches; see Guards.

Decided again

The kernel decides a deferred act such as a branch landing again at claim through the submitter’s grants recorded at submit that are still live. The then delivery uses the authority of the obligation that submit admitted.