Skip to content

fix(validation): reject unaddressable dictionaries#22

Merged
gargiulofrancesco merged 1 commit into
developfrom
fix/dictionary-token-limit
Jul 15, 2026
Merged

fix(validation): reject unaddressable dictionaries#22
gargiulofrancesco merged 1 commit into
developfrom
fix/dictionary-token-limit

Conversation

@gargiulofrancesco

Copy link
Copy Markdown
Collaborator

Rejects compact dictionaries containing more than 65,536 tokens during validation, preventing dictionaries that cannot be addressed by the u16 token type from becoming trusted.

Adds regression coverage for the exact 65,536-token boundary and rejection above it, and documents the limit in the dictionary invariants and interchange format.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codspeed-hq

codspeed-hq Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will improve performance by 37.34%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 4 improved benchmarks
❌ 2 regressed benchmarks
✅ 26 untouched benchmarks
⏩ 2 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime decompress_all[("l_comment", 16)] 14.8 ms 18.8 ms -21.53%
WallTime decompress_all[("o_comment", 16)] 13.5 ms 16.3 ms -17.25%
WallTime decompress_all[12] 748.1 µs 380.2 µs +96.78%
WallTime decompress_all[16] 744.5 µs 395.7 µs +88.16%
WallTime decompress_all[("p_name", 12)] 1,126.6 µs 629.1 µs +79.09%
WallTime decompress_all[("p_name", 16)] 916.1 µs 587.9 µs +55.83%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing fix/dictionary-token-limit (a4914ef) with develop (ef5ac03)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@gargiulofrancesco
gargiulofrancesco merged commit 28df115 into develop Jul 15, 2026
9 of 12 checks passed
@gargiulofrancesco
gargiulofrancesco deleted the fix/dictionary-token-limit branch July 15, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants