Repository navigation
Inherit the framed flag on derived versioned value schemas - #109
Open
moromisato wants to merge 1 commit into
Open
moromisato wants to merge 1 commit into
moromisato wants to merge 1 commit into
Conversation
When a collection's schema is a versioned type, the builder derives a per-version value schema so stored values keep their version dispatch. That derived type was registered without a framed flag, so it always fell back to the default (framed) regardless of the source type. A versioned schema declared `framed: false` therefore still wrote framed values on disk, which readers built before framing existed cannot decode. Pass the source schema's framed flag through to the derived type, and add a test that a `framed: false` versioned collection value stays unframed.
shavtvalishvili
approved these changes
Sep 22, 2026
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.
When a collection's schema is a versioned type, the builder derives a per-version value schema so stored values keep their version dispatch. That derived type gets registered without a
framedflag, so hyperschema falls back to its default (framed) no matter what the source type said.The effect: a versioned schema declared
framed: falsestill writes framed (length-prefixed) values on disk. Readers built before framing existed then fail to decode them withOut of bounds. I hit this keeping a store readable by older released peers after upgrading to a hyperschema that frames versioned records.The fix is one line — pass the source schema's
framedthrough to the derived type:I added a test to
test/versions.jsthat builds one versioned collection with the default (framed) and one withframed: false, and checks the generatedmessages.js: the default frames its value,framed: falsedoes not. It fails onmainand passes with the change. Full suite stays green (139/139).