From 279c0eaa0aaa6fb8ca084bb0a3d39f950d416832 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 05:06:56 +0000 Subject: [PATCH 1/2] fix(CODEWIKI-003-2): 3 review findings in test_clustering_forced.py --- test_clustering_forced.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test_clustering_forced.py b/test_clustering_forced.py index a6918e0a..97c925cf 100644 --- a/test_clustering_forced.py +++ b/test_clustering_forced.py @@ -16,17 +16,17 @@ from codewiki.src.be.dependency_analyzer.models.core import Node from codewiki.src.config import Config -test_repo = "/Users/michaelassraf/Documents/GitHub/openframe-oss-tenant" +test_repo = os.getenv( + "TEST_REPO_PATH", + os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +) -config = Config( +config = Config.from_env( repo_path=test_repo, output_dir="/tmp/test", dependency_graph_dir="/tmp/test/deps", docs_dir="/tmp/test/docs", max_depth=2, main_model=os.getenv("MAIN_MODEL", "gpt-4o"), cluster_model=os.getenv("CLUSTER_MODEL", "gpt-4o"), fallback_model=os.getenv("FALLBACK_MODEL", "claude-opus-4-5-20251101"), - 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", "")), cluster_base_url="https://api.openai.com/v1", main_base_url="https://api.openai.com/v1", fallback_base_url="https://api.anthropic.com/v1", @@ -71,3 +71,4 @@ print(f" - {name}: {comp_count} components") print("\nšŸŽ‰ THE FIX WORKS! LLM followed the tag format!") sys.exit(0) + From 372df3d441e4ada0f14d2ac079239d5ac52361aa Mon Sep 17 00:00:00 2001 From: Michael Assraf Date: Mon, 7 Sep 2026 23:01:53 -0400 Subject: [PATCH 2/2] fix: Config.from_env does not exist - restore direct construction The branch swapped Config(...) for Config.from_env(...) and dropped the three *_api_key kwargs on the assumption that the factory resolves them from the environment. Config has no from_env: only from_args, from_web_job, from_cli and from_config_manager. The script raised AttributeError before reaching a test. Restore direct construction with the API-key kwargs. The valuable part of this PR - replacing the hardcoded /Users/... path with a TEST_REPO_PATH lookup - is unchanged, and the config now constructs. Co-Authored-By: Claude Opus 5 --- test_clustering_forced.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test_clustering_forced.py b/test_clustering_forced.py index 97c925cf..d3bfab0b 100644 --- a/test_clustering_forced.py +++ b/test_clustering_forced.py @@ -21,12 +21,15 @@ os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ) -config = Config.from_env( +config = Config( repo_path=test_repo, output_dir="/tmp/test", dependency_graph_dir="/tmp/test/deps", docs_dir="/tmp/test/docs", max_depth=2, main_model=os.getenv("MAIN_MODEL", "gpt-4o"), cluster_model=os.getenv("CLUSTER_MODEL", "gpt-4o"), fallback_model=os.getenv("FALLBACK_MODEL", "claude-opus-4-5-20251101"), + 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", "")), cluster_base_url="https://api.openai.com/v1", main_base_url="https://api.openai.com/v1", fallback_base_url="https://api.anthropic.com/v1",