Compare commits

...

4 Commits

Author SHA1 Message Date
f153a69ac1 NEXT_SESSION_PROMPT.md: prettier formatting fix
Some checks failed
Pre-commit checks / pre-commit (push) Waiting to run
Shell tests / shell-tests (push) Waiting to run
Shell tests / arch-tests (push) Waiting to run
Python tests / test (push) Has been cancelled
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
2026-08-18 23:27:21 +02:00
38ee5d82f3 NEXT_SESSION_PROMPT.md: mark Phase 0 done, record the self-trigger gotcha
Pre-commit checks, Shell tests, and Python tests are all green on
4a35be7. Documents the fix (librsvg2-bin) and the gh-run-rerun trap
hit along the way so a future session doesn't repeat it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
2026-08-18 23:25:52 +02:00
4a35be73c6 CI: make python-tests.yml self-triggering + add workflow_dispatch
The rsvg-convert fix landed in a commit that only touched workflow
files, which python-tests.yml's path filter doesn't watch -- so the
workflow never re-ran and gh run rerun replays the old, pre-fix
definition instead of the current one. Adding the workflow's own
path to its filter and workflow_dispatch closes both gaps.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
2026-08-18 23:19:43 +02:00
4326ea421b 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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
2026-08-18 23:10:38 +02:00
5 changed files with 124 additions and 2 deletions

View File

@ -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.
#

View File

@ -10,6 +10,7 @@ on:
- "linux_configuration/scripts/periodic_background/system-maintenance/bin/**"
- "linux_configuration/tests/**"
- "requirements.txt"
- ".github/workflows/python-tests.yml"
pull_request:
branches: [main]
paths:
@ -19,6 +20,8 @@ on:
- "linux_configuration/scripts/periodic_background/system-maintenance/bin/**"
- "linux_configuration/tests/**"
- "requirements.txt"
- ".github/workflows/python-tests.yml"
workflow_dispatch: {}
jobs:
test:
@ -28,6 +31,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

View File

@ -36,7 +36,38 @@ Three decisions made when this campaign was scoped (2026-08-18) — also do
---
## Phase 0: Fix current CI red state — **STATUS: in progress, check first**
## Phase 0: Fix current CI red state — **STATUS: DONE, 2026-08-18. Re-verify before trusting.**
Re-check with `gh run list --limit 5` before assuming this still holds —
state can drift between sessions. As of commit `4a35be7`, `Pre-commit
checks`, `Shell tests`, AND `Python tests` all show `success` with
`headSha` matching `4a35be7` (verified via
`gh run list --workflow="<name>" --limit 1 --json headSha,status,conclusion`
for each, not just `gh run list`'s default view).
Fixed in two commits:
- `4326ea4` — added `librsvg2-bin` (provides `rsvg-convert`) to the
`apt-get install` steps in both `pre-commit.yml` and `python-tests.yml`.
This was the actual root-cause fix for the 99.98% coverage gap.
- `4a35be7` — `python-tests.yml` is path-filtered (`python_pkg/**`,
`linux_configuration/tests/**`, etc.) and does NOT watch its own file, so
the `4326ea4` push never re-triggered it — its last run stayed red against
the old commit. `gh run rerun` does **not** help here: it replays the
_historical_ commit's workflow YAML, not `main`'s current definition, so
it reran with the pre-fix workflow and failed identically. Fixed by adding
`.github/workflows/python-tests.yml` to the workflow's own `paths:`
filters (self-triggering) and adding `workflow_dispatch: {}` so it can
also be fired manually in the future.
**Lesson for future CI-only fixes:** a workflow-file-only change does not
retroactively verify itself if the touched workflow is path-filtered and
excludes its own file. Either add the workflow's own path to its filter (now
done for `python-tests.yml`), or make a real change under a path it already
watches — never `gh run rerun`, which silently checks out the wrong
definition. `pre-commit.yml` and `shell-tests.yml` have no path filter, so
they self-trigger on every push already; only `python-tests.yml` had this
gap.
Three workflows were found red on `main` as of 2026-08-18, discovered while
scoping this campaign:

View File

@ -0,0 +1,40 @@
{
"intent": "Make the path-filtered Python tests workflow actually re-run when its own definition changes, and add workflow_dispatch so it can be fired manually -- closing the gap that let the prior rsvg-convert fix land without Python tests ever re-running against it.",
"scope": [
".github/workflows/python-tests.yml",
"no code under python_pkg/ changed"
],
"changes": [
"Added .github/workflows/python-tests.yml to both push and pull_request paths filters, so a change to the workflow's own definition triggers a run",
"Added workflow_dispatch: {} so the workflow can be fired manually without needing a matching path change"
],
"verification": [
{
"command": "gh run rerun 32185366598 (the pre-fix Python tests run)",
"result": "fail",
"evidence": "gh run rerun replays the historical commit's workflow YAML (predating the librsvg fix), not main's current definition -- confirmed still failed with the same 99.98% / vector.py:156 signature. This proved rerun cannot verify a workflow-file-only fix and motivated this self-trigger change instead of relying on rerun."
},
{
"command": "python3 -c \"import yaml; yaml.safe_load(open('.github/workflows/python-tests.yml'))\"",
"result": "pass",
"evidence": "YAML OK"
},
{
"command": "pre-commit run --files .github/workflows/python-tests.yml docs/superpowers/evidence/ci-phase0-python-tests-self-trigger-2026-08-18.json",
"result": "pass",
"evidence": "all applicable hooks passed"
},
{
"command": "gh run list --workflow=\"Python tests\" --limit 1 (post-push)",
"result": "pending at evidence-authoring time",
"evidence": "to be confirmed green with headSha matching this commit before Phase 0 is declared complete; see NEXT_SESSION_PROMPT.md update"
}
],
"risks": [
"If GitHub Actions path-filter evaluation for a self-referential workflow-file entry behaves unexpectedly (e.g. skips because the workflow wasn't running when the push landed), the run may still not fire -- must be confirmed by headSha, not just conclusion"
],
"rollback": [
"git revert this commit",
"Manual re-verification would then require gh workflow run (now removed) or another path-matching commit"
]
}

View File

@ -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"
]
}