Files
Vito c9d2b9c66b ci: test only changes that can affect code (#639) (#640)
* ci: test only changes that can affect code (#639)

Each gating workflow starts with a change class job that sorts the
pull request, merge group or push by the files it touches
(tools/ci/change_class.py): inert (nothing reads them), docs (a Python
test reads them) or code (anything else and every case of doubt).

- inert: only the classifier and the two gates do work. The required
  py3.12 leg starts and skips its steps, because a skipped matrix job
  would never report that context.
- docs: the Python 3.12 suite runs as well; it holds the README tests.
- code: everything runs, as before.

The gates require the classifier to succeed and every job to do what
the class asks; an unknown class fails them. bandit has no gate, so it
runs unless the class is docs or inert. The required contexts are
unchanged. The pre-push hook skips the suite for an inert push.

* test(ci): keep the classifier tests out of a git hook's repository (#639)

Inside the pre-push hook git exports GIT_DIR and GIT_INDEX_FILE for the
repository being pushed. The test's own git calls inherited them and so
ran git init, add and commit against that repository instead of their
temp one. They now drop every GIT_ variable, and the tests run with
those variables pointing at another repository that must stay absent.

* test(ci): import unittest.mock one way

* fix(ci): find the pre-push command through PATH before running it

The pre-push wrapper ran its command with subprocess and a bare name.
On Windows the frontend hook's npm is npm.cmd, which subprocess does
not find without a PATH and PATHEXT lookup, so every non-inert push
failed with FileNotFoundError (Codex review). The wrapper now resolves
the program with shutil.which first, and says so when it is missing.
Reproduced and verified on Windows 11: before, FileNotFoundError; after,
npm --version runs.

* test(inspect): keep trying until a video is seen still starting at loadstart (#641)

A busy WebKit fired the viewer video's loadstart after it already had
HAVE_ENOUGH_DATA (merge-queue run 43732282629, readyState 4), so the
per-attempt readyState === 0 assertion failed although the settled path
behaved correctly. The three #483 tests now count the attempts that saw
the video still starting, run up to twice as many pages until one does,
and fail only if none did.
2026-11-15 17:03:10 +00:00
..