From 90571c56dd661c9f9958f62bde274da00a358fe1 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 05:09:16 +0000 Subject: [PATCH 1/6] fix(CODEWIKI-004): 6 review findings across 6 files --- codewiki/src/be/dependency_analyzer/models/analysis.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/codewiki/src/be/dependency_analyzer/models/analysis.py b/codewiki/src/be/dependency_analyzer/models/analysis.py index 37c0d547..34bdb0bc 100644 --- a/codewiki/src/be/dependency_analyzer/models/analysis.py +++ b/codewiki/src/be/dependency_analyzer/models/analysis.py @@ -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 from typing import List, Dict, Any, Optional from codewiki.src.be.dependency_analyzer.models.core import Node, CallRelationship, Repository From 95d761b162c988b72c943a55cd3ff888d5e60782 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 05:09:18 +0000 Subject: [PATCH 2/6] fix(CODEWIKI-004): 6 review findings across 6 files --- codewiki/src/be/utils.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/codewiki/src/be/utils.py b/codewiki/src/be/utils.py index de3f4640..4f08954f 100644 --- a/codewiki/src/be/utils.py +++ b/codewiki/src/be/utils.py @@ -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 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) \ No newline at end of file + print(result) From 984ef94b7f6d20357c9907658878f85415450786 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 05:09:19 +0000 Subject: [PATCH 3/6] fix(CODEWIKI-004): 6 review findings across 6 files --- codewiki/cli/config_manager.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/codewiki/cli/config_manager.py b/codewiki/cli/config_manager.py index f93c10da..a5db6f4f 100644 --- a/codewiki/cli/config_manager.py +++ b/codewiki/cli/config_manager.py @@ -1,5 +1,16 @@ """ Configuration manager with keyring integration for secure credential storage. + +Responsibilities: + - Load and save non-sensitive CLI configuration (models, base URLs, API + versions, max tokens, temperature settings) to ~/.codewiki/config.json + - Store and retrieve per-role (cluster/main/fallback) API keys exclusively + through the system keyring, never persisting them to disk + - Validate configuration completeness before allowing pipeline execution + - Provide clear/delete operations that remove both file and keyring state + +This module is the single integration point between the CLI's config +commands and the underlying Configuration dataclass and system keyring. """ import json From 41efe1286c94076758f1eae6095dfa5f6b67fdfd Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 05:09:21 +0000 Subject: [PATCH 4/6] fix(CODEWIKI-004): 6 review findings across 6 files --- codewiki/src/fe/cache_manager.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/codewiki/src/fe/cache_manager.py b/codewiki/src/fe/cache_manager.py index 2ce6f9c7..d804973f 100644 --- a/codewiki/src/fe/cache_manager.py +++ b/codewiki/src/fe/cache_manager.py @@ -1,6 +1,13 @@ #!/usr/bin/env python3 """ 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() + From bb7294a9f92026dd0aaadd84d0a941e81bcd6787 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 05:09:23 +0000 Subject: [PATCH 5/6] fix(CODEWIKI-004): 6 review findings across 6 files --- codewiki/cli/utils/logging.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/codewiki/cli/utils/logging.py b/codewiki/cli/utils/logging.py index c882407f..31351ef1 100644 --- a/codewiki/cli/utils/logging.py +++ b/codewiki/cli/utils/logging.py @@ -1,5 +1,10 @@ """ 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 From 9cf3cc410cc7c631fbd017a9b33a9798cb690f22 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 05:09:25 +0000 Subject: [PATCH 6/6] fix(CODEWIKI-004): 6 review findings across 6 files --- codewiki/src/be/agent_tools/read_code_components.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/codewiki/src/be/agent_tools/read_code_components.py b/codewiki/src/be/agent_tools/read_code_components.py index cecb6429..c53f98fa 100644 --- a/codewiki/src/be/agent_tools/read_code_components.py +++ b/codewiki/src/be/agent_tools/read_code_components.py @@ -1,4 +1,12 @@ -"""Agent tool for reading the source code of specific CodeWiki components by id.""" +"""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