utils/gatelock/gatelock/tests
Krzysztof kuhy Rudnicki 9f271b0d37 Fix the cap hook in CI, and the re-exports its --all-files run exposed
The hook entry was an absolute /home/kuhy/utils path, copied from a config
written for ~/.claude where it only ever ran locally. On an Actions runner
that is exit code 127 — "No such file or directory" — so gatelock-precommit
and crdt-sync-precommit failed on every commit of this refactor while the
hook silently checked nothing. Now repo-relative, matching the sibling hooks
(`entry: scripts/check_subproject_scope.sh`): pre-commit always runs from the
git root, so it resolves the same in both places.

Fixing that made the CI configs runnable locally, and `--all-files` then found
what per-file runs had missed — ruff pruning imports that exist *for* their
re-export. `import crdt_sync` was broken three separate ways (FileSyncStateStore,
encode_key, FileCredentialStore). Each affected module now states an explicit
__all__ so the autofixer cannot take them again, and the two files that pushed
past the cap once __all__ was added are split further:

  _firebase.py 260 -> 247 + _fberrors 25
  _sync.py     257 -> 188 + _syncargs 91

Test patch targets followed the code they patch: gatelock._outputs.shutil ->
_xrandr.shutil, gatelock._arbiter.Path -> _claims.Path.

gatelock and crdt-sync both pass `pre-commit run --all-files` in full;
389 and 259 tests at 100% branch coverage; the root gate exits 0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CFSGeWxHPY5rHUGrPqhcmG
2026-08-22 15:52:59 +02:00
..
__init__.py Initial gatelock: shared lock-window + HMAC log-integrity backend 2026-06-19 17:39:44 +02:00
conftest.py gatelock: split _outputs.py 401 -> 137 across four modules 2026-08-22 15:15:55 +02:00
test_arbiter_lifecycle.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
test_arbiter_release.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
test_arbiter.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
test_density.py Cover the last branches of the viewport, the density scale and the keys 2026-08-03 16:20:11 +02:00
test_detect.py gatelock v0.2.0: per-output locking, monotonic recovery, N-app arbitration 2026-07-25 14:30:03 +02:00
test_escape_budget.py gatelock: split _recovery.py and _surfaces.py, and fix two fail-open guards 2026-08-22 15:08:50 +02:00
test_escape.py gatelock: split seven oversized test files by test group 2026-08-22 14:45:08 +02:00
test_fitcheck.py gatelock 0.4.0: the viewport moves for the user and nobody else 2026-08-03 15:50:51 +02:00
test_guards.py gatelock v0.2.0: per-output locking, monotonic recovery, N-app arbitration 2026-07-25 14:30:03 +02:00
test_keyboard.py Cover the last branches of the viewport, the density scale and the keys 2026-08-03 16:20:11 +02:00
test_log_integrity.py Initial gatelock: shared lock-window + HMAC log-integrity backend 2026-06-19 17:39:44 +02:00
test_outputs_enumerator.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
test_outputs_randr.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
test_outputs.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
test_queue.py gatelock: promote the priority queue from leetcode_guard 2026-08-21 12:33:43 +02:00
test_recovery_invariants.py gatelock: split _recovery.py and _surfaces.py, and fix two fail-open guards 2026-08-22 15:08:50 +02:00
test_recovery_reassertion.py gatelock: split test_recovery.py 477 -> 208 lines by test layer 2026-08-22 14:37:47 +02:00
test_recovery.py gatelock: split test_recovery.py 477 -> 208 lines by test layer 2026-08-22 14:37:47 +02:00
test_root.py Initial gatelock: shared lock-window + HMAC log-integrity backend 2026-06-19 17:39:44 +02:00
test_scrollable_into_view.py gatelock: split seven oversized test files by test group 2026-08-22 14:45:08 +02:00
test_scrollable.py gatelock: split seven oversized test files by test group 2026-08-22 14:45:08 +02:00
test_surfaces_focus.py gatelock: split _recovery.py and _surfaces.py, and fix two fail-open guards 2026-08-22 15:08:50 +02:00
test_surfaces.py gatelock: split seven oversized test files by test group 2026-08-22 14:45:08 +02:00
test_vt.py Initial gatelock: shared lock-window + HMAC log-integrity backend 2026-06-19 17:39:44 +02:00
test_widget_group_ops.py gatelock: add shared button, heading/row and WidgetGroup 2026-08-14 23:54:52 +02:00
test_widget_group.py gatelock: add shared button, heading/row and WidgetGroup 2026-08-14 23:54:52 +02:00
test_widgets.py gatelock: add shared button, heading/row and WidgetGroup 2026-08-14 23:54:52 +02:00
test_window_grab.py gatelock: split _recovery.py and _surfaces.py, and fix two fail-open guards 2026-08-22 15:08:50 +02:00
test_window_lifecycle.py Initial gatelock: shared lock-window + HMAC log-integrity backend 2026-06-19 17:39:44 +02:00
test_window_surfaces_lifecycle.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
test_window_surfaces_preempt.py gatelock: split _recovery.py and _surfaces.py, and fix two fail-open guards 2026-08-22 15:08:50 +02:00
test_window_surfaces.py gatelock: split seven oversized test files by test group 2026-08-22 14:45:08 +02:00
test_window.py gatelock: split seven oversized test files by test group 2026-08-22 14:45:08 +02:00