Repository navigation
Keep the links.json compatibility tests valid with a floating property - #4754
Merged
Merged
Conversation
…n property The tests put arbitrary shapes under the name floating. That name is unknown to the current reader, so any shape is ignored, but the build that adds the section reads it as a typed property and rejects a string there. The arbitrary shapes now use names no reader knows, and floating keeps only the shape a later build writes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4754/ |
Mpdreamz
enabled auto-merge (squash)
November 5, 2026 19:03
Mpdreamz
disabled auto-merge
November 5, 2026 19:12
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.
Four of the compatibility tests from #4752 would fail as soon as #4731 lands, because they put arbitrary shapes under the name
floating. They now use names no reader knows, so they hold before and after.Affects: Links & redirects
Prompt summary: Serve the latest
mainand the branch that has every pull request merged. The full test run on that branch found a flaw in the tests added in #4752.Why
On the current
main,floatingis an unknown property, so a string, a number or an array under that name is ignored. In the build that adds the section,floatingis a typed property, and a string there is rejected as invalid data. The tests treated the name as arbitrary, so four of them ("floating": "a string", a number, an array and an object with unknown fields) fail on the branch that merges the whole stack.What
Arbitrary shapes use unknown names
The string, number, array and nested-object cases now sit under
future_string,future_number,future_arrayandfuture_object. They keep their purpose: a reader must ignore a property it does not know, whatever its shape.floatingkeeps its real shapefloatingappears only with the shape a later build writes, which both the current reader (ignores it) and a reader that knows it (reads it) accept.Verify
All 11 tests pass on
mainand on the branch that merges #4718, #4731, #4737 and #4738. With[JsonUnmappedMemberHandling(JsonUnmappedMemberHandling.Disallow)]onRepositoryLinks, all 11 fail.🤖 Generated with Claude Code