Skip to content

refactor(ci): port check-skips to Python (#962) - #2598

Merged
zackees merged 2 commits into
masterfrom
infra/962-gen-005-check-skips-python
Oct 27, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/962-gen-005-check-skips-python

Conversation

@zackees

@zackees zackees commented Oct 27, 2026

Copy link
Copy Markdown
Member

Ports rust/tools/linux-validate/check-skips.sh (16 lines) to Python, per the GEN-005 burn-down in #962. Split out of the AppImage work because this one has no in-container trap: its only caller, validate.sh, runs with uv mounted into the Tier 2 container (ci.yml: --mount ...$(command -v uv),dst=/usr/local/bin/uv) and already runs other ported helpers through uv run --no-project.

RED

ci/test_tier2_skips.py now drives the port's verdicts (rust/tools/linux-validate/check_skips.py) over canned ctest logs instead of bash check-skips.sh. On the unfixed tree the module does not exist, so every case errors (6a68f4857).

GREEN (134be7125)

  • rust/tools/linux-validate/check_skips.py — the port, shebang #!/usr/bin/env -S uv run --script.
  • validate.sh calls it through uv run --no-project.
  • check-skips.sh deleted; the ci.toml GEN-005 exception for it removed.
  • Two stale source comments (the cmocka test_inhibit_sleep_dbus test and its .cmake) repointed at the Python file.

The port keeps every verdict, differential-checked against the shell script over the same ctest logs:

Validation

  • uv run python -m unittest ci/test_tier2_skips.py — 7 tests pass (RED: 6 errors before the module existed).
  • ci/test_ci_toml.py, ci/test_uv_run.py, ci/test_ci_tests_stdlib_only.py, ci/test_no_sys_path_edits.py pass.
  • ./lint lane: the only failure is ci/test_local_gate_probe.py, the environmental soldr-version probe on this host, unrelated to these files.

zackees added 2 commits October 27, 2026 03:21
…962)

RED: rust/tools/linux-validate/check_skips.py does not exist yet and
validate.sh still calls the shell script, so ci/test_tier2_skips.py errors on
every case (7 errors) — the module cannot be loaded.
GREEN: rust/tools/linux-validate/check_skips.py replaces the 16-line shell
script. validate.sh runs it through `uv run --no-project`, the same way it runs
the other ported helpers of that lane (the Tier 2 container mounts uv at
/usr/local/bin/uv), and the ci.toml GEN-005 exception is dropped.

The port keeps every verdict of the shell version (differential-checked over the
same ctest logs): a Skipped test whose name starts with test_pipewire_, test_vlc_,
test_screencast_portal_ or test_inhibit_sleep fails the lane (#776, #453), any
other skipped test passes, and a bad argument count is a usage error (exit 2).
@zackees

zackees commented Oct 27, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator.

  • Rebased onto origin/master 8494808d6 (already current, 0 behind).
  • Focused local checks green: uv run python -m unittest ci/test_tier2_skips.py (7 tests), plus ci/test_ci_toml.py, ci/test_uv_run.py, ci/test_ci_tests_stdlib_only.py, ci/test_no_sys_path_edits.py.
  • ./lint lane: only failure is ci/test_local_gate_probe.py (the host's soldr is older than the repo pin, test_changed_source_fails_the_rust_test_lane) — environmental, unrelated to these files, so HEAD could not be stamped with the local gate. Letting PR CI run the full suite instead.
  • PR marked ready; auto-merge enabled (gh pr merge 2598 --auto).

Please handle rebase/ledger/lint fixups and re-queue after ejection as needed.

@zackees
zackees added this pull request to the merge queue Oct 27, 2026

@zackees zackees left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review (coordinator tick): correct port, verified RED → GREEN and differential against the shell script it replaces. No changes requested. It is already in the merge queue (position 4), so nothing to queue here.

What I checked on 134be7125 in a scratch worktree (not this checkout):

  • RED is real. git checkout 6a68f4857 + uv run python -m unittest ci/test_tier2_skips.py → FAILED (errors=7): the module does not exist yet, so every case errors rather than passing vacuously.
  • GREEN is real. On the head, the same command is Ran 7 tests ... OK.
  • The verdicts match the script it replaces. I took check-skips.sh from origin/master and the new check_skips.py and ran both over three ctest logs — two with skips among MUST_RUN (pipewire / screencast-portal / inhibit-sleep), one empty. Exit codes agree (1, 1, 0) and the printed name lists are byte-identical, including the sort order and the duplicate collapse.
  • The caller is in a container that has Python. validate.sh runs under the Tier 2 container with uv mounted (ci.yml), and it already drives the other ported helpers that way — this is not one of the build-aux/appimage scripts whose caller is a stock distro image with no Python. uv run --no-project "$SRC"/rust/tools/linux-validate/check_skips.py is the same shape as its neighbours and satisfies the TOOL-003 spelling.
  • ruff check is clean on both files. ruff format would reformat them, but this repo gates only ruff check (C901/RUF100), so that is cosmetic and not worth dropping the PR out of the queue for.
  • ci/test_no_sys_path_edits.py is honoured: the test loads the port through importlib.util.spec_from_file_location, not sys.path.
  • The ci.toml GEN-005 exception for check-skips.sh goes away in the same commit that deletes the file, and the two stale comments are repointed.

Merged via the queue into master with commit c2a9d13 Oct 27, 2026
37 checks passed
@zackees
zackees deleted the infra/962-gen-005-check-skips-python branch October 27, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant