> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Architecture and execution boundaries

> What commits in a transaction, what runs outside it and what each result proves

Bijection's host is a kernel of five verbs over labelled facts, with one commit
label per transaction and one read-only frame. The SDK's verbs (`get`, `list`,
`insert`, `submit`, `grant` and the rest) are all expressed through those five.
Queries, mutations, reactions and continuations are the only code paths, and
every one of them runs inside the kernel's checks.

```mermaid theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
flowchart TB
    Client[Clients, CLI, agents] -->|query, watch, mutate, trial| Entry[Admission: allow, guards]
    Entry --> Txn[Transaction under one label]
    Feed[Feeds and reactions] --> Txn
    Txn --> Facts[Labelled facts and sys]
    Facts --> Watches[Watches]
    Watches --> Client
    Txn -->|submit| Tasks[Tasks]
    Tasks --> Via[Target execution: sends, role holders, mutations]
    Via -->|result| Continuation[Continuation, then]
    Continuation --> Txn
    Compute[External runtime] -->|results as writes| Txn
```

## Admission decides every entry

A call from outside enters a function only if the caller's grants hold its
entry, which the roles in the function's `allow` carry. Each offered grant is
judged on its own: the guards in scope see that grant (`a.offer`), and the
call is admitted if the grants that survive every guard still cover it
together. More grants preserve an allow at an unchanged policy snapshot,
except through a guard that reads holdings. A later grant can change a fact
that a guard reads and cause it to refuse every grant. A call nobody's role allows refuses
`Disallowed`. When a guard refusal blocks admission, the result is
`Forbidden` with the guard's path. [Guards](https://docs.bijection.com/access/guards.md) covers both policies.

Everything a decision used, such as grants, guard facts and the clock interval,
joins the transaction's read set and is checked again at commit. Revoking a
grant therefore conflicts with an in-flight transaction that relied on it.
[Access](https://docs.bijection.com/access) covers admission and labels.

## Commit scopes stay explicit

| Boundary | What it establishes |
| - | - |
| Mutation | Its writes, submits and grave acts commit together, or nothing does |
| Task | One committed intent toward a target, performed after the commit |
| Continuation | A new transaction that receives the task's `Result` |
| Feed landing | An observed page and its cursor commit together |
| Trial | Nothing: the call runs in a discarded world |

There is no transaction spanning an external service and Bijection. A rename
can commit while the service's answer is still pending. A confirmed rename can
precede the feed pass that observes it.

## Later steps are decided again

Each later step that commits, such as a task run, a retry, a continuation's
delivery or a background batch, decides its acts afresh, in its own
transaction, against the submitter's live grants. A grant that lapsed or was
revoked meanwhile refuses the step. Holding a task value grants nothing.

## Reads are validated by what they reveal

A reader is never aborted by a change it could not see. A change hidden above
the reader's label does not conflict with it, and an explanation, such as a
refusal or a `trial` report, is labelled by everything it read, so it cannot
reveal hidden data.

## Watches observe the head

A watched query reruns when the facts it read change, and its value advances
consistently. A query over feed-owned facts observes what the feed has landed;
it does not interrogate the external system. Pass a mutation result's
`version` as `seen` to a later call to read your own write.

## Bulk and specialist work runs externally

Bijection does not manage compute. Bulk transformations, model training,
simulations and specialist processing run on runtimes you configure. They read
identified inputs and return results that the app accepts as ordinary writes.
[External runtimes](https://docs.bijection.com/transforms/external-runtimes.md) explains the integration.

## Effects keep their identity

A lost answer changes what the caller knows, not what happened. Asking again
with the same `once` returns the original effect; a new `once` is a new
effect. Withdrawing a pending task is the grave act `ctx.withdraw`, and its
result is `Withdrawn`.

Continue with [the customer workflow](https://docs.bijection.com/start/tutorial), or read the
[request lifecycle](https://docs.bijection.com/clients/requests.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.