under. A release is the one way down: a
reviewed edge from one label to a wider audience, with the message a person
reads. Using one is a disclosure, a grave act that is recorded.
bijection/payroll.ts
release({ from, to, message }) takes no name; its path is its name. Its
from is the label lowered from and to the audience lowered to.
An app may declare and use a release when every source label belongs to
its own app tree, including the apps it contains. A family member counts
under its family’s declaration. A component that needs to disclose data
from an installer label calls a passed, exported installer function. The
installer function performs its own reviewed release. The release appears
in the declaring app’s block in bijection.lock.
A declaration outside that scope refuses Invalid with
ReleaseOutsideApp. A performing site outside that scope refuses
Disallowed with GrantRequired.
Open a sealed value
bijection/bands.ts
releases. bijection check
reports DiscloseWrongRelease when the release does not cover the sealed
value’s label and DiscloseAbove when its audience is above the frame, and
the lock lists each path’s disclosures in its acts. A member release is
instantiated at the function’s under, so it works in a frame under
people.of(id).
Lowering effects
Every way down names its release where it happens. The effect’s place is the label where the lowered value becomes visible:
The release must be in the
releases of the function performing the
effect. Inside ctx.call, that is the callee: a callee lowers only through
its own releases, and a caller’s releases never cross the call. Listing a
release in releases gives the function the right to use it, and the use
needs that right of the same function. Naming a release is a
permission, not an assertion. The host uses it only where it lowers
something, and a release that lowers nothing is unused and records
nothing. bijection check reports ReleaseUnneeded when it can see that a
release never lowers anything at its site.
A release to one member of a family, release({ from: people.all, to: people, message }), takes its member from the place. A write at
people.of(id) releases to that person only, and never to a sibling. A
place that names no member and no stem of the family has no audience for
it (ReleaseNotInForce). The function holds the right to use a member
release at that member only, and each use records the member.
insert at a key, replace, patch, delete) reads its
place, so the place must be at or below under (NotAtCommitLabel). With a
release it may be lower. Without one it is exactly under.
Lowered writes, submits and landings record one disclosure per use in the
commit that publishes the effect, even when separate uses have equal payloads.
For an open, the host judges
act.disclose on the committed basis and appends an openAuthorization
record before unsealing. A clear archive copy uses the same record kind.
This records authorization and can survive a failed open, ctx.try rollback,
abort or timeout. A release fact of sys.disclosures holds release, as,
asFor (the person as acts for), the call chain, survivors (the grant
IDs by deciding position), at, from (the source), to (the place),
removed (the clauses this use removed), member for rate rules, and
members (all bound members, keyed by family). The record is stored at the function’s under and is
permanent.
The host records a shared: true limit’s judgement and a declared
family-stem unique claim verdict at the deciding label. A unique verdict has
judgement admitted or refused and names its Release, table and index.
An ordinary write or landing can disclose one hidden verdict per request.
Bound how often a release may disclose with the
rate rule over its disclosure records.
Shared claims
An import that lowers what it brings in uses an ordinary release. Only the
importing function lists it in releases, so only that function can use it.
A use of a release is judged by the installation’s act.disclose guards
and by the performing function’s right to use it, on the transaction’s
original version. Every frame
holds the installation’s admitted contract, so these checks always run. A
release the performing function does not declare refuses with Disallowed
(reason GrantRequired), and so does a release that a send or a replayed
task cannot apply. A lowering in a query refuses with Invalid (reason
MutationRequired), since lowering is mutation-only.
A lowered value is stamped with the place’s units and with every unit the
transaction opened, so erasing a source destroys the lowered copy. A file
lowered to the public label that inherits units is stored sealed, so that
the erasure still reaches it. A release never keeps a copy past an erasure:
survival is the destination’s declaration. A table, target, receiver
operation or run mutation that declares survives: { from, message } keeps
what is written to it past the erasure of the units it covers. Erasing the
member always destroys the member’s copy.
Declare survives: { reply: true, message } on the landing table when a task
continuation lands an answer that must survive
ctx.erase(ctx.frame.on.task). No write names it. It sheds the delivered
reply’s unit, when the task has one, and the units recorded on that task’s
request. It also covers native staging Files that carry that exact reply.
The assembled File gets its own closable unit. Other dependencies acquired
by reading separate facts and Files still apply. A follow-up submitted to a
destination that declares the reply survival sheds them from its request and
its initial then arguments. For arguments bound by a later await, use the
handler’s declaration. Both obligations retain the recorded request units.
A same-app page or upstream eraser uses the actual destination’s survival.
Across mounts the submitting app can declare a direct target({ via: T, survives }).
The task still goes to T under its ordinary admission. Keep the destination’s
audience explicit and name the release whenever the submit lowers to it.
A lowered dependency stays bound unless { from } covers every authenticated
original release source.
Standing releases
Two declarations attach a standing release to writes:- Presence.
presence: { label, field, release }labels a fact’s existence, key and listed fields below the fact’s label; the fields stand under the standing release. See Presence below the fact. - Timed lowering.
labelSwitchfrom@bijectionhq/library-label-switchsubmits a task due at an instant; the task changes the fact’s label field through the release. See Eventual labels.
Audited returns
A query may return a value above the public label to exactly one caller, a function, through a call release:caller is the receiving function’s value. The query lists the release in
releases, and the lock records it as release call … with its message.
Guard a disclosure
act.disclose(release) scopes a guard to every use of a
release, whatever effect uses it. It sees the frame’s roots, release,
to (the place, as its set of tags) and member (the member a member
release read off the place, or none):
rate(release, { uses, per })
from @bijectionhq/library-policies refuses a use once the release’s
sys.disclosures records hold uses uses within the window per:
Sending outside
Work outside the transaction is a target: the submitting mutation commits its intent atomically with its writes. Anact.submit(target) guard can refuse the submit, inspecting its args. The
args travel at the function’s under. A send whose destination is cleared
for less names a release, ctx.submit(target, args, { release }), and the
destination’s clearance is its place. A synced table’s facts
belong to their source: its facts’ labels set who reads them locally.
Files
A stored file’s bytes and metadata follow its label, andctx.get(file.bytes) sees the bytes within the frame’s clearance. See
File storage.