# Real Linux RAM hotplug proof

The single scenario uses the real web client, replay provider, terminal service,
Linux memory hotplug, and the real systemd user manager. It does not mock RAM or
systemctl. Use a disposable Linux VM with sudo and removable memory blocks.

Copy agent-slice-live-memory.e2e.ts into scripts/scenarios in current main and
install dependencies with `vp i`. For shrink, run scenarios:prove with
SHELL=/bin/dash, T3CODE_DEV_SEED=0 and
T3_SCENARIO_INHERIT_ENV=XDG_RUNTIME_DIR,DBUS_SESSION_BUS_ADDRESS,SHELL,T3CODE_DEV_SEED.
Use the base and head SHAs specified in the proof.

For grow, apply growth-startup-hook.patch to the runner checkout. Set
PROOF_PREPARE_GROW to the absolute path of prepare-growth.py and PROOF_MEMORY_STATE
to an unused scratch file. Set PROOF_DIRECTION=grow and add PROOF_* to
T3_SCENARIO_INHERIT_ENV. Run the same scenario and revisions. The hook removes
one block before each server starts and records its path; the scenario restores
it while the server remains running, then clicks New Terminal.

Both runs seed fresh synthetic memory-demo projects and one replay thread.
The report in each app terminal reads MemTotal and real systemd slice properties,
calculates the existing formula and prints expected/actual values and its cgroup.
The JSON assertion uses those same real readings. The scenario restores online
memory and the shared slice limits in a finally block. No source changes were
committed. Videos trim initial page loading; the interaction and output are intact.

Observed RAM totals were 16768798720 and 16634580992 bytes (128 MiB apart).
Full RAM limits: MemoryHigh=10326347776, MemoryMax=12576599040.
Reduced RAM limits: MemoryHigh=10192130048, MemoryMax=12475935744.
Both comparisons exited 0: failed on base, passed on head.
