Skip to content

Handle authority

A resource result reaches a cell as a local handle. The handle names one slot and generation in that cell's handle table, while the nucleus holds the lineage that makes the entry authoritative. Handle meaning is local to its owning table. This page covers handle identity, activation, validation and rights.

Authority structure

flowchart TB
  subgraph NUC["NUCLEUS"]
    direction TB
    RES[("Resource lineage<br/>owner cell and epoch")]
    AUTH{{"Rights intersection"}}
    HREC[("Handle record<br/>slot, generation, state")]
    RES --> AUTH --> HREC
  end
  subgraph CELL["ONE CELL MONITOR"]
    direction TB
    HTAB[("Local handle table")]
    LOOK{{"Slot and generation check"}}
    HTAB --> LOOK
  end
  HREC -->|"installation authority"| HTAB
  LOOK -->|"validated local handle"| CALL["Admitted resource operation"]

The nucleus creates the lineage record first. The owner monitor installs the corresponding local entry and returns a receipt. The nucleus activates the resource and handle only after that receipt matches the cell epoch, resource generation, validation digest, slot and handle generation.

Local identity

A local handle carries these values:

Value Meaning
slot Index in one cell monitor's local table
generation Lifetime of that slot
owner_cell, owner_epoch Cell lifetime that owns the resource
rights Operations retained after all attenuation
borrowed_in_scope Call or task scope when the handle is a borrow

Validation joins the complete handle value to the table entry and its active nucleus record. The slot, generation, cell and epoch must all match. Reusing a slot under a later generation therefore leaves earlier handles stale.

Rights

The handle receives the intersection of four inputs:

exported interface rights
  ∩ admitted grant resource rights
  ∩ explicit attenuation
  ∩ channel method rights

An operation survives only when all four inputs carry its right, and resource creation requires invoke. The intersection can only retain or remove rights. See Channel authority for the sealed channel grant that supplies the final two runtime constraints.

Result boundary

A resource result contains handle_ref, slot and generation. Provider resource ids and runtime-language objects remain in the owner monitor. The local handle resolves through kernel authority each time it is installed or used.

Continue with Resource authority for the lineage that precedes handle activation and Handle import and export for the monitor-local table.