Backend Contract Checks #
The planner admits a capsule only when its operation, device, provider, gradient mode, trust level, and contract claims match the kernel policy. The contract audit then looks inside the selected capsules: each of the four descriptors must rest on evidence the assurance policy accepts.
Acceptance repeats both checks at the execution boundary. This matters because PlannedKernel is
a public diagnostic record and can therefore be assembled directly by a caller. Accepted values
carry the successful gate as a proof field, and graph acceptance derives its grouped audit plan
from the graph plan instead of accepting unrelated groups from the caller.
One contract obligation of one selected backend kernel.
- op : BackendOp
- capsuleName : String
- obligation : ContractObligation
- claim : ContractClaim
- evidence : ContractEvidence
Instances For
Result of checking a plan audit against an assurance policy.
- accepted : ContractCheck
- rejected (reports : Array ObligationReport) : ContractCheck
Instances For
All contract obligations of a selected kernel.
Instances For
All contract obligations of all selected kernels.
Instances For
Obligations whose evidence the policy does not accept.
Instances For
Check every obligation of a plan audit against an assurance policy.
Instances For
Check every obligation of a selected plan against an assurance policy.
Instances For
Check every obligation of a grouped graph plan against an assurance policy.
Instances For
One reason a planned kernel cannot cross the execution boundary.
- operationMismatch
(planned capsule : BackendOp)
: AcceptanceFailure
The planned operation and the capsule's advertised operation differ.
- forwardUnsupported
(op : BackendOp)
(capsuleName : String)
: AcceptanceFailure
The capsule has no forward implementation.
- contractsMisaligned
(op : BackendOp)
(capsuleName : String)
: AcceptanceFailure
A contract descriptor states a claim for the wrong obligation.
- trustRejected
(op : BackendOp)
(capsuleName : String)
(trust : TrustLevel)
: AcceptanceFailure
The selected assurance policy does not admit the capsule's trust level.
- providerRejected
(op : BackendOp)
(capsuleName : String)
(provider : Provider)
: AcceptanceFailure
The provider policy excludes the capsule.
- deviceMismatch
(op : BackendOp)
(capsuleName : String)
(requested actual : Device)
: AcceptanceFailure
The capsule targets a different device.
- vjpMismatch
(op : BackendOp)
(capsuleName : String)
(requested actual : VJPMode)
: AcceptanceFailure
The capsule cannot satisfy the requested gradient mode.
- evidenceRejected
(report : ObligationReport)
: AcceptanceFailure
One contract descriptor rests on evidence rejected by the assurance policy.
Instances For
Instances For
Whether a directly supplied planned kernel satisfies the complete policy and evidence gate.
Instances For
Explain every failed part of the complete kernel acceptance gate.
Instances For
Explain every kernel that fails the complete policy and evidence gate.
Instances For
Whether every grouped kernel satisfies the complete policy and evidence gate.
Instances For
One planned operation whose capsule has passed the complete policy and evidence gate.
- op : BackendOp
The operation the kernel implements.
- capsule : KernelCapsule
The capsule that carries the kernel's contract claims and evidence.
- policy : KernelPolicy
The policy the capsule was checked against.
Evidence that the complete policy and evidence gate accepted this kernel.
Instances For
Construct an accepted kernel after the execution-boundary check succeeds.
Check a planned kernel and return a value that an executor can consume only on success.
Instances For
A graph kernel plan after grouping and contract checking.
- graphPlan : IR.GraphKernelPlan
The node-level plan whose selected contracts were checked.
- groupedPlan : GroupedKernelPlan
Audit groups derived from the node-level plan.
Grouping cannot substitute a different plan's contract evidence.
- policy : KernelPolicy
The policy applied to every audit group.
Every group passes the complete policy and evidence gate.
Instances For
Construct an accepted graph plan after every grouped kernel passes the execution gate.
Source IR node ids covered by the accepted grouped plan.
Instances For
Selected capsule names in accepted group order.
Instances For
Audit for the accepted grouped plan.
Instances For
Result of planning, grouping, and checking a graph.
- accepted (plan : AcceptedGraphKernelPlan) : GraphKernelPlanResult
- rejected (groupedPlan : GroupedKernelPlan) (failures : Array AcceptanceFailure) : GraphKernelPlanResult
Instances For
Instances For
Derive, check, and expose a grouped graph plan only when every selected kernel passes.
Deriving the groups here keeps the accepted audit tied to the exact graph plan that produced it.