Repository navigation
v1.4.0
Same claim format as 1.3.1. This release cuts the rerun an agent made after
every commit: it tests uncommitted work, records claims, commits, and every
Chisel pass went stale because HEAD moved.
- A Chisel pass whose commit is not HEAD is fresh when the
treeChisel
recorded (Chisel 0.25.0 and later: the git tree of the working tree the
tests ran against, uncommitted and untracked files included) equals
HEAD^{tree}, or differs from it only under.adsertio/,.chisel/,
.trammel/or.probatio/. Committing exactly the tested work, with or
without the claims and the Chisel store, keeps the pass. Any other change
committed after the run isstale, and the detail names both trees.
Withouttree(older Chisel, Trammel) the commit rule is unchanged. - HEAD and its tree come from one
git rev-parse HEAD HEAD^{tree}per view,
so the common case runs no extra git.git diff-treeruns once per
recorded tree that is not HEAD's tree, cached for the view. A tree id goes
to git only after it is checked to be 40 or 64 hex digits. - The stale detail's fix for a Chisel pass with no recorded tree adds that
Chisel 0.25.0 or later records the tested tree, so committing exactly that
work needs no rerun.adsertio_guide'sstale_after_commitsays the same. tests/v140.rsuses real Chisel output (tests/fixtures/chisel/real-tree):
a dirtychisel run -- cargo teston a crate with a new test, committed
exactly, committed with claims and store, and changed after the run.
Operating-system attach locks. An attach lock was .<id>.md.lock, made
with create_new and holding a pid, a time and a token, so an attach that
was killed left it behind and Adsertio had to guess when it was stale: a
dead pid (which pid reuse and separate pid namespaces get wrong), no pid
after one second, a mtime in the future, its own pid after 30 seconds, and a
.break guard so only one waiter removed it. Now the lock is flock on
Unix and LockFileEx on Windows, on a lock file kept open while held. The
kernel releases it when the holder exits or is killed, so a killed attach
blocks nobody and there is nothing to guess.
- Each claim has its own lock file,
.adsertio/locks/<id>.lock, created by
the first attach to that claim and never deleted (deleting a held lock
file lets a second attach lock a new file at that name). Per-claim files
keep attaches to different claims running side by side, as before; there
is at most one file per claim, since an attach to an id with no claim
file takes no lock. One store-wide lock would have meant one file, but
would make every attach wait for every other.checkanddoctordo not
look inlocks/. A symlinkedlocksfolder is refused. - A
.<id>.md.lockor.<id>.md.lock.breakleft by 1.3 blocks nothing.
viewandlsskip it,doctorlists it underleftover_files, and
checkanddoctor --fixdelete it. Running 1.3 and 1.4 attaches on one
store at the same time is not supported: they take different locks. - The busy error is unchanged: after 5 seconds,
this claim is being updated by another attach. Retry adsertio_attach; nothing was written. - Temp files are judged by age only: one over an hour old is removed. The
pid in a temp name is no longer checked, and a temp with a mtime in the
future is no longer removed at once. No pid is checked anywhere. doctorhas afile_systemcheck on every platform, which warns (and
passes, with afix) when the store is on a network file system, where
flockmay be emulated or not shared between machines: a macOS mount
withoutMNT_LOCAL, a Linux NFS, SMB, CIFS, 9P, AFS, Coda or Ceph
f_type(x86_64 and aarch64), or a Windows UNC path or remote drive. It
replaces the Windows-onlynetwork_drivecheck, which failed.src/oslock.rsis Libellus 1.4.0's lock module, std only. On Windows,
src/lock.rs(the shared locks on Trammel's and Chisel's lock files,
which behave as before) now uses itsLockFileExdeclarations.- Removed:
fsx::break_abandoned_lock,fsx::lock_held,
fsx::lock_file_is_stale, the.breakguard, the lock token, the Windows
access-denied retry when creating the lock, andsrc/proc.rs
(pid_alive,kill(pid, 0),OpenProcess). tests/oslock.rs: a second attach waits for a held lock and both pointers
are kept, an attach to another claim does not wait, a holder killed with
SIGKILL (TerminateProcess on Windows) frees the lock at once, 1.3 lock
files block nothing andcheckremoves them, and temp files go by age.