fix: preserve format assertion policy in remote schemas - #134
Open
fitchmultz wants to merge 1 commit into
Open
fitchmultz wants to merge 1 commit into
fitchmultz wants to merge 1 commit into
Conversation
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.
Problem
formatAssertion: falseis respected by a directly compiled schema but lost whenaddRemoteSchemaselects the remote document's draft keywords. A registered email schema therefore rejects a non-email string even though its registering owner requested annotation-only formats.Correction
Default and explicit-true behavior remain unchanged. Newly registered schemas follow their registering owner; already compiled external schemas retain their original policy. No resolver, dialect-selection, dependency, or generated distribution changes are included.
Related work
This addresses remote registration separately from #125 / #121, which correct local schema parsing when assertions are disabled. Thanks to @cpruijsen for the related
addValidateapproach in #125; this PR uses that hook on the remote path to preserve its existing parser. It leaves the local filter unchanged and neither supersedes nor closes #125. When composing the two, retain this context-policy assignment before #125's local keyword mapping.Verification
Based on main
65578c185fc324ebf8fcc8f6e654e85cbfab4da8, with pnpm 10.34.5. Source/tests only. No network validation, external Docker Bowtie, load test, or release was performed.