Add the interests table and module (first-class interests, step 1)

Standing interests get a table of their own plus article_interests, the
per-run top-3 matches, and a pure rates() that derives each interest's
Beta-smoothed weight from current ratings the way feed affinity does.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K9PrjtUS16PAQve8D4bHgc
This commit is contained in:
2026-09-13 05:00:56 +00:00
co-authored by Claude Fable 5.1
parent e82f7b0d13
commit f0c0927ab8
4 changed files with 559 additions and 0 deletions
+6
View File
@@ -1689,6 +1689,10 @@ mod tests {
.execute(&pool)
.await
.unwrap();
sqlx::raw_sql(include_str!("../migrations/0013_interests.sql"))
.execute(&pool)
.await
.unwrap();
let rows = sqlx::query(
"SELECT article_id, issue_date, kind, source, label, value, event_at, user_id
@@ -1724,6 +1728,8 @@ mod tests {
"interest_embeddings",
"article_assessments",
"candidate_runs",
"interests",
"article_interests",
"users",
"sessions",
"config_changes",