Give each tracker agent its own config
The tracker-mapping, common-pattern enrichment, and third-party disambiguation agents were all built from one shared TrackerAgentsConfig fed by a single tracker-mapping config slot. That forced a single AgentTimeout to be reused and patched per worker, and two unrelated max-turns fields to share one struct. Split the in-code config into TrackerMappingAgentConfig, TrackerEnrichmentAgentConfig, and DisambiguationAgentConfig, each with its own timeout and max-turns, and add dedicated tracker-enrichment and third-party-disambiguation provider slots (the latter resolving next to third-party-vetter). Enrichment and disambiguation fall back to the tracker-mapping slot when their own provider is unset, preserving single-config deployments. Drop the shared pkg/agentsbuild package and duplicate its small wiring into probod and proboctl so the two executables stay decoupled. Wire the new env vars, builder test coverage, and Helm values. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -76,7 +76,7 @@ type TrackerMappingAgentResult struct {
|
||||
}
|
||||
|
||||
func buildTrackerMappingAgent(
|
||||
cfg TrackerAgentsConfig,
|
||||
cfg TrackerMappingAgentConfig,
|
||||
pgClient *pg.Client,
|
||||
logger *log.Logger,
|
||||
) *agent.Agent {
|
||||
@@ -94,7 +94,7 @@ func buildTrackerMappingAgent(
|
||||
panic(fmt.Sprintf("cookiebanner: cannot build tracker identification output type: %s", err))
|
||||
}
|
||||
|
||||
maxTurns := cfg.MappingMaxTurns
|
||||
maxTurns := cfg.MaxTurns
|
||||
if maxTurns < 1 {
|
||||
maxTurns = defaultMappingMaxTurns
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user