Repository navigation
fix(compression): bump vendored GCF with numeric-domain and surplus fixes - #10807
Merged
diegosouzapw merged 1 commit intoAug 21, 2026
Merged
diegosouzapw merged 1 commit into
diegosouzapw merged 1 commit into
Conversation
…ixes The vendored GCF generic encoder/decoder was current with spec v3.2. Two correctness fixes shipped upstream since; port both, each with a regression test. - formatNumber gated plain-decimal at abs < 1e21, so an integer-valued double in [2^53, 1e21) emitted as a bare-integer token: indistinguishable from an int64 on the wire and beyond a JS decoder's safe-integer range (2^53-1), so rejected or misread on decode. Gate at 2^53 so such values render as exponent (SPEC 2.3.1). - The root-array decode discarded parseArrayFromHeader's consumed count, so a wire declaring fewer rows than present silently dropped the surplus. Verify consumed covers the whole document and throw count_mismatch otherwise (SPEC 13). The existing B-GCF-QUOTE inline-array-quote guard still passes.
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…ixes (diegosouzapw#10807) Validado no worktree combinado do lote: typecheck:core, lint, gates de qualidade e os novos testes gcf-numeric-domain/gcf-count-mismatch verdes (mais os já existentes do codec GCF). Fix de losslessness bem documentado e cirúrgico. CI vermelho neste PR é o base-red já rastreado em diegosouzapw#9985. Obrigado!
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.
Summary
scalar.tsformatNumberemitted plain-decimal up to1e21, so an integer-valued double in[2^53, 1e21)was written as a bare integer that is ambiguous with an int64 and beyond the JS safe-integer range. Gate the plain form at2^53and use exponent form above it (SPEC 2.3.1). Shorter than the bare integer, so no budget regression.decode_generic.tsdiscardedparseArrayFromHeader'sconsumedcount, so a wire declaring fewer rows than it carried silently dropped the surplus. Verify the consumed lines cover the document and throwcount_mismatchotherwise (SPEC §13).Related Issues
Validation
open-sse/services/compression/engines/headroom/gcf)gcf-inline-array-quotetest pass locallynpm run lint: prettier is clean on the touched files; the fullcheck:compression-budgetandtypecheck:coregates could not run in my environment (missing optionalomniglyphdependency) and are left to CI (docs: official 'golden path' contribution guide by change type #8329)release/v3.8.50, 0 commits behind at push)Tests Added Or Updated
tests/unit/compression/gcf-numeric-domain.test.ts(new) — integer-valued double at/above2^53renders in exponent form, not a bare integertests/unit/compression/gcf-count-mismatch.test.ts(new) — a root array carrying more rows than its declared count throwscount_mismatch; an exact count decodes normallyCoverage Notes
open-sse/services/compression/engines/headroom/gcf/{scalar.ts, decode_generic.ts}. The two new tests cover both changed branches (the numeric formatting boundary and the root-array surplus guard). No touched file loses coverage.Reviewer Notes
< 2^53are byte-for-byte identical), and the decode change adds a guard that turns a previously silent truncation into an explicit error.generic.tsis intentionally left untouched to avoid a lint-staged prettier reformat of its pre-existing long lines. The vendored file headers note both fixes and the README credits entry is refreshed to match.