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: StringNormalized (lowercase, trimmed) query that produced this result.
verdict: FeedbackVerdict§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
impl FeedbackEntry
Sourcepub fn is_withdrawn(&self) -> bool
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.
Sourcepub fn is_inert(&self) -> bool
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.
Sourcepub fn is_expired(&self) -> bool
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.