awgit v0.2.0 — the guard actually guards
The release that makes awgit's concurrent-edit protection real.
0.1.0 shipped a lease registry and a pre-commit gate whose whole purpose is
stopping two agents from clobbering each other's work — and it prevented
nothing, because it could not be switched on without breaking the machine it
ran on.
Added
awgit lease acquire --staged— take leases on exactly the staged files
the gate will check. Complying with enforcement is one command instead of a
per-file chore, which is what makes broader coverage survivable.- Automatic per-session identity.
_actor()derivesclaude:<session-id>
fromCLAUDE_CODE_SESSION_ID(stable for a session, inherited by the git
hook's subprocess), falling back touser@host. Nothing to export.
Changed
- The gate no longer covers only
.py.coverage_gap()consults
is_guarded(): source (.py .ts .tsx .js .jsx .mjs), config
(.yml .yaml .toml .json .ini .cfg), scripts (.sh .bash .ps1 .psm1),.md,
.sql .proto .env— minus bulk content nobody races on. Deliberately not
"everything": guarding bulk content would make a routine commit need dozens of
leases, and a gate that heavy gets routed around rather than satisfied.
Fixed
- Enforcement could not be enabled.
_actor()returned"unknown"unless
AITHER_ACTORwas exported, andlease-checkrejects an unknown actor — so
VCS_LEASES_ENFORCE=1would have blocked every commit until every session
remembered a variable. - A
.ymlcommit reportedlease-check OKwhile checking nothing, leaving
compose files, CI workflows and docs as clobberable as before.
Measured
Across 568 commits in one week on the repo this was built for: the median commit
touches 1 guarded file, 89% touch five or fewer, and 9% touch a file
another commit touched inside a five-minute window — the collision git resolves
by letting both through and telling you afterwards. In that same period one file
was overwritten by a concurrent session four times, the last overwrite
silently reverting a fix already committed upstream.
pip install awgit==0.2.0