bijection/mounts.ts
bijection/app.ts
approvals.reviewer role. Reviewers decide at the
exposed paths approvals.decisions.decide, approvals.decisions.pending
and approvals.requests.history. Enrol a reviewer from your own mutation
with ctx.call(approvals.reviewers.enrol, { class, principal, kind }). Pass the
installer roles allowed to enrol reviewers and re-arm landings in operators.
To let another installer role withdraw requests, pass it in requesters.
Ask for a decision
ask(ctx, approvals, request, { once, within, then }) submits the mount’s
decided target in your transaction and returns its Task. The request
names the subject, a digest of exactly what reviewers approve, and the
requirement.
bijection/release.ts
Decision: status (approved or rejected), the request, the
digest, the effective requirement and the counted votes. A request
refused at ask (InvalidRequirement, …), a withdrawn ask (Withdrawn)
and a missed deadline (Expired) arrive as refusals.
Withdraw a pending ask with ctx.call(approvals.requests.withdraw, { task }).
It answers the request’s latch, so a decision that settled first wins.
Govern a landing
Pass a landingpolicy when you mount the app, and ask with
act: { kind: "land", branch }. The policy is a query answering the
seen version it approves. When the request is approved, the mount lands
exactly that version, and a branch that moved past it refuses Conflict.
See Review, approve and land a branch.
The purchase orders example
runs an approval as the first step of a chain.