Repository navigation
belay v0.1.0-alpha.3 (pre-alpha)
Pre-releasebelay v0.1.0-alpha.3 is a pre-alpha. It records what changed in a directory and explains it. It
changes nothing, undoes nothing, and contains nothing. Use it to look, not to protect.
What changed since v0.1.0-alpha.2
New
belay baseline exportwrites a checkpoint and its copies to a bundle;belay verifycompares a directory with that bundle and judges it against a protect spec (policy.v1).- A protect spec names paths that must not be written, deleted or created, with optional expected hashes.
--docker CONTAINER, on every command that takes--scope, reads a container's layers from the host, without entering it.- pybelay, Python bindings around the binary, with a reward helper: a violation zeroes the reward, signals go to its metadata.
bench/spike_torngains anmmapmode, so torn-read figures can be reproduced.
A hash a writer may have torn (manifest v4)
- belay now asks the kernel, around every file it hashes, whether some process has that file open for writing or mapped shared-writable.
- If so, the entry is marked
writer_open, its hash is kept but never compared, no copy is kept, and the diff saysunknown. - Policy and baselines treat a marked entry as having no hash.
new_executable_on_pathstill fires, provisionally, because a mode is not a hash. markreads a marked file again.- Where the kernel cannot answer, each manifest counts the files as
unguarded, and a receipt says so on one line.
Receipts
- Tracked changes come first and are never cut; what git ignores folds to one line per top-level directory.
- Edits to git-ignored text files are named: an ignored file an agent edits is often
.envor local configuration. - Unknown rows under a git-ignored directory fold too, counted by reason.
.gitfolds to onegit bookkeepingline. A reflog that only moved a ref where it was is counted:(1 reset in place).
Smaller changes
- A development build reports git's description (
0.1.0-alpha.2+95-ga2054b3), so it can't be taken for a release. diff --tobetween kept checkpoints writes nothing when that diff is already stored.- git's refs and reflogs are read as git reads them: unterminated lines, skipped lines and blank lines included.
Format changes
- Manifest v4 (
writer_open,unguarded), by way of v3 (source, where a capture came from). belay reads every earlier version; earlier releases refuse v3 and v4 manifests. - diff.v1 gains a reason,
writer_open, and four trailer keys. A consumer ignores what it does not know. - A hash of bytes under a writer used to diff as
modified; it now diffs asunknown, so a file a process merely keeps open isunknown, anddiff --exit-codeexits 1, for as long as it stays open.
What it still can't see
On Linux, belay marks a file whose hash a concurrent writer may have torn, for files it owns on filesystems with leases. These are not marked:
- Where it can't ask: on macOS, on filesystems without leases, and for files belay's user does not own without
CAP_LEASE, belay can't ask. On overlayfs, a shared mapping whose descriptor was closed is invisible. A torn hash there still diffs as an ordinary change; each manifest says only how many files were hashed this way, asunguarded. - A fast writer: one that opens, writes and closes entirely between the two checks, within one timestamp tick, is seen by nothing. This is possible on kernels before 6.13 and on coarse-timestamp filesystems; it follows from the kernel's rules and hasn't been observed.
- A writer on another machine: on a filesystem that grants leases locally, it may go unseen. This is unverified.
- Files
markdidn't re-read: they aren't counted, sounguardedcan fall to 0 on later marks while the hashes still came from unguarded reads.
Asking the kernel takes a lease and releases it at once. A writer opening the file in that instant waits for microseconds, and one opening it with O_NONBLOCK gets EAGAIN and must retry.
mark --json does not report writer_open or unguarded; the manifest and the diff do.
A protect spec sees files, not intent: a hack that lives in code it does not protect passes.
As in earlier releases: no undo and no sandbox -- belay records and reports and is not a security boundary; nothing outside the directory given, below a mount point inside it, in belay's own state directory or in a path you exclude is seen, and each of those is named; git objects and packs are not read, and the reflog is the watched process's own account.
Files
| file | platform |
|---|---|
belay-v0.1.0-alpha.3-linux-x86_64 |
Linux, x86_64; statically linked |
belay-v0.1.0-alpha.3-linux-arm64 |
Linux, arm64; statically linked |
belay-v0.1.0-alpha.3-macos-arm64 |
macOS 15, Apple silicon; links only the system library; not notarized |
SHA256SUMS |
the sha256 of each binary |
pybelay wheels, WHEELS-SHA256SUMS |
the Python bindings, version 0.1.0a3, with each wheel's sha256 |
Each binary was built from the tagged commit by the release workflow, and run end to end before it
was attached. To verify one:
sha256sum -c --ignore-missing SHA256SUMS
gh attestation verify belay-v0.1.0-alpha.3-linux-x86_64 --repo Allexsen/belayOn macOS the binary is not notarized: remove the quarantine attribute
(xattr -d com.apple.quarantine belay-v0.1.0-alpha.3-macos-arm64) or build from source.
Status
Pre-alpha: interfaces, output and formats may change without notice. No stable API. The most useful contribution is real-world use: if belay missed a change, invented one, or buried the real one in noise, open a mismatch issue. Security reports: SECURITY.md. Apache-2.0.