Repository navigation
fix: drop the percentage free-space floor everywhere - #234
Conversation
171bd40 to
3fcae4d
Compare
|
Decision (Anders, 5 October): drop the percentage floors as proposed, with one change: user-facing writes (update staging, installer, model and content downloads) keep one shared fixed reserve of 2 GiB on top of the bytes they write, so a disk is never filled to zero; |
90b6512 to
a7c23c3
Compare
The 5 October decision on #234 keeps one shared, fixed reserve on top of the bytes a user-facing write needs, so a disk is never filled to zero. - FREE_SPACE_RESERVE_BYTES (2 GiB) lives in elastos-common. The update space check uses it, which covers update staging, support staging and the update controller's check. - install.sh keeps the same value and checks the temporary download directory and the install directory for the binary's size plus the reserve before it writes anything. A Rust test keeps the installer's value equal to the Runtime's. - AGENTS.md keeps a housekeeping rule for development and staging volumes as a fixed, per-machine amount (ELASTOS_DEV_MIN_FREE_GB, default 15 GB), never a share of the volume. Part of #108.
a7c23c3 to
901b76b
Compare
The 5 October decision on #234 keeps one shared, fixed reserve on top of the bytes a user-facing write needs, so a disk is never filled to zero. - FREE_SPACE_RESERVE_BYTES (2 GiB) lives in elastos-common. The update space check uses it, which covers update staging, support staging and the update controller's check. - install.sh keeps the same value and checks the temporary download directory and the install directory for the binary's size plus the reserve before it writes anything. A Rust test keeps the installer's value equal to the Runtime's. - AGENTS.md keeps a housekeeping rule for development and staging volumes as a fixed, per-machine amount (ELASTOS_DEV_MIN_FREE_GB, default 15 GB), never a share of the volume. Part of #108.
901b76b to
6d0390e
Compare
Disk checks across the Runtime, release tooling, CI and the local pre-push gate demanded that a fixed share of the whole volume (10% or 15%) stay free. That share scales with volume size, not with the work: on a 460 GiB Mac it demanded 46 GiB and blocked builds, tests, updates and model downloads, and on large volumes it demanded terabytes. Each check now requires only that the bytes it is about to write fit in the available space. Existing exact-byte accounting, overflow and consistency checks, and fixed safety margins stay. An update that does not fit still refuses with "not enough free space for the update; previous release preserved". The local pre-push gate always runs its Rust checks, and the hosted Mac release capacity check needs only its planned growth. The absolute minimums stay unchanged: source-home setup keeps 16 GiB and the media tools build keeps 4 GiB. AGENTS.md and the content distribution and scripts docs drop the percentage requirement; dated audits are left as historical records.
The 5 October decision on #234 keeps one shared, fixed reserve on top of the bytes a user-facing write needs, so a disk is never filled to zero. - FREE_SPACE_RESERVE_BYTES (2 GiB) lives in elastos-common. The update space check uses it, which covers update staging, support staging and the update controller's check. - install.sh keeps the same value and checks the temporary download directory and the install directory for the binary's size plus the reserve before it writes anything. A Rust test keeps the installer's value equal to the Runtime's. - AGENTS.md keeps a housekeeping rule for development and staging volumes as a fixed, per-machine amount (ELASTOS_DEV_MIN_FREE_GB, default 15 GB), never a share of the volume. Part of #108.
6d0390e to
0c67287
Compare
|
@andersalm the requested changes have been pushed, just waiting for the CI to complete now |
The disk line now reports free space and applies no threshold of its own; the shared free-space rule (#234) owns any warning. The header comment no longer says setup fetches a model catalog, which is no longer part of the release. Co-authored-by: Cursor <cursoragent@cursor.com>
develop's refused-release work (#257) classifies a space refusal through DiskReserveError, which this branch renamed to UpdateSpaceError; its test now uses the branch's type. No textual conflicts.
The 5 October decision on #234: no percentage floors; user-facing writes keep one fixed 2 GiB reserve on top of their own bytes. - elastos-common owns FREE_SPACE_RESERVE_BYTES, NotEnoughFreeSpace and require_free_space (needed + 2 GiB <= available). The refusal reads "not enough free space: this needs N GB plus 2 GB kept free". - Update staging, support staging, the update controller and the installer's install-release writer use it through require_update_space; the controller classifies NotEnoughFreeSpace as a space refusal (replaces UpdateSpaceError). - Model and content preparation (inventory reservation and the private backend capacity check) and Browser image preparation use the same check. - install.sh keeps the same value and wording; a Rust test keeps the value equal to the constant. - AGENTS.md keeps its 10% housekeeping rule for development volumes, as decided; the per-machine ELASTOS_DEV_MIN_FREE_GB rule is dropped. Boundary tests: exactly needed + 2 GiB is accepted and one byte less refused for update staging/installer writer, model preparation, the backend capacity check and install.sh. Part of #108.
First-party component installs over Carrier and CID downloads wrote their bytes during setup and Marketplace installs without a space check. Both paths now admit the write with require_free_space before writing: a plain component needs its own bytes on the destination volume; a tarball needs the archive and its unpacked tree on the temp volume and the unpacked tree on the destination, counted once per shared volume. install_transaction::volume_space reports the nearest existing ancestor's device and available bytes. The refused .gguf branch is unchanged. Part of #108.
|
@irzhywau as agreed, the operator took over this rebase. On top of your 0c67287:
Tests: boundary tests at exactly bytes + 2 GiB; 108 setup tests pass; the pre-push gate passed. GPT-6 Sol review: PASS after one gap (setup component writes) was fixed. It merges when CI is green. #123 now targets develop; I'll rebase it after this merges. |
…Home gets a controller (#89) #234 dropped the percentage floor from this harness, so prepare-ci-disk now reclaims only to 20 GiB free. The pinned 0.8.0-alpha.6 still keeps 15% of the volume free before it creates its update controller; below that its Home opens without one ('Free disk space before updating'), and the journey waited for a controller that never came. prepare-ci-disk now reclaims to 20 GiB plus that reserve, and the journey refuses plainly before starting the published Home when the runner is below it.
…GB rule (#234), installer steps (#253) alpha.7 is built from develop after #259 merges, which now includes #234 and #253. alpha.6's System update refuses any release whose support changed (update.rs@252166bc:1687-1691); its Terminal update accepts it. (cherry picked from commit 40dde8604026369bfb796db9cef9bed55ee7479f)
Removes every free-space check that demanded a fixed share of the volume (10% or 15%) stay free.
Why
A share of capacity scales with the disk, not with the work. On a 460 GiB Mac the 10% rule demanded 46 GiB and blocked builds, tests, updates and model downloads; on large volumes it would demand terabytes. #123's review asked for this change to leave #123 and come as its own PR. #203 also drops the 10% floor, inside its cutover commit, and can take this version when it rebases.
What changes
Fixed 2 GiB reserve (5 October decision)
FREE_SPACE_RESERVE_BYTES(2 GiB) inelastos-common, kept free on top of the bytes a user-facing write needs, so a disk is never filled to zero.require_update_spaceuses it, which covers update staging, support staging and the update controller's check (require_controller_update_space, formerlyrequire_controller_disk_reserve).install.shkeeps the same value and checks the download folder and the install folder for the binary's size plus the reserve before writing. A Rust test fails if the two values ever differ.AGENTS.mdkeeps the housekeeping rule for development and staging volumes as a fixed, per-machine amount (ELASTOS_DEV_MIN_FREE_GB, default 15 GB), never a share of the volume.Verification (local, macOS arm64, rebased on
develop0200582b)just test-elastos(same as CI, with provider binaries), run with Chat and People with Home: connect, approve contacts and recover (#86) #123's commits on top: 4076 passed, 0 failed. Clippy with-D warningsandcargo fmt --checkare clean, and the new capsule lint passes foripfs-provider.release-signer-test.pyfails the same 2 tests on unchangeddevelopin this environment (also seen throughrelease-platform-input-test.py, which reruns it), andupdate-hop-compare-test.pyhas one Python 3.14 tarfile fixture error in a test this PR does not touch.