Skip to main content

accept_candidate

Function accept_candidate 

Source
pub fn accept_candidate(
    memories: &MemoryRepo<'_>,
    request: AcceptCandidateRequest<'_>,
) -> LifecycleResult<MemoryId>
Expand description

Accept a candidate after validating lineage before any store write.

The durable candidate -> active transition and audit write are delegated to cortex-store so the two effects occur in one transaction, and the composed PolicyDecision is forwarded to the store boundary so the ADR 0026 contributor envelope fails closed on Reject / Quarantine.

request.proof_closure MUST be ProofState::FullChainVerified; the lifecycle layer refuses with LifecycleError::ProofClosureRefusal otherwise and no insert or accept is attempted. The stable invariant LIFECYCLE_ACCEPT_PROOF_CLOSURE_INVARIANT documents the refusal.