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 <noreply@anthropic.com>
This commit is contained in:
ashisgreat22 2026-03-22 00:13:57 +01:00
parent b85a06cf11
commit 0d3f3c19d7

View file

@ -7,7 +7,7 @@ import (
"github.com/metamorphosis-dev/kafka/internal/contracts" "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 { type Planner struct {
PortedSet map[string]bool PortedSet map[string]bool
@ -89,9 +89,15 @@ func inferFromCategories(categories []string) []string {
set["wikipedia"] = true set["wikipedia"] = true
set["braveapi"] = true set["braveapi"] = true
set["qwant"] = true set["qwant"] = true
set["duckduckgo"] = true
set["bing"] = true
case "science", "scientific publications": case "science", "scientific publications":
set["arxiv"] = true set["arxiv"] = true
set["crossref"] = 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) out = append(out, e)
} }
// stable order // 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) sortByOrder(out, order)
return out return out
} }