Skip to main content

FeedbackEntry

Struct FeedbackEntry 

Source
pub struct FeedbackEntry {
Show 13 fields pub entry_id: String, pub symbol_id: String, pub symbol_qname: String, pub query: String, pub verdict: FeedbackVerdict, pub author: String, pub created_at: DateTime<Utc>, pub note: Option<String>, pub file_scope: Option<String>, pub expires_at: Option<DateTime<Utc>>, pub withdrawn_at: Option<DateTime<Utc>>, pub withdrawn_by: Option<String>, pub withdrawn_reason: Option<String>,
}
Expand description

A single feedback record: a (query, symbol, verdict) triple stored durably.

When file_scope is set the verdict applies to all symbols from files matching that glob pattern, not just the specific symbol. In that case symbol_id is a synthetic "fs_<uuid>" identifier and symbol_qname is left empty.

Fields§

§entry_id: String§symbol_id: String§symbol_qname: String§query: String

Normalized (lowercase, trimmed) query that produced this result.

§verdict: FeedbackVerdict§author: String§created_at: DateTime<Utc>§note: Option<String>§file_scope: Option<String>

File path or glob pattern (e.g. "App/Utility/**") that this verdict applies to. When set, the verdict is applied to all symbols whose file path matches this pattern for queries in the same query family.

§expires_at: Option<DateTime<Utc>>

Plan J t-014: optional expiry. When set, the verdict is ignored by apply_feedback_adjustments after this timestamp. Useful for false-positive feedback that should auto-decay (e.g. “this hit doesn’t belong here today, but might next quarter when the layout shifts”). None = persist forever (current default behavior for backward compat).

§withdrawn_at: Option<DateTime<Utc>>

When this verdict was retracted, and by whom. Set by asd feedback withdraw.

Distinct from expires_at on purpose — see DESIGN.md, “Feedback withdrawal — tombstone shape”. Expiry says this was right, it is no longer relevant; withdrawal says this was wrong, it should not have been recorded. Collapsing them would also make a withdrawal revivable by future-dating an expiry, which it must not be.

§withdrawn_by: Option<String>§withdrawn_reason: Option<String>

Optional free-text reason recorded with the withdrawal.

Implementations§

Source§

impl FeedbackEntry

Source

pub fn is_withdrawn(&self) -> bool

True once this verdict has been retracted.

Consumed by the same two ranking views as Self::is_expired, and deliberately NOT by list_all — a withdrawn verdict still explains why a past search ranked as it did.

Source

pub fn is_inert(&self) -> bool

True when this verdict should no longer influence ranking, for any reason. The single predicate the flat_* views consult, so a third lifecycle state added later has exactly one place to register itself rather than two call sites to remember.

Source

pub fn is_expired(&self) -> bool

Plan J t-014: true when expires_at is set and is in the past.

Consumed by FeedbackStore::flat_verdicts and flat_file_scope_verdicts, the two views that feed apply_feedback_adjustments — so a lapsed verdict loses its ranking influence. list_all deliberately does NOT filter on this: an expired verdict still explains why a past search ranked the way it did.

Trait Implementations§

Source§

impl Clone for FeedbackEntry

Source§

fn clone(&self) -> Self

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 FeedbackEntry

Source§

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

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

impl<'de> Deserialize<'de> for FeedbackEntry

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for FeedbackEntry

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.