utils/gatelock/gatelock
Krzysztof kuhy Rudnicki 35f6f95956
Some checks failed
dependency freshness / dependencies on newest stable (push) Waiting to run
earned_time pre-commit / pre-commit (push) Waiting to run
earned_time tests / test (push) Waiting to run
file length / file-length (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
palette drift / palette (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
shared gate tests / gate unit tests (push) Waiting to run
gatelock pre-commit / pre-commit (push) Has been cancelled
gatelock tests / test (push) Has been cancelled
music_theory tests / test (push) Has been cancelled
gatelock 0.11.0: Claim.grab_held + held_grabs(), so a reader can tell a locker's X grab is actually held
A live claim was not "input is locked": it is published before the window
grabs, and leetcode-guard's study mode releases the grab while the claim
lives on. leisure-watch (contract C2) must pause shadow billing only while a
grab is really held.

- Claim.grab_held (always serialised; missing key from an old writer reads
  as grab != "none"). Arbitration still uses the declared grab only.
- Arbiter.set_grab_held(held=) rewrites the claim and holder copies in place
  through the owner's flocked fd (O_APPEND cleared, pwrite at 0, padded so
  the file never shrinks) -- same inode, flock liveness untouched. Never raises.
- Set true only after grab_set/grab_set_global succeeded; RecoveryLoop
  reports each tick's real answer (a stolen, un-retaken grab reads false).
  LockWindow.report_grab_held(held=) is the hook for deliberate releases.
- gatelock.held_grabs(claims_dir=None): live claims with grab_held and a real
  grab. Root callers pass /run/user/1000/gatelock/claims.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dsh4Znwh2KnC7q6vbGpX1N
2026-10-19 11:40:46 +02:00
..
tests gatelock 0.11.0: Claim.grab_held + held_grabs(), so a reader can tell a locker's X grab is actually held 2026-10-19 11:40:46 +02:00
__init__.py gatelock 0.11.0: Claim.grab_held + held_grabs(), so a reader can tell a locker's X grab is actually held 2026-10-19 11:40:46 +02:00
_arbiter.py gatelock 0.11.0: Claim.grab_held + held_grabs(), so a reader can tell a locker's X grab is actually held 2026-10-19 11:40:46 +02:00
_arming.py gatelock 0.11.0: Claim.grab_held + held_grabs(), so a reader can tell a locker's X grab is actually held 2026-10-19 11:40:46 +02:00
_claimfile.py gatelock 0.11.0: Claim.grab_held + held_grabs(), so a reader can tell a locker's X grab is actually held 2026-10-19 11:40:46 +02:00
_claims.py gatelock 0.11.0: Claim.grab_held + held_grabs(), so a reader can tell a locker's X grab is actually held 2026-10-19 11:40:46 +02:00
_config.py gatelock 0.8.1: public recovery/detector handles; declarative types import from _config 2026-09-12 19:41:13 +02:00
_density.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
_detect.py gatelock: scope pylint to source on 4.0.8 and clear the residue it grades 2026-09-12 19:15:39 +02:00
_escape_types.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
_escape.py gatelock: scope pylint to source on 4.0.8 and clear the residue it grades 2026-09-12 19:15:39 +02:00
_fitcheck.py gatelock 0.8.1: public recovery/detector handles; declarative types import from _config 2026-09-12 19:41:13 +02:00
_grabwatch.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
_guards.py gatelock 0.8.2: wait_for_x_server waits for as long as it takes 2026-09-13 10:19:52 +02:00
_hooks.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
_keyboard.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
_output_types.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
_outputs.py gatelock: scope pylint to source on 4.0.8 and clear the residue it grades 2026-09-12 19:15:39 +02:00
_placement.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
_preempt.py gatelock 0.8.0: LockConfig as behaviour + GrabPolicy + theme records; pylint at 10 2026-09-12 19:36:31 +02:00
_queue.py gatelock: scope pylint to source on 4.0.8 and clear the residue it grades 2026-09-12 19:15:39 +02:00
_randr.py gatelock: scope pylint to source on 4.0.8 and clear the residue it grades 2026-09-12 19:15:39 +02:00
_recovery_types.py gatelock 0.11.0: Claim.grab_held + held_grabs(), so a reader can tell a locker's X grab is actually held 2026-10-19 11:40:46 +02:00
_recovery.py gatelock 0.11.0: Claim.grab_held + held_grabs(), so a reader can tell a locker's X grab is actually held 2026-10-19 11:40:46 +02:00
_root.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
_scrollable.py gatelock 0.8.1: public recovery/detector handles; declarative types import from _config 2026-09-12 19:41:13 +02:00
_scrollfit.py gatelock: scope pylint to source on 4.0.8 and clear the residue it grades 2026-09-12 19:15:39 +02:00
_scrollkeys.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
_surface_types.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
_surfaces_focus.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
_surfaces.py gatelock 0.8.1: public recovery/detector handles; declarative types import from _config 2026-09-12 19:41:13 +02:00
_textmirror.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
_theme.py gatelock 0.8.0: LockConfig as behaviour + GrabPolicy + theme records; pylint at 10 2026-09-12 19:36:31 +02:00
_userintent.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
_vt.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
_widget_fills.py gatelock 0.8.1: public recovery/detector handles; declarative types import from _config 2026-09-12 19:41:13 +02:00
_window.py gatelock 0.11.0: Claim.grab_held + held_grabs(), so a reader can tell a locker's X grab is actually held 2026-10-19 11:40:46 +02:00
_xlib.py gatelock 0.8.0: LockConfig as behaviour + GrabPolicy + theme records; pylint at 10 2026-09-12 19:36:31 +02:00
_xrandr.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
log_integrity.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
morning_session.py gatelock 0.9.0: morning_session, the one reader of wake-alarm's carrot 2026-10-02 13:59:33 +02:00
night_lockdown.py gatelock 0.10.0: night_lockdown.evening_lockdown_today, so earner gates stop re-arming after tonight's lockdown 2026-10-17 18:23:48 +02:00
widget_group.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
widgets.py gatelock 0.8.1: public recovery/detector handles; declarative types import from _config 2026-09-12 19:41:13 +02:00