From 8a15b083a072db35b0a09c8a072b8faddaa3764b Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Mon, 3 Aug 2026 19:12:19 +0000 Subject: [PATCH] Raise default LLM concurrency --- internal/cli/example_contract_test.go | 3 +++ internal/core/config/config.go | 8 +++++--- internal/core/config/file_config_contract_test.go | 6 +++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/internal/cli/example_contract_test.go b/internal/cli/example_contract_test.go index 0b5db7c..d70b33d 100644 --- a/internal/cli/example_contract_test.go +++ b/internal/cli/example_contract_test.go @@ -24,6 +24,9 @@ func TestMaintainedExamplesLoadResolveAndList(t *testing.T) { for _, example := range maintainedExampleFiles(t) { t.Run(example.name, func(t *testing.T) { cfg := loadMaintainedExample(t, example.path) + if example.name == "complete" && (cfg.Concurrency.TotalLLM != 2 || cfg.Concurrency.StageWorkers["extract"] != 2) { + t.Fatalf("complete example concurrency = %#v, want explicit limits of 2", cfg.Concurrency) + } raw, err := os.ReadFile(example.transcriptPath) if err != nil { t.Fatalf("read maintained transcript %q: %v", example.transcriptPath, err) diff --git a/internal/core/config/config.go b/internal/core/config/config.go index c545ed6..dd94950 100644 --- a/internal/core/config/config.go +++ b/internal/core/config/config.go @@ -34,6 +34,8 @@ type ConcurrencyConfig struct { defaultedExtractWorkers int } +const defaultLLMConcurrency = 16 + type OutputConfig struct { Directory string `json:"directory"` } @@ -60,9 +62,9 @@ func Default() Config { return Config{ Pipelines: map[string]pipeline.PipelineProfile{}, Concurrency: ConcurrencyConfig{ - TotalLLM: 1, - StageWorkers: map[string]int{"extract": 1}, - defaultedExtractWorkers: 1, + TotalLLM: defaultLLMConcurrency, + StageWorkers: map[string]int{"extract": defaultLLMConcurrency}, + defaultedExtractWorkers: defaultLLMConcurrency, }, Output: OutputConfig{Directory: "./notarius-output"}, Cache: CacheConfig{ChunkPlans: ChunkPlanCacheConfig{Mode: pipeline.ChunkCacheAuto}}, diff --git a/internal/core/config/file_config_contract_test.go b/internal/core/config/file_config_contract_test.go index dc0dba6..31d6d69 100644 --- a/internal/core/config/file_config_contract_test.go +++ b/internal/core/config/file_config_contract_test.go @@ -14,7 +14,7 @@ import ( func TestDefaultReturnsDocumentedValuesAndIndependentMaps(t *testing.T) { first := Default() - if first.Concurrency.TotalLLM != 1 || first.Concurrency.StageWorkers["extract"] != 1 { + if first.Concurrency.TotalLLM != 16 || first.Concurrency.StageWorkers["extract"] != 16 { t.Fatalf("concurrency defaults = %#v", first.Concurrency) } if first.Output.Directory != "./notarius-output" || first.Debug.Directory != "./notarius-debug" { @@ -31,7 +31,7 @@ func TestDefaultReturnsDocumentedValuesAndIndependentMaps(t *testing.T) { first.Concurrency.StageWorkers["other"] = 100 first.Pipelines["changed"] = pipeline.PipelineProfile{} second := Default() - if second.Concurrency.StageWorkers["extract"] != 1 || len(second.Concurrency.StageWorkers) != 1 || len(second.Pipelines) != 0 { + if second.Concurrency.StageWorkers["extract"] != 16 || len(second.Concurrency.StageWorkers) != 1 || len(second.Pipelines) != 0 { t.Fatalf("Default() returned state shared with an earlier result: %#v", second) } } @@ -45,7 +45,7 @@ func TestFileConfigMinimalVersion4AppliesOverDefaults(t *testing.T) { if cfg.Output.Directory != "./notarius-output" || cfg.Debug.Directory != "./notarius-debug" || cfg.Cache.ChunkPlans.Mode != pipeline.ChunkCacheAuto { t.Fatalf("minimal file changed unrelated defaults: %#v", cfg) } - if cfg.Concurrency.TotalLLM != 1 || cfg.Concurrency.StageWorkers["extract"] != 1 || len(cfg.Pipelines) != 0 { + if cfg.Concurrency.TotalLLM != 16 || cfg.Concurrency.StageWorkers["extract"] != 16 || len(cfg.Pipelines) != 0 { t.Fatalf("minimal file did not retain defaults: %#v", cfg) } }