Skip to main content

RecordAdmission

Struct RecordAdmission 

Source
pub struct RecordAdmission {
    pub conversation_id: ConversationId,
    pub participant_id: ParticipantId,
    pub capability_generation: Generation,
    pub record_admission_attempt_token: RecordAdmissionAttemptToken,
    pub payload: Vec<u8>,
}
Expand description

Ordinary record-admission body (0x0007).

Fields§

§conversation_id: ConversationId

Conversation receiving the record.

§participant_id: ParticipantId

Verified sender participant.

§capability_generation: Generation

Presented nonzero credential generation.

§record_admission_attempt_token: RecordAdmissionAttemptToken

Client-selected identity of this record-admission request attempt.

§It must be minted once per RECORD, not once per presentation

This token is the client’s half of ordinary-admission idempotence (contract amendment A2, §0.13). The server deduplicates on the identity triple (token, payload fingerprint, verified participant), so an answer-lost re-present is answered with the original commit only if it arrives carrying the SAME token.

Mint it once when the record is staged, persist it beside the staged bytes, and re-present that exact token after a lost answer — the write-ahead discipline R-C0 already requires for the tokenized families, applied one layer up.

Deriving it per presentation from anything that can change between attempts silently defeats this. That is not hypothetical: in the field (2026-08-08, conversation 6) a client derived the token per presentation with the CURRENT capability generation as an input, a recovery attach rotated the generation 4 -> 6 between the two presentations, and the same bytes arrived under two different tokens — committing a byte-identical second copy at a new sequence.

The server cannot close this from its side, and deliberately does not try: two intent-distinct sends of the same body also carry distinct tokens and MUST remain two commits, so any dedup keyed on payload bytes alone would collapse a legitimate pair. Both halves are pinned in tests_record_admission_dedup.

Re-enrolling changes the verified participant and therefore the triple, so it defeats dedup by design.

§payload: Vec<u8>

Opaque application payload; it is never echoed in a response envelope.

Trait Implementations§

Source§

impl Clone for RecordAdmission

Source§

fn clone(&self) -> RecordAdmission

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RecordAdmission

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for RecordAdmission

Source§

impl PartialEq for RecordAdmission

Source§

fn eq(&self, other: &RecordAdmission) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for RecordAdmission

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.