Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Capability Admission

This document defines the capability gates that control runtime admission and profile selection.

Admission is not the same thing as current ownership. Admission answers whether a runtime/profile/configuration is allowed in principle. Ownership answers who may currently drive session-local host mutation for one live session or fragment.

Within the broader first-class protocol-critical capability model, admission is only one class beside ownership, evidence, and transition capability surfaces. Admission decides whether execution is allowed in principle. It does not itself prove current session authority or canonical semantic truth. It also does not provide a general-purpose application authorization system.

Gate Layers

Admission is enforced across Lean theorem-pack surfaces and Rust runtime checks.

LayerMain API
Lean theorem-pack facadeRuntime/Proofs/TheoremPack/API.lean
Lean capability inventoryRuntime/Proofs/TheoremPack/Inventory.lean
Lean admission logicRuntime/Adequacy/EnvelopeCore/AdmissionLogic.lean
Rust runtime gatesrust/machine/src/runtime_contracts.rs
Rust composition admissionrust/machine/src/composition.rs

The canonical cross-cutting capability taxonomy now lives in:

  • rust/machine/src/capabilities.rs
  • lean/Runtime/Proofs/Capabilities.lean

Runtime Gate Flow

Rust runtime admission uses a fixed gate sequence.

StepFunctionResult class
advanced mode checkrequires_protocol_machine_runtime_contractsboolean requirement
runtime admissionadmit_protocol_machine_runtimeAdmitted or RejectedMissingContracts
profile requestrequest_determinism_profileselected profile or None
unified gateenforce_protocol_machine_runtime_gatesAdmitted, RejectedMissingContracts, or RejectedUnsupportedDeterminismProfile

The unified gate is the admission decision used by higher-level runtime loaders.

Admission vs Ownership

These concepts are intentionally separate.

QuestionAdmission answersOwnership answers
can this runtime mode/profile be used?yesno
does this theorem-pack/runtime-contract inventory admit the feature?yesno
may this caller mutate session-local host state right now?noyes
does this caller hold current fragment/session authority?noyes

Practical consequence:

  • passing enforce_protocol_machine_runtime_gates(...) does not authorize session-local mutation
  • hosts still need a live ownership capability such as OwnedSession
  • stale-owner rejection can occur even when admission remains valid
  • a choreography uses Runtime, Audit declaration states external protocol dependencies. It does not replace runtime admission or ownership checks

Effect Interfaces vs Admission

Language-level effect interfaces and runtime admission solve different problems.

SurfaceMain question
effect declarationwhat typed host operation does the protocol depend on?
uses clausewhich named external interfaces may this protocol call?
admission gatemay this runtime/profile/configuration run at all?
ownership capabilitywho may currently drive one live session or fragment?

Nominal effect interfaces therefore narrow protocol dependencies without weakening theorem-pack admission or ownership enforcement.

Determinism Profiles

Determinism profiles are validated against artifacts and capability switches.

ProfileRust enumArtifact flag
fullDeterminismMode::Fulldeterminism_artifacts.full
modulo effect traceDeterminismMode::ModuloEffectsdeterminism_artifacts.modulo_effect_trace
modulo commutativityDeterminismMode::ModuloCommutativitydeterminism_artifacts.modulo_commutativity
replayDeterminismMode::Replaydeterminism_artifacts.replay

Non-full profiles also require can_use_mixed_determinism_profiles.

Theorem-Pack Capability Inventory

The theorem-pack inventory publishes machine-readable capability keys.

Inventory familyExample keys
protocol safety and livenesstermination, output_condition_soundness
distributed impossibility and safetyflp_impossibility, cap_impossibility, quorum_geometry_safety
distributed deployment familiespartial_synchrony_liveness, reconfiguration_safety, atomic_broadcast_ordering
advanced envelope familiesconsensus_envelope, failure_envelope, protocol_machine_envelope_adherence, protocol_machine_envelope_admission, protocol_envelope_bridge
classical transport familiesclassical_foster, classical_maxweight, classical_ldp, classical_functional_clt

Rust capability snapshots should align with this inventory for release and admission claims.

Transported Theorem Boundary

Not every transported theorem family influences shipped runtime admission. Telltale now tracks that boundary explicitly in Lean and Rust.

Usage classMeaningCurrent examples
runtime_critical_instantiated_premisematerially influences a shipped runtime gate/guarantee surfaceprotocol_machine_envelope_adherence, protocol_machine_envelope_admission, protocol_envelope_bridge
black_box_premise_onlyused by verifier/reporting surfaces, but not consumed directly by shipped Rust runtime admissionflp_impossibility, quorum_geometry_safety, failure_envelope
documentation_background_onlycarried for theorem-program inventory/docs onlyclassical_foster, classical_functional_clt

The canonical ledger lives in:

  • lean/Runtime/Proofs/TheoremPack/AdmissionBoundary.lean
  • rust/machine/src/runtime_contracts.rs

One runtime-critical theorem family is intentionally marked as a boundary rather than a shipped Rust admission dependency today:

  • byzantine_safety_characterization is consumed by a Lean theorem-pack gate alias, but Rust runtime admission does not currently use it. That gap is now explicit rather than implicit.

Source-Derived Rows

The following rows are source-derived and checked against telltale_machine::transported_theorem_boundary() by rust/bridge/tests/docs_contract_tests.rs.

KeyUsage classRust runtime admissionLean runtime gateAssumption boundary
byzantine_safety_characterizationruntime_critical_instantiated_premisenoyesLean theorem-pack gate only. Rust runtime admission does not currently consume this key.
protocol_machine_envelope_adherenceruntime_critical_instantiated_premiseyesyesnone
protocol_machine_envelope_admissionruntime_critical_instantiated_premiseyesyesnone
protocol_envelope_bridgeruntime_critical_instantiated_premiseyesyesnone

Composition Admission

Composed runtime admission in rust/machine/src/composition.rs enforces both proof artifacts and runtime gates.

RequirementFailure mode
link_ok_full compatibility evidenceMissingCompatibilityProof
runtime contracts for advanced modeMissingRuntimeContracts
required scheduler capabilityMissingCapability
required determinism capabilityMissingCapability
output-condition gating capabilityMissingCapability
memory budgetBudgetExceeded

This path guarantees that admitted bundles carry both semantic and operational evidence.

When composition metadata defines fragment or bundle boundaries, runtime ownership should derive from that metadata rather than from ad hoc host-side reconstruction. Admission decides whether the bundle may run. Ownership decides who may currently drive it.

Runtime Upgrade Admission

Typesafe runtime upgrade is treated as a specialized transition family layered on top of composition admission, not as an unmodeled host escape hatch.

The runtime-upgrade admission contract is carried by:

  • RuntimeUpgradeRequest
  • RuntimeUpgradeCompatibility
  • RuntimeUpgradeArtifact

An admitted upgrade must make the following transition requirements explicit:

RequirementCurrent Rust enforcement
execution-profile compatibilityRuntimeUpgradeExecutionConstraint validated in rust/machine/src/composition.rs
ownership continuity across the first cutoveroverlap check against the currently active member set
pending-effect treatmentPendingEffectTreatment must be explicit and fail closed on invalidated/blocked obligations
canonical publication continuityCanonicalPublicationContinuity rejects invalidation when continuity is required

The runtime records staged, admitted, committed-cutover, rolled-back, and failed artifacts explicitly. Those artifacts are replay-visible through ReconfigurationRuntimeSnapshot.runtime_upgrades.

Admission Diagnostics

Lean and Rust both expose structured rejection categories.

SurfaceRejection classes
Lean admission logicmaxDiffExceeded, eqSafeNotSupported, missingRequiredProfiles
Rust runtime gateRejectedMissingContracts, RejectedUnsupportedDeterminismProfile
Rust compositiontyped CompositionError variants with capability key strings

These categories are intended for machine-visible reporting and CI gate failures.

Governance and CI

Admission and capability drift are controlled by repository lanes.

CheckCommand
runtime capability gate shapejust check-capability-gates
theorem-pack release conformancejust check-release-conformance
Protocol-machine parity suitejust check-parity --suite
parity type and schema policyjust check-parity --types
consolidated parity policyjust check-parity --all