diff --git a/docs/experiments/step-ledger.md b/docs/experiments/step-ledger.md
index c3e8b482..c428d456 100644
--- a/docs/experiments/step-ledger.md
+++ b/docs/experiments/step-ledger.md
@@ -228,6 +228,12 @@ Owner rule: small upstream wins (+0.3..0.5 %) are taken too. "VANL" here is vani
| U4 | verify: flag B stays behind queued copies (upstream `40849df0a` 2026-11-05, P1.1, class E) | `OriginalVerifyGpuPlan::raise_after_staging` (`plan_phases.rs`): a plan with a PCIe source queues the flag behind the staging copies on the copy stream even when the plan is empty (`stage_pcie`, then `raise_after_copies`), the copy-kernel mode and the no-source case raise at once. The upstream hazard (an empty plan raising the one counter early while an earlier layer's or the other token group's uploads are still queued) can only occur in the no-source branch if a window mixes groups with and without a source; not shown to happen | upstream: counter jumped past a layer whose bytes had not landed | unknown; needs the check in the file owned by the speed session | source read | device | proved-equal (speed session, 2026-11-09): flag B is a monotonic ring word; a group with a PCIe source raises it behind the staging copies, one without a source or with the copy kernel raises it from the host at once; groups are never mixed in the product (`pcie_num > 0` is fixed once per round, `decode_parts.rs:209`); pure function `flag_b_route(copy_kernel, has_source)` with a truth table added on their branch, behaviour unchanged |
| U5 | verify: adaptive-copy range covers the whole round (upstream `40849df0a`) | different implementation: adaptive swaps are planned and applied in `original_serve_residency` (`adapt_swaps` cap 96 per round, `swap_tie_order.rs`); no serial/pipelined split with `lo/hi/bi` ranges exists in the Rust port | upstream: a pipelined round that drained early marked only an earlier round's range resident, so other swaps were lost (slot held the new expert, table still named the old one) | analogue not found; the resident marking of a drained round needs a read-through | source read | device | proved-equal (speed session, 2026-11-09): a swap is `Queued` until `complete_swaps` after `wait_swaps`/`poll_swaps` marks it `Filled`, and the slot search requires `Filled`, so a slot is resident only after its copy landed |
+## M. Host memory: the lab holder's sealed memfd
+
+| id | step | LEL | VANL | difference | source | owner | status |
+| --- | --- | ---: | ---: | ---: | --- | --- | --- |
+| M1 | lab holder restart after every holder window: the window scripts (`cmp_codex_job.sh` and the jobs built on it: cmp*, kar-off*, spd-van*, spd-cu*, `pf-mv1`) end with `single-copy-holder.sh`, the FULL seal (55.3 GB resident, `allocated=55295533056`), so the sparse holder of `pf-hs1` (`allocated=16000352256`, 10:28) lasted only until `pf-mv1` ended (10:50); the next window `spd-cuv` (13:31) restarted the full one again | 51.5 GiB resident memfd (profile `ple_only` needs 14.9) | n/a (vanilla holds its own copy) | +36.6 GiB of host RAM held twice; builds with the memfd check refuse to start (`leleka up`: "a second copy of model bytes that nothing reads"); `ab3` (12:13-13:17), `ab4` (22:46-23:43) and `dc-p1` ran on the full holder, both arms of each pair on the same one | `notes.md`, holder3.out, `stat` of the memfd | hex-finish | fixing: guard in `pf_ab_job.sh` (allocated size of the inherited memfd above 20 GiB: sparse restart through `pf_holder_window.sh` and the job queued again, `pf_sparse_requeue.sh`); window scripts of other sessions must end with `pf_holder_sparse.sh` instead of `single-copy-holder.sh` (not done: not our files) |
+
## Job names (GPU queue stubs and result directories)
Naming rule (owner 2026-11-09): `--`, in words; areas `prefill-`, `host-`, `draft-`, `memory-`. Result directories under `/data/leleka-e2e/prefill-latency/runs/` carry the same name. Jobs that already ran keep their old name; the map is old to new.
diff --git a/docs/prefill-throughput.md b/docs/prefill-throughput.md
index fa068262..c5413637 100644
--- a/docs/prefill-throughput.md
+++ b/docs/prefill-throughput.md
@@ -457,7 +457,7 @@ VRAM taken from the expert tier". **It is not.**
8192-row loan; the lent slots are the last ones, so the rungs nest, and the refill is driven by the per-slot `NeedsRefill` state, so a small loan refills less with no other change. The stack opens with the
rungs it can afford (`prompt loan ladder: ...` in the operator log). The arithmetic of a chunk does not depend on the arena capacity (buffers only); the gate is the hash of the final residual R of
every chunk with and without the ladder (job p34: 24 requests of 9e3, arms `N = !notiers`, `T = !tiers`, static tier so the arms do identical work) and the paired A/B of TTFT (job p35, arms T N N T).
-**On in the shipped 5090 profiles** (`LELEKA_PREFILL_LOAN_TIERS=1` in `engine_env`; the engine default stays off, replay arm flag `!tiers`). Identity: the chunk residual hashes (PREFILL-R) of the ladder arm equal the full-loan arm (jobs id1-id4). Paired A/B on the sparse holder, 10 blocks (`ab3` 5 + `prefill-ladder-ab-pairs-6-10` 5, same 30-request replay): session TTFT sum -3.0 s +-0.3 (CI excludes 0), median -104 ms per request, requests with at most 2048 new tokens -154 ms (faster in 19 of 19), above 2048 tokens -10 ms (no loss).
+**On in the shipped 5090 profiles** (`LELEKA_PREFILL_LOAN_TIERS=1` in `engine_env`; the engine default stays off, replay arm flag `!tiers`). Identity: the chunk residual hashes (PREFILL-R) of the ladder arm equal the full-loan arm (jobs id1-id4). Paired A/B on the lab holder (it held the FULL sealed memfd in both experiments: every holder window restarts the full seal, see the step ledger row M1), 10 blocks (`ab3` 5 + `prefill-ladder-ab-pairs-6-10` 5, same 30-request replay): session TTFT sum -3.0 s +-0.3 (CI excludes 0), median -104 ms per request, requests with at most 2048 new tokens -154 ms (faster in 19 of 19), above 2048 tokens -10 ms (no loss).
Recommended once p34/p35 pass: `prefill_capacity: 8192` in the `rtx5090-32g` profile with the ladder on (cold re-reads at 4.4k tok/s, warm turns unchanged); the grid follows the capacity
(`--prefix-cache-block` 0 = the chunk), the trade being the reuse granularity after a fork (up to 8192 tokens re-read instead of 2048: 67.9k vs 67.9k re-prefilled tokens in B2 vs A2, equal on this
diff --git a/scripts/e2e/codex/prefill/pf_ab_job.sh b/scripts/e2e/codex/prefill/pf_ab_job.sh
index 5306d661..07035c05 100755
--- a/scripts/e2e/codex/prefill/pf_ab_job.sh
+++ b/scripts/e2e/codex/prefill/pf_ab_job.sh
@@ -41,6 +41,18 @@ exec > >(tee -a "$RUN/job-$(date -u +%H%M%S).log") 2>&1
log() { echo "[pf $(date -u +%T)] $*"; }
note() { echo "[$(date -u +%FT%TZ)] [DEV prefill-latency] $*" >>/data/leleka-e2e/decode/notes.md; }
readlink "/proc/self/fd/$FD" 2>/dev/null | grep -q '^/memfd:' || { echo "needs the holder's sealed memfd"; exit 3; }
+# Guard: the shipped profiles read only the PLE extents (~15 GiB, memfd_extents ple_only). A holder that sealed the whole archive (every holder window ends with the FULL
+# single-copy-holder.sh) makes `leleka up` refuse ("a second copy of model bytes") and inflates host memory. Allocated size of the inherited memfd, in GiB:
+ALLOC_GIB=$(( $(stat -L -c %b "/proc/self/fd/$FD") / 2097152 ))
+log "inherited memfd: $ALLOC_GIB GiB allocated"
+if [ "${PF_ALLOW_FULL_MEMFD:-0}" != 1 ] && [ "$ALLOC_GIB" -gt "${PF_MEMFD_MAX_GIB:-20}" ]; then
+ JOBF=$(ls "$G"/holder2/jobs/*.running 2>/dev/null | head -1); JOBN=$(basename "${JOBF%.running}")
+ [ -n "$JOBN" ] || { echo "memfd is not sparse and the queue entry of this job is unknown"; exit 3; }
+ log "memfd is not sparse ($ALLOC_GIB GiB > ${PF_MEMFD_MAX_GIB:-20}): restarting the lab holder sparse and queueing $JOBN again"
+ touch "$G/holder2/jobs/STOP"
+ ( eval "exec ${FD}>&-"; setsid nohup bash "$PL/tools/pf_sparse_requeue.sh" "$JOBN" > "$PL/window-requeue-$JOBN.launch" 2>&1 < /dev/null & )
+ exit 0
+fi
[ -d "$G/MODEL.lock" ] || { echo "MODEL.lock is not held"; exit 3; }
PKG=${PF_PKG:-$PL/pkg}
AS=$CMP/ours-assets; ST=$PL/state; PFX=$PL/prefix; BIN=$PKG/bin
diff --git a/scripts/e2e/codex/prefill/pf_sparse_requeue.sh b/scripts/e2e/codex/prefill/pf_sparse_requeue.sh
new file mode 100644
index 00000000..28af41c2
--- /dev/null
+++ b/scripts/e2e/codex/prefill/pf_sparse_requeue.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+# Prefill fixed-latency program: put a job back in the queue behind a SPARSE lab holder. Started DETACHED by pf_ab_job.sh (guard: the inherited sealed memfd is not
+# sparse), after the job has touched jobs/STOP and closed the holder's descriptor and exited. Waits for the holder to end, starts the sparse one (pf_holder_window.sh),
+# then removes JOB.done so the new holder's queue picks the job again (its name stays in jobs/PRIORITY). pf_sparse_requeue.sh JOBNAME. Test tooling, never in serving.
+set -u
+JOB=${1:?job name}
+PL=/data/leleka-e2e/prefill-latency
+J=$HOME/work/gpu-runs/holder2/jobs
+NOTES=/data/leleka-e2e/decode/notes.md
+echo "[$(date -u +%FT%TZ)] [DEV prefill-latency] $JOB found a non-sparse memfd: sparse holder restart, then $JOB runs again" >> "$NOTES"
+bash "$PL/tools/pf_holder_window.sh" "requeue-$JOB" sparse
+for _ in $(seq 1 60); do [ -f "$J/READY" ] && break; sleep 5; done
+rm -f "$J/$JOB.done"
+echo "[$(date -u +%FT%TZ)] [DEV prefill-latency] $JOB queued again behind the sparse holder" >> "$NOTES"