Rip out Ollama: direct_route only, no LLM layer

Pete moves to a remote host without Ollama access. Every source must
declare a direct_route channel; the classifier, explainer, semantic
dedup, !explain summaries, feed_hint, and the recent_headlines /
classification_log tables are gone. Deterministic dedup (canonical URL,
headline_norm, per-channel cooldown) remains.
This commit is contained in:
prosolis
2026-05-24 22:07:13 -07:00
parent fbd4b84eaf
commit e88483526d
23 changed files with 146 additions and 1675 deletions

View File

@@ -58,7 +58,7 @@ func TestRunSeed_IngestsStories(t *testing.T) {
FeedURL: ts.URL,
Tier: 1,
PollIntervalMinutes: 20,
FeedHint: "tech",
DirectRoute: "tech",
Enabled: true,
},
},
@@ -74,13 +74,11 @@ func TestRunSeed_IngestsStories(t *testing.T) {
}
}
// Should have no unclassified stories (seed marks classified=true)
unclassified, err := storage.GetUnclassifiedStories("Test Feed")
if err != nil {
t.Fatal(err)
}
if len(unclassified) != 0 {
t.Errorf("expected 0 unclassified after seed, got %d", len(unclassified))
// Seed marks rows classified=1; confirm none remain unclassified.
var unclassified int
storage.Get().QueryRow(`SELECT COUNT(*) FROM stories WHERE classified = 0`).Scan(&unclassified)
if unclassified != 0 {
t.Errorf("expected 0 unclassified after seed, got %d", unclassified)
}
}
@@ -96,7 +94,7 @@ func TestRunSeed_Idempotent(t *testing.T) {
FeedURL: ts.URL,
Tier: 1,
PollIntervalMinutes: 20,
FeedHint: "tech",
DirectRoute: "tech",
Enabled: true,
},
},
@@ -139,35 +137,6 @@ func TestRunSeed_SkipsDisabledSources(t *testing.T) {
}
}
func TestRunSeed_RecentHeadlinesPopulated(t *testing.T) {
setupTestDB(t)
ts := serveFeed(t, 2)
defer ts.Close()
cfg := &config.Config{
Sources: []config.SourceConfig{
{
Name: "Test Feed",
FeedURL: ts.URL,
Tier: 1,
PollIntervalMinutes: 20,
FeedHint: "tech",
Enabled: true,
},
},
}
runSeed(cfg)
headlines, err := storage.GetRecentHeadlines(10)
if err != nil {
t.Fatal(err)
}
if len(headlines) != 2 {
t.Errorf("expected 2 recent headlines after seed, got %d", len(headlines))
}
}
func TestRunSeed_BadFeedURL(t *testing.T) {
setupTestDB(t)