Expand description
Feedback store — durable (query, symbol, verdict) triples.
Agents and users record verdicts on search results via asd feedback mark
or the MCP feedback_mark tool. Verdicts are stored in the ASD sidecar
and applied as score adjustments in apply_feedback_adjustments.
§SQLite write-through cache
AsgFeedbackStore optionally holds a borrowed fts connection — when
present, list_all returns the SQLite cache (fast, ~0 git reads) and
record additionally writes to SQLite after the git commit. The git
object store remains authoritative: if SQLite is empty (e.g. first run
after git pull), we fall back to the git tree walk and re-populate the
cache as a side effect. Running asd index / asd reindex calls
sync_feedback_entries for a full reconciliation.
Structs§
Constants§
- DEFAULT_
FEEDBACK_ HALF_ LIFE_ DAYS - Default half-life for feedback boost decay, in days.
Traits§
Functions§
- decay_
factor - Pure decay function. Returns a multiplier in
[0.0, 1.0]for an observation ofage_daysagainsthalf_life_days. Uses the classical exponential decay:factor = 0.5 ^ (age / half_life). - decay_
for_ entry - Compute the decay multiplier for an entry whose
created_atis known, given the current time. Used at feedback-boost application time to scaleUsefulverdicts by age.