From 0d3f3c19d7c9464a7618eaf07ea201873901c172 Mon Sep 17 00:00:00 2001 From: ashisgreat22 Date: Sun, 22 Mar 2026 00:13:57 +0100 Subject: [PATCH] fix: add missing engines to defaultPortedEngines duckduckgo, github, reddit, and bing were registered in factory.go and config.go but missing from planner.go, so they were silently skipped when LOCAL_PORTED_ENGINES was not set. Co-Authored-By: Claude Opus 4.6 --- internal/engines/planner.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/internal/engines/planner.go b/internal/engines/planner.go index 66ff974..543f253 100644 --- a/internal/engines/planner.go +++ b/internal/engines/planner.go @@ -7,7 +7,7 @@ import ( "github.com/metamorphosis-dev/kafka/internal/contracts" ) -var defaultPortedEngines = []string{"wikipedia", "arxiv", "crossref", "braveapi", "qwant"} +var defaultPortedEngines = []string{"wikipedia", "arxiv", "crossref", "braveapi", "qwant", "duckduckgo", "github", "reddit", "bing"} type Planner struct { PortedSet map[string]bool @@ -89,9 +89,15 @@ func inferFromCategories(categories []string) []string { set["wikipedia"] = true set["braveapi"] = true set["qwant"] = true + set["duckduckgo"] = true + set["bing"] = true case "science", "scientific publications": set["arxiv"] = true set["crossref"] = true + case "it": + set["github"] = true + case "social media": + set["reddit"] = true } } @@ -100,7 +106,7 @@ func inferFromCategories(categories []string) []string { out = append(out, e) } // stable order - order := map[string]int{"wikipedia": 0, "braveapi": 1, "qwant": 2, "arxiv": 3, "crossref": 4} + order := map[string]int{"wikipedia": 0, "braveapi": 1, "qwant": 2, "duckduckgo": 3, "bing": 4, "arxiv": 5, "crossref": 6, "github": 7, "reddit": 8} sortByOrder(out, order) return out }