-
Notifications
You must be signed in to change notification settings - Fork 1
fix(CODEWIKI-004): CU-86akhf8u6 6 review findings across 6 files #79
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
90571c5
95d761b
984ef94
41efe12
bb7294a
9cf3cc4
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 |
|---|---|---|
| @@ -1,5 +1,10 @@ | ||
| """ | ||
|
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. 𦩠π cli/utils/logging.py docstring is minimal relative to module's actual responsibility scope Expanded the module docstring at the top of codewiki/cli/utils/logging.py from a single line to a multi-line docstring enumerating CLILogger's responsibilities (debug/info/success/warning/error/step helpers for CLI output) and quiet_third_party_loggers()'s purpose (capping httpx/openai/anthropic loggers at WARNING), matching the suggested fix text exactly. No other code was changed. π€ Prompt for AI agentsfix confidence: π’ 95 high β react π/π to teach the reviewer |
||
| Logging utilities for CLI with colored output and progress tracking. | ||
|
|
||
| Provides CLILogger, a lightweight click-based logger with debug/info/success/ | ||
| warning/error/step helpers for user-facing CLI output, plus | ||
| quiet_third_party_loggers(), which caps noisy third-party HTTP/SDK loggers | ||
| (httpx, openai, anthropic) at WARNING so CLI runs stay readable. | ||
| """ | ||
|
|
||
| import logging | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,12 @@ | ||
| """Agent tool for reading the source code of specific CodeWiki components by id.""" | ||
|
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. 𦩠π security.py docstring present but validation.py and topo_sort.py inconsistently apply the same standard elsewhere in repo (spot check on read_code_components.py) Expanded the one-line module docstring at the top of π€ Prompt for AI agentsfix confidence: π’ 90 high β react π/π to teach the reviewer |
||
| """Agent tool for reading the source code of specific CodeWiki components by id. | ||
|
|
||
| This module exposes `read_code_components_tool`, a pydantic-ai Tool that the | ||
| documentation-generation agent calls to fetch the verbatim source code of one | ||
| or more components by their fully-qualified component id (module.path::Name). | ||
| It looks up components from the shared `CodeWikiDeps.components` map built | ||
| earlier in the pipeline and is used by the agent to ground its explanations | ||
| in actual source rather than hallucinated code. | ||
| """ | ||
|
|
||
| from pydantic_ai import RunContext, Tool | ||
| from codewiki.src.be.agent_tools.deps import CodeWikiDeps | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,13 @@ | ||
| """ | ||
| Analysis result models for the dependency analyzer. | ||
|
|
||
| Defines the Pydantic models used to represent the outcome of analyzing a | ||
| repository (functions, call relationships, file tree, and summary data) as | ||
| well as the NodeSelection model used for partial export of selected nodes. | ||
| These models are the primary data contract passed from the dependency | ||
| analysis stage to downstream documentation-generation and export stages. | ||
| """ | ||
|
|
||
| from pydantic import BaseModel | ||
|
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. 𦩠π analysis.py has no module docstring at all Added a triple-quoted module docstring at the very top of codewiki/src/be/dependency_analyzer/models/analysis.py, before the existing imports, describing the module's purpose (analysis result models) and role in the pipeline, exactly as suggested in the finding. No other lines were changed. π€ Prompt for AI agentsfix confidence: π’ 95 high β react π/π to teach the reviewer |
||
| from typing import List, Dict, Any, Optional | ||
| from codewiki.src.be.dependency_analyzer.models.core import Node, CallRelationship, Repository | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,13 @@ | ||
| """Backend utility helpers for the CodeWiki documentation pipeline. | ||
|
|
||
| Responsibilities: | ||
| - Complexity heuristics for module clustering (is_complex_module) | ||
| - Token counting via tiktoken for LLM context budgeting | ||
| - Extraction, validation, and persistence of Mermaid diagrams embedded in | ||
| generated markdown documentation, including error-window rendering for | ||
| diagnosing parser failures. | ||
| """ | ||
|
|
||
| import re | ||
|
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. 𦩠π codewiki/src/be/utils.py lacks a module-level docstring Added a triple-quoted module-level docstring at the very top of codewiki/src/be/utils.py, before the π€ Prompt for AI agentsfix confidence: π’ 95 high β react π/π to teach the reviewer |
||
| from pathlib import Path | ||
| from typing import List, Tuple | ||
|
|
@@ -402,4 +412,4 @@ def create_diagrams_readme(diagrams_dir: str, diagram_files: list) -> str: | |
| import asyncio | ||
| test_file = "output/docs/SWE_agent-docs/agent_hooks.md" | ||
| result = asyncio.run(validate_mermaid_diagrams(test_file, "agent_hooks.md")) | ||
| print(result) | ||
| print(result) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,13 @@ | ||
| #!/usr/bin/env python3 | ||
|
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. 𦩠π cache_manager.py module docstring is a one-liner and does not describe pipeline role Replaced the one-line module docstring at the top of π€ Prompt for AI agentsfix confidence: π’ 95 high β react π/π to teach the reviewer |
||
| """ | ||
| Cache management for documentation generation results. | ||
|
|
||
| This module maintains an on-disk index (cache_index.json) mapping repository | ||
| URLs to previously generated documentation output paths. It is used by the | ||
| web-app layer (codewiki/src/fe) to avoid regenerating documentation for a | ||
| repository that was already processed within the configured expiry window, | ||
| including cache lookup, insertion, expiry cleanup, and recovery from a | ||
| corrupted index file. | ||
| """ | ||
|
|
||
| import hashlib | ||
|
|
@@ -126,3 +133,4 @@ def cleanup_expired_cache(self): | |
|
|
||
| if expired_entries: | ||
| self.save_cache_index() | ||
|
|
||
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.
𦩠π config_manager.py module docstring is a one-liner despite implementing complex keyring/file persistence logic
Replaced the one-line module docstring at the top of
codewiki/cli/config_manager.pywith a multi-line docstring enumerating ConfigManager's responsibilities (config file persistence, per-role keyring-backed API key storage, validation, clear/delete operations) and its role as the integration point for the CLI config commands, matching the suggested fix exactly. No functional code was changed.π€ Prompt for AI agents
fix confidence: π’ 95 high β react π/π to teach the reviewer