From 4326ea421bf046daa4305dd357a5ca16129d79db Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Tue, 18 Aug 2026 23:10:38 +0200 Subject: [PATCH] CI: install rsvg-convert on GitHub Actions runners (Phase 0 fix) ubuntu-latest lacks librsvg2-bin, so test_render_writes_png was skipped in CI, leaving vector.py:156 uncovered and both Pre-commit checks and Python tests red at 99.98% (1 line miss). Installing the real dependency lets the test run instead of excluding the line. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY --- .github/workflows/pre-commit.yml | 3 +- .github/workflows/python-tests.yml | 5 +++ .../ci-phase0-rsvg-convert-2026-08-18.json | 42 +++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 docs/superpowers/evidence/ci-phase0-rsvg-convert-2026-08-18.json diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 9c40cbcf..6fbe3f3a 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -23,8 +23,9 @@ jobs: - name: Install system dependencies run: | set -euo pipefail - sudo apt-get update && sudo apt-get install -y zsh + sudo apt-get update && sudo apt-get install -y zsh librsvg2-bin zsh --version + rsvg-convert --version # Pin shellcheck instead of inheriting whatever ubuntu-latest ships. # diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 6e2fc92c..e5e1bc44 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -28,6 +28,11 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.11" + - name: Install system dependencies + run: | + set -euo pipefail + sudo apt-get update && sudo apt-get install -y librsvg2-bin + rsvg-convert --version - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/docs/superpowers/evidence/ci-phase0-rsvg-convert-2026-08-18.json b/docs/superpowers/evidence/ci-phase0-rsvg-convert-2026-08-18.json new file mode 100644 index 00000000..b9878ffe --- /dev/null +++ b/docs/superpowers/evidence/ci-phase0-rsvg-convert-2026-08-18.json @@ -0,0 +1,42 @@ +{ + "intent": "Fix the persistent CI red state on Pre-commit checks and Python tests (Phase 0 of NEXT_SESSION_PROMPT.md) by installing rsvg-convert on the GitHub Actions runners.", + "scope": [ + ".github/workflows/pre-commit.yml", + ".github/workflows/python-tests.yml", + "no code under python_pkg/ changed" + ], + "changes": [ + "pre-commit.yml: added librsvg2-bin to the existing 'Install system dependencies' apt-get step, plus a rsvg-convert --version sanity check", + "python-tests.yml: added a new 'Install system dependencies' step that apt-get installs librsvg2-bin and verifies rsvg-convert is on PATH before pytest runs" + ], + "verification": [ + { + "command": "gh run list --limit 5", + "result": "confirmed red before this fix", + "evidence": "Pre-commit checks run 32185830767 completed failure at 2026-08-18T21:04:59Z, matching the coverage-gap signature documented in NEXT_SESSION_PROMPT.md Phase 0" + }, + { + "command": "grep -n rsvg-convert python_pkg/artgate/tests/test_routes.py", + "result": "pass", + "evidence": "test_render_writes_png is skipif'd on shutil.which('rsvg-convert') is None; this is the exact test that would exercise vector.py:156, confirming the diagnosed root cause" + }, + { + "command": "python -m pytest python_pkg/artgate/tests/test_routes.py -k render_writes_png -v", + "result": "pass", + "evidence": "1 passed, 27 deselected -- test runs and passes locally where rsvg-convert is already installed" + }, + { + "command": "pre-commit run --files .github/workflows/pre-commit.yml .github/workflows/python-tests.yml", + "result": "pass", + "evidence": "all applicable hooks passed (yaml checks, evidence-contract hook, secret scan, etc.)" + } + ], + "risks": [ + "Confirmation is only local; the actual fix is only proven once the pushed commit's Pre-commit checks and Python tests workflows both go green on GitHub Actions", + "librsvg2-bin package name is Debian/Ubuntu-specific; correct for ubuntu-latest runners but would need adjustment if the runner image changes" + ], + "rollback": [ + "git revert this commit", + "After rollback, re-verify CI returns to the previously-known-red state with the same coverage-gap signature (99.98%, vector.py:156) to confirm the revert is clean" + ] +}