Expand description
AXON Runtime — LeaseKernel (§λ-L-E Fase 3.2)
Direct port of axon/runtime/lease_kernel.py.
τ-decay token manager implementing Decision D2:
- Compile-time: a lease references an
affineorlinearresource. The type checker already rejectedpersistentleases (no τ to decay). - Runtime:
acquireemits a revocableLeaseTokenwith explicit τ (acquired_at,expires_at). Post-expiryuseraisesLeaseExpired(CT-2 Anchor Breach) unless a permissive policy is set. - Policy:
on_expire ∈ {anchor_breach, release, extend}.
The kernel is an in-process registry; distributed coordination is deferred to a later phase.
Structs§
- Lease
Kernel - In-process registry of active leases.
- Lease
Token - A single-use capability over a resource, valid only while τ is in the
[acquired_at, expires_at)window. The token is effectively frozen — extension is implemented by minting a new token and revoking the old, preserving the linearity invariant.
Enums§
- UseOutcome
- Return value from
LeaseKernel::use_token:
Functions§
- parse_
duration - Convert an Axon duration literal into fractional seconds.
Type Aliases§
- Clock
- Pluggable wall-clock. Defaults to
Utc::now; tests inject a controllable clock to verify τ-decay without sleeping.