Repository navigation
fix(cli): label byte sizes in binary units - #951
Open
tolgaergin wants to merge 2 commits into
Open
tolgaergin wants to merge 2 commits into
tolgaergin wants to merge 2 commits into
Conversation
Every size LPM CLI prints is counted in 1024s, but read KB, MB and GB: `lpm cache status`, publish, download, self-update, graph and tunnel limits. `lpm_common::format_bytes` now says KiB, MiB and GiB, matching the LPM.dev Registry, which bills remote cache overage per GiB, and the three local copies of it in download, self-update and graph use it instead. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Skill size limits, `lpm whoami` storage, truncated tool output, runtime download caps and tunnel webhook sizes say KiB or MiB. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every size LPM CLI prints is counted in 1024s, but was labelled KB, MB or GB. The LPM.dev Registry now labels sizes in binary units (tolgaergin/a-package-manager#235) and bills remote cache overage per GiB, so the CLI says KiB, MiB and GiB too.
What changes
lpm_common::format_byteslabels KiB, MiB and GiB. It's used acrosslpm cache status, publish, store cleanup, install summaries and more.lpm whoamistorage ("50.00 MiB / 500 MiB");Nothing parses these strings.
lpm store clean --jsonkeepsremoved_bytesnext to its display stringremoved.The docs follow in lpm-dev/rust-client-docs#390 (CLI output examples) and lpm-dev/rust-client-docs#389 (plan sizes).
Testing
The whole CI gate passes locally on ec4a690:
cargo clippy --workspace --all-targets --locked -- -D warnings,cargo fmt --check,cargo build --workspace --lockedcargo test -p lpm-cli --bin lpm-rs -- --test-threads=1: 5,401 passedrunandcacheworkflow tests with the hermetic CLI: 172 passedgraph,skillsandwhoamiworkflow tests, whose expected labels changed: 156 passedformat_byteshas its own unit test now, with the GiB case; the tests that asserted the old labels expect the new ones.🤖 Generated with Claude Code