From b8cf634fa622cf84c37eb98b49917cbc361e11d4 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Sat, 15 Aug 2026 21:00:49 +0200 Subject: [PATCH] Record why the popup gate fails on a drifted gatelock The RecoveryLoop call in HostileLock matches gatelock 0.4.0, which is what requirements.txt pins and what the pylint hook installs. gatelock 0.5.0 regroups the five arguments into a RecoveryCollaborators object, so running this gate against a locally-installed 0.5.0 fails with RecoveryLoop.__init__() takes 3 positional arguments but 6 were given That is environment drift, not a defect in the check -- against the pinned version the gate runs and passes both halves. Comment says so, and says how to resync, so the next reader does not "fix" the code to match whatever happens to be installed. (I nearly did; against the pin that edit would have broken CI.) Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01EveB813BQ8abAP68VSqZ5Y --- scripts/_popup_form_check.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/_popup_form_check.py b/scripts/_popup_form_check.py index 7a3d8c0..37f75a6 100644 --- a/scripts/_popup_form_check.py +++ b/scripts/_popup_form_check.py @@ -43,6 +43,13 @@ class HostileLock: # A RecoveryLoop built only to borrow gatelock's real grab predicate; # this harness drives the ticks itself, so the collaborators are never # called -- the same MagicMock stand-ins gatelock's own tests use. + # + # This is the gatelock 0.4.0 signature, which is what requirements.txt + # pins. gatelock 0.5.0 regroups these into a RecoveryCollaborators + # object, so running against a locally-installed 0.5.0 raises + # "takes 3 positional arguments but 6 were given" -- that is an + # environment drift, not a bug here. Fix it by matching the pin: + # pip install -e . && pip install -r requirements.txt self._loop = RecoveryLoop( root, LockConfig(mode="hard"), MagicMock(), MagicMock(), MagicMock() )