Repository navigation
fix: measure gzip sizes at level 9 on every Python - #449
Merged
Merged
Conversation
Python 3.15 lowered the default level of gzip.compress and gzip.GzipFile from 9 to 6. The asset budgets were set at level 9, so on Python 3.15 the same CCommandPalette bytes measured 20557 gzip bytes instead of 20389 and failed the 20480-byte budget, in the macOS and Windows 3.15 cells only (the Linux 3.15 cell fails earlier, at install). Main's palette assets have not grown since before #424. Every place that compares or records a gzip size now names level 9: the citry_ui asset report, the i18n client size tests, the protocol runtime baseline script, the client and i18n benchmarks, and the example project archive (whose checksum would otherwise differ by Python version). A test checks that the asset report measures at level 9. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
What this fixes
test_command_palette_assets_stay_within_the_family_budgetsfails in the macOS and Windows Python 3.15 cells, for example on #438, withassert 20557 < (20 * 1024). The cause is that Python 3.15 lowered the default level ofgzip.compressandgzip.GzipFilefrom 9 to 6, so the same bytes compress larger there.What changes
Every place that compares or records a gzip size now passes
compresslevel=9:scripts/protocol_runtime_baseline.py;.sha256file would otherwise differ by Python version.A new test checks that the asset report measures at level 9. Every gzip call in
packages/,scripts/,benchmarks/,examples/anddocs_site/was checked; thezlib.compress(..., 9)calls in the docs already name the level.Evidence
Note on headroom
On main the palette family has 91 bytes of gzip headroom and 55 bytes of brotli headroom. #446 grows the palette past both budgets, so #446 will be trimmed separately.
🤖 Generated with Claude Code