From 80d7626340bdebe0052753a9176671d34fb16e29 Mon Sep 17 00:00:00 2001 From: Svilen Stefanov Date: Tue, 18 Aug 2026 23:39:12 +0200 Subject: [PATCH] fix: install tqdm, which the pinned engine imports but does not require Every run currently fails at "ModuleNotFoundError: No module named 'tqdm'". The pinned CodeBoarding CLI imports tqdm from codeboarding_cli/commands/full_analysis.py, which main.py imports unconditionally, so nothing runs, not just full analyses. tqdm is not among codeboarding's dependencies; it arrived through openai, and openai 3.3.0 dropped it. Pinning codeboarding==0.13.8 never pinned what its dependencies resolve to, so the same install started failing without anything here changing. Naming tqdm in the install is a workaround for that packaging gap and should go once the engine declares it. The install now also checks the CLI starts, so a missing dependency fails at the install step with a reason instead of surfacing as a traceback part way through an analysis. It runs the console script rather than `python -c 'import main'`: the latter puts the analyzed repository's own main.py ahead of the CLI's on sys.path, which many Python projects have. Co-Authored-By: Claude Opus 5 (1M context) --- action.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 2c07304..5e7de1d 100644 --- a/action.yml +++ b/action.yml @@ -154,7 +154,21 @@ runs: - name: Install CodeBoarding if: steps.guard.outputs.skip != 'true' shell: bash - run: python -m pip install --disable-pip-version-check 'codeboarding==0.13.8' + # tqdm is imported by the pinned CLI but missing from its dependencies. It + # used to arrive through openai, which dropped it in 3.3.0, so every fresh + # resolve since then installs a CLI that cannot start. Naming it here is a + # workaround for that packaging gap, not a dependency of this action; + # remove it once the engine declares its own. + run: | + python -m pip install --disable-pip-version-check 'codeboarding==0.13.8' tqdm + # Fail here, with the reason, rather than mid-analysis with a traceback: + # pinning a release does not pin what its dependencies resolve to. Run + # the console script, not `python -c`, which would put the analyzed + # repository's own main.py ahead of the CLI's on sys.path. + codeboarding --help >/dev/null || { + echo "::error::The installed CodeBoarding CLI cannot start; a dependency it imports is missing." + exit 1 + } - name: Configure analysis authentication if: steps.guard.outputs.skip != 'true'