fix(compilers/openapi): report a bare deprecation extension key - #463
Open
fuad-daoud wants to merge 1 commit into
Open
fix(compilers/openapi): report a bare deprecation extension key#463fuad-daoud wants to merge 1 commit into
fuad-daoud wants to merge 1 commit into
Conversation
JSON null decodes into a plain string without error and leaves it empty, so a bare `x-sunset:` read as text that says nothing: an empty field written, the node marked inferred, and no diagnostic — while the doc beside it says a value of another shape is a document meaning something else by the key. Decode into *string so a key with no value is told apart from an empty string a document wrote, and report it as the other shapes are. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011T5no6iADeMGgYjsYcV5in
fuad-daoud
force-pushed
the
fix/bare-extension-key-declines
branch
from
September 13, 2026 14:53
6a94494 to
2350d1d
Compare
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
extensionTextdecoded a preserved extension value into a plainstring, and JSONnulldecodes into one without error, leaving it empty. So a bare key —x-sunset:with no value, the natural presence-only spelling in YAML — read as text that says nothing: an emptyDeprecationfield written, the node markedextension-promotion, and no diagnostic, while the comment beside the decode says a value of another JSON shape "is a document meaning something else by the key".Decode into
*stringso a key with no value is told apart from an empty string a document actually wrote, and report it the way the other shapes are (openapi/degraded-construct, info). Found in review of #439, whereextensionOpennesshad the samenull-into-a-value-type decode; that one is fixed on the stack, and this is the same mechanism onmain, swept as its own change.Test plan
TestPromoteDeprecation_ValueThatIsNotTextIsReportedis a table now, with anullrow beside the number; reverting the decode reddens exactly that row.make gategreen from a clean worktree.🤖 Generated with Claude Code
https://claude.ai/code/session_011T5no6iADeMGgYjsYcV5in