From 71db58eb6650720bfadaa6696c5a445f2beeae05 Mon Sep 17 00:00:00 2001 From: ivanmilevtues Date: Tue, 4 Aug 2026 01:06:14 +0200 Subject: [PATCH 1/2] Update CodeBoarding dependency to 0.13.5 --- README.md | 4 ++-- action.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d8385e6..fe70adb 100644 --- a/README.md +++ b/README.md @@ -306,7 +306,7 @@ Review mode does not need `contents: write`: PR-specific generated files are sto | `mode` | both | `review` | `review` posts the PR architecture-diff comment; `sync` analyzes on push and commits the architecture (`analysis.json` + rendered docs) to `target_branch`, keeping it versioned and current. | | `github_token` | both | `${{ github.token }}` | Token for GitHub API calls; in review mode it posts or updates the PR comment. | | `push_token` | sync | `${{ github.token }}` | Token for sync-mode delivery. The workflow token can push when the workflow grants `permissions: contents: write`. Separate from `github_token` so commenting can use a GitHub App token while the push uses the workflow token. In `sync_strategy: pull_request` it also opens/updates the rolling PR, so it must additionally carry `pull-requests: write`. | -| `codeboarding_version` | both | `0.13.4` | CodeBoarding PyPI package version used as the analysis engine. Pin for reproducibility. | +| `codeboarding_version` | both | `0.13.5` | CodeBoarding PyPI package version used as the analysis engine. Pin for reproducibility. | | `depth_level` | both | empty (`2` for cold starts) | Analysis depth for first analysis and `force_full` rebuilds. Max depends on tier: **3** on the free hosted tier, **10** with a CodeBoarding license or your own `llm_api_key`. Once `.codeboarding/analysis.json` exists, its `metadata.depth_level` is the source of truth: sync runs incremental at the baseline depth, and review analyzes the PR head at the committed baseline depth so the diff is apples-to-apples (clamped to the tier max). | | `render_depth` | review | `1` | Display depth for the PR diagram. Keep `1` for a clean top-level view. | | `diagram_direction` | review | `LR` | Mermaid direction: `LR`, `TD`, `TB`, `RL`, or `BT`. | @@ -362,7 +362,7 @@ Full local pipeline: ```bash export OPENROUTER_API_KEY=sk-or-... -python -m pip install codeboarding==0.13.4 +python -m pip install codeboarding==0.13.5 codeboarding-setup --auto-install-npm scripts/run_local.sh --repo /path/to/repo --base --head ``` diff --git a/action.yml b/action.yml index 9a470ad..1f413dc 100644 --- a/action.yml +++ b/action.yml @@ -34,7 +34,7 @@ inputs: codeboarding_version: description: 'CodeBoarding PyPI package version used as the analysis engine. Pin for reproducibility; set to a newer released version to opt into newer engine releases.' required: false - default: '0.13.4' + default: '0.13.5' depth_level: description: 'Analysis depth for cold-start or force_full rebuilds. Max depends on tier: 3 on the free hosted tier, 10 with a CodeBoarding license or your own llm_api_key. Once .codeboarding/analysis.json exists, its metadata.depth_level is the source of truth: sync runs incremental at the baseline depth, and review analyzes the PR head at the committed baseline depth so the diff is apples-to-apples (clamped to the tier max). Empty (default): 2 for cold starts.' required: false From b88bb82534c5c11bd8410f415e8e81427bfdc5d3 Mon Sep 17 00:00:00 2001 From: ivanmilevtues Date: Tue, 4 Aug 2026 09:40:52 +0200 Subject: [PATCH 2/2] fix: stream engine progress logs in actions Amp-Thread-ID: https://ampcode.com/threads/T-019fcbb1-bdf5-76be-8cab-1a4b798b49cd Co-authored-by: Amp --- scripts/engine_adapter.py | 3 +++ tests/test_engine_adapter.py | 29 +++++++++++++++++++++++++++++ tests/test_sync_subcommands.py | 2 ++ 3 files changed, 34 insertions(+) diff --git a/scripts/engine_adapter.py b/scripts/engine_adapter.py index 32ef5cb..85fa50e 100644 --- a/scripts/engine_adapter.py +++ b/scripts/engine_adapter.py @@ -78,6 +78,7 @@ from diagram_analysis import RunContext, RunPaths from diagram_analysis.exceptions import IncrementalCacheMissingError from diagram_analysis.io_utils import write_fingerprint + from logging_config import setup_logging from static_analyzer import get_static_analysis from static_analyzer.analysis_cache import StaticAnalysisCache from static_analyzer.cluster_helpers import build_all_cluster_results @@ -85,6 +86,7 @@ BaselineUnavailableError = IncrementalCacheMissingError = _MissingEngine = type("_MissingEngine", (Exception,), {}) run_full = run_incremental = render_docs = None RunContext = RunPaths = None + setup_logging = None get_static_analysis = StaticAnalysisCache = build_all_cluster_results = None hash_repo_source_files = write_fingerprint = None @@ -718,6 +720,7 @@ def main(argv=None) -> int: os.environ.setdefault("CODEBOARDING_SOURCE", source) if args.cmd in _ENGINE_COMMANDS: _require_engine(args.cmd) + setup_logging(default_level=os.getenv("CODEBOARDING_LOG_LEVEL", "INFO")) try: if args.cmd == "base": run_base(args.repo, args.out, args.name, args.run_id, args.depth, args.source_sha) diff --git a/tests/test_engine_adapter.py b/tests/test_engine_adapter.py index d6a8763..433e7f9 100644 --- a/tests/test_engine_adapter.py +++ b/tests/test_engine_adapter.py @@ -91,6 +91,7 @@ def model_dump(self, **kwargs): da.exceptions = exc _preload("diagram_analysis.analysis_json", UnifiedAnalysisJson=_InitialUnifiedAnalysisJson) _preload("diagram_analysis.io_utils", write_fingerprint=lambda *a, **k: None) +_preload("logging_config", setup_logging=lambda **kwargs: None) _preload("agents.content_hash", hash_repo_source_files=lambda *a, **k: {}) _preload("agents") _preload("codeboarding_workflows.rendering", render_docs=lambda *args, **kwargs: None) @@ -113,6 +114,7 @@ def model_dump(self, **kwargs): "diagram_analysis.analysis_json", "diagram_analysis.exceptions", "diagram_analysis.io_utils", + "logging_config", "health", "health.models", "health.runner", @@ -219,6 +221,33 @@ def test_main_parses_depth_as_int(self): ) self.assertEqual(rf.calls[0]["depth_level"], 2) + def test_main_enables_engine_console_logging(self): + self._install() + setup_logging = _Rec() + with ( + patch.object(engine_adapter, "setup_logging", setup_logging), + patch.dict(os.environ, {"CODEBOARDING_LOG_LEVEL": "DEBUG"}), + ): + engine_adapter.main( + [ + "base", + "--repo", + "/repo", + "--out", + "/out", + "--name", + "myrepo", + "--run-id", + "rid-base", + "--depth", + "2", + "--source-sha", + "abc123", + ] + ) + + self.assertEqual(setup_logging.calls, [{"default_level": "DEBUG"}]) + def test_main_sets_github_action_source(self): rf = _Rec() self._install(run_full=rf) diff --git a/tests/test_sync_subcommands.py b/tests/test_sync_subcommands.py index 6b878c7..bad730b 100644 --- a/tests/test_sync_subcommands.py +++ b/tests/test_sync_subcommands.py @@ -89,6 +89,7 @@ def model_dump(self, **kwargs): da.exceptions = exc _preload("diagram_analysis.analysis_json", UnifiedAnalysisJson=_InitialUnifiedAnalysisJson) _preload("diagram_analysis.io_utils", write_fingerprint=lambda *a, **k: None) +_preload("logging_config", setup_logging=lambda **kwargs: None) _preload("agents.content_hash", hash_repo_source_files=lambda *a, **k: {}) _preload("agents") _preload("health.models", Severity=_InitialSeverity) @@ -111,6 +112,7 @@ def model_dump(self, **kwargs): "diagram_analysis.analysis_json", "diagram_analysis.exceptions", "diagram_analysis.io_utils", + "logging_config", "static_analyzer", "static_analyzer.analysis_cache", "static_analyzer.cluster_helpers",