diff --git a/test_clustering_debug.py b/test_clustering_debug.py index 4b635cf6..63ee67f6 100644 --- a/test_clustering_debug.py +++ b/test_clustering_debug.py @@ -83,7 +83,7 @@ def print_summary(self): ) # Create config via factory (not direct construction) to satisfy validation/env-resolution -config = Config( +config = Config.from_args( repo_path=test_repo, output_dir="/tmp/codewiki_test", dependency_graph_dir="/tmp/codewiki_test/deps", diff --git a/test_clustering_local.py b/test_clustering_local.py index c59e8e31..4e4dfadf 100644 --- a/test_clustering_local.py +++ b/test_clustering_local.py @@ -59,7 +59,7 @@ def test_clustering(results): print(f"\nšŸ“‚ Test repository: {test_repo}") # Create minimal config via the required factory method - config = Config( + config = Config.from_args( repo_path=test_repo, output_dir="/tmp/codewiki_test_output", dependency_graph_dir="/tmp/codewiki_test_output/deps", diff --git a/test_subdirectory_fix.py b/test_subdirectory_fix.py index dfd22961..0cbc9dc8 100644 --- a/test_subdirectory_fix.py +++ b/test_subdirectory_fix.py @@ -12,8 +12,9 @@ from codewiki.src.be.documentation_generator import DocumentationGenerator from codewiki.src.config import Config -# Create minimal config -config = Config( +# Create minimal config via the from_args factory to preserve env-var +# resolution, defaulting, and validation guarantees (CODEWIKI-007). +config = Config.from_args( cluster_api_key=os.getenv("CLUSTER_API_KEY", os.getenv("OPENAI_API_KEY", "")), main_api_key=os.getenv("MAIN_API_KEY", os.getenv("OPENAI_API_KEY", "")), fallback_api_key=os.getenv("FALLBACK_API_KEY", os.getenv("ANTHROPIC_API_KEY", "")),