-
Notifications
You must be signed in to change notification settings - Fork 1
fix(CODEWIKI-007): CU-86akhf8u6 3 review findings across 3 files #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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( | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π΄ Direct Config(...) instantiation bypasses required from_cli/from_args factory In π€ Prompt for AI agentsfix confidence: π‘ 65 medium β react π/π to teach the reviewer |
||
| config = Config.from_args( | ||
| repo_path=test_repo, | ||
| output_dir="/tmp/codewiki_test_output", | ||
| dependency_graph_dir="/tmp/codewiki_test_output/deps", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,8 +12,9 @@ | |
| from codewiki.src.be.documentation_generator import DocumentationGenerator | ||
| from codewiki.src.config import Config | ||
|
|
||
| # Create minimal config | ||
| config = Config( | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π΄ Config instantiated directly with positional/keyword args, bypassing from_args/from_cli factories In π€ Prompt for AI agentsfix confidence: π΄ 55 low β review closely β react π/π to teach the reviewer |
||
| # 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", "")), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
𦩠π΄ Direct Config(...) instantiation bypasses required classmethod factories
Changed the
Config(...)direct instantiation at the config-creation block toConfig.from_args(...), passing the same keyword arguments, so the comment claiming factory usage matches the actual call. This assumesConfig.from_argsexists incodewiki/src/config.pyand accepts the same keyword arguments as the constructor (repo_path, output_dir, dependency_graph_dir, docs_dir, max_depth, main_model, cluster_model, fallback_model, and the api_key/base_url fields). I could not viewcodewiki/src/config.pyto confirm the factory's exact signature or that it forwards these kwargs unchanged to validation/env-resolution logic β iffrom_argshas a different signature (e.g. it parsesargparse.Namespacerather than kwargs, or omits/renames some fields), this call will raise aTypeErrorat runtime. A complete fix requires inspectingconfig.pyto confirmfrom_args's actual signature and adjusting the call accordingly, or usingfrom_cliinstead if that is the kwarg-based factory.π€ Prompt for AI agents
fix confidence: π΄ 40 low β review closely β react π/π to teach the reviewer