From b0a0fc31453a351b50ee3bfceb9212b92ce4ff46 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 21 Oct 2026 17:54:06 -0400 Subject: [PATCH] The practice copy is bounded by free disk alone A fixed 3 GiB cap sat beside the free-space check that already bounds what a rehearsal copy can cost. The live bus reached 3.01 GiB with 29 GiB free, and install 45 was refused on the cap alone. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AeUaZjvChAcb6qAd6zPYmw --- src/agent_comms/installer/practice.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/agent_comms/installer/practice.py b/src/agent_comms/installer/practice.py index 376cd7d2cf..345981e4b9 100644 --- a/src/agent_comms/installer/practice.py +++ b/src/agent_comms/installer/practice.py @@ -25,14 +25,12 @@ class PracticeMeasurement: bytes: int seconds: float - max_bytes = 3 * 1024**3 - @classmethod def of(cls, copy: Path, seconds: float, floor: float) -> PracticeMeasurement: - """Refuse a copy over its cap or without room for the rehearsal's second copy.""" + """Refuse a copy without room for the rehearsal's second copy above the disk floor. The + free space is what a copy can cost; a fixed byte cap beside it refused a 3.01 GiB bus + with 29 GiB free and stopped install 45.""" size = sum(path.stat().st_size for path in copy.rglob("*") if path.is_file()) - if size > cls.max_bytes: - raise UpgradeRefused(f"Practice copy is {size} bytes, over its {cls.max_bytes} cap") if shutil.disk_usage(copy.parent).free < 2 * size + floor: raise UpgradeRefused(f"Insufficient free space for rehearsal of {size} copied bytes") return cls(size, seconds)