mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-24 16:46:18 +01:00
Compare commits
4 Commits
eb46b365cf
...
f153a69ac1
| Author | SHA1 | Date | |
|---|---|---|---|
| f153a69ac1 | |||
| 38ee5d82f3 | |||
| 4a35be73c6 | |||
| 4326ea421b |
3
.github/workflows/pre-commit.yml
vendored
3
.github/workflows/pre-commit.yml
vendored
@ -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.
|
||||
#
|
||||
|
||||
8
.github/workflows/python-tests.yml
vendored
8
.github/workflows/python-tests.yml
vendored
@ -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
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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"
|
||||
]
|
||||
}
|
||||
@ -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"
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user