# fsnotify: delivered events and file identity

This is a native-library experiment with fsnotify v1.10.1 on Linux, not a
simulation or an evaluation of any backup product. The version is pinned to
upstream commit 76b01a6e8f502187fecedea8b025e79e5a86085c.

## Result and scope

The original captures contain 36 registration/lifetime schedules and 18
namespace schedules, each with three repetitions on ext4 and tmpfs on one
Linux 6.8.0-149-generic host. These selected controls are not failure-rate
estimates or independent host samples.

Two hard links can register successfully while retaining only the first event
label. Replacing that label with a new inode leaves the other link attached
to the old watched inode. Writing EDIT through the surviving link produces
WRITE under the first label; reading that name returns NEW0 from the replacement.
Unlinking the first label instead produces a missing-path lookup. The quiet
control returns EDIT. The preceding namespace operation produces CHMOD:
the experiment does not claim a wholly silent change.

Removing the old registration and adding the surviving link recovers intended
reads. Marker events in the same stream establish progress. The probes inspect
device/inode pairs and exact bytes; no writer runs during these reads.
Other backends, network filesystems, overflow, crashes and backup products were
not tested.

## Reproduction

Download all manifest members, preserving rebind/main.go. Linux, Go 1.23 or newer,
Python 3 and findmnt are required. The first module download needs network access.

```sh
go mod download
go mod verify
go vet ./...
python3 run.py --parent . --parent /dev/shm --repetitions 3 --output fresh.json
python3 verify.py fresh.json
python3 run_rebind.py --parent . --parent /dev/shm --repetitions 3 --output fresh-rebind.json
python3 verify_rebind.py fresh-rebind.json
python3 -B -m unittest -v test_verify.py
python3 -B -O -m unittest -v test_verify.py
```

Fixtures are temporary and output files must not exist. Keep the original captures
for the verifier tests. manifest.json hashes every exported member.
sources.json maps the immutable upstream code and API documentation.
Hesela's probe code is MIT licensed; upstream dependency licenses remain separate.

[Interpretation and related experiments](https://hesela.com/analyses/inotify-change-detection/#fsnotify-identity)
