# Sealed memfd handoff: reproducible observations

Companion to https://hesela.com/analyses/mmap-visibility-size-durability/#sealed-handoff

The original research capture is archived unchanged. Its evidence.json status and synthesis.md publication-plan wording describe the candidate stage, not the current article's release status. The article is the maintained interpretation.

## Result and scope
A fully sealed 4096-byte memfd retained its complete hash while a shared-cursor read or dup-read consumed only 3072 bytes after the sender sought to 1024. Positional and separately reopened controls consumed all 4096. Eleven deterministic native Linux scenarios, three repetitions each, are retained in each of two matching captures. These are not independent failure-rate samples, a kernel vulnerability, disk durability measurements or a production IPC protocol.

## Files
- [probe.py](probe.py): native two-process harness, synthetic payloads.
- [observations.json](observations.json) and [repeat.json](repeat.json): original captures and environment.
- [test_probe.py](test_probe.py) and [test_package.py](test_package.py): retained validation and negative controls.
- [derive.py](derive.py): validates observations and derives the claim map/table.
- [evidence.json](evidence.json) and [RESULTS.md](RESULTS.md): generated evidence.
- [sources.json](sources.json): source URLs and actual retrieval receipts, including one failed request.
- [synthesis.md](synthesis.md): original candidate synthesis, retained for provenance.

## Reproduction
Place all ten linked files in one directory. Requirements: Linux 6.3+, Python 3.9+, procfs and permission to use memfd sealing and Unix SCM_RIGHTS. No third-party packages, device writes or elevated privileges.

```sh
python3 -B probe.py --repetitions 3 --output new-capture.json
python3 -B -m unittest -v test_probe.py test_package.py
python3 -B -O -m unittest -q test_probe.py test_package.py
python3 -B derive.py --check
python3 -B -c 'import json, probe; from pathlib import Path; old=json.loads(Path("observations.json").read_text()); new=json.loads(Path("new-capture.json").read_text()); probe.validate(new); probe.require(old["observations"] == new["observations"], "observations differ")'
```

The tests validate retained evidence; the final command explicitly validates and compares the fresh run. Do not replace the retained captures. Keep the fresh environment and timestamp even when observations match. Publication replay on 23 October 2026 reproduced all 33 observation records exactly on the same kernel/glibc/Python versions; this is not independent-host replication.

The producer creates the memfd after fork, preventing receiver inheritance. Socket messages order receipt, inspection, sender action and consumption. Every received object has MFD_NOEXEC_SEAL; a nonzero seal mask alone does not imply fixed bytes and size.
