-
Notifications
You must be signed in to change notification settings - Fork 2
fix(mcp): decayed trust score not persisted back to SQLite on read #2312
Copy link
Copy link
Closed
Labels
P3Research — medium-high complexityResearch — medium-high complexitybugSomething isn't workingSomething isn't workingmemoryzeph-memory crate (SQLite)zeph-memory crate (SQLite)
Description
Problem
TrustScoreStore::get_score() applies asymmetric decay in-memory at read time but does not write the decayed value back to SQLite. The next read will re-apply decay from the stale persisted value, causing over-decay if multiple reads happen within the same decay window.
Fix
Either persist the decayed score on read (UPDATE trust_scores SET score = ? WHERE server_id = ?), or track last_decay_at timestamp and compute decay only when advancing to a new window.
Priority
P3 — over-decay is conservative (makes scores lower, not higher), so it does not create a security hole but may cause unnecessary tool filtering.
Related: PR #2310
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3Research — medium-high complexityResearch — medium-high complexitybugSomething isn't workingSomething isn't workingmemoryzeph-memory crate (SQLite)zeph-memory crate (SQLite)