Skip to content

Keep the links.json compatibility tests valid with a floating property - #4754

Merged
Mpdreamz merged 1 commit into
mainfrom
test/links-json-compat-future-names
Nov 5, 2026
Merged

Mpdreamz merged 1 commit into
mainfrom
test/links-json-compat-future-names

Conversation

@Mpdreamz

@Mpdreamz Mpdreamz commented Nov 5, 2026

Copy link
Copy Markdown
Member

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 main and 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, floating is an unknown property, so a string, a number or an array under that name is ignored. In the build that adds the section, floating is 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_array and future_object. They keep their purpose: a reader must ignore a property it does not know, whatever its shape.

floating keeps its real shape

floating appears 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

dotnet test --project tests/Elastic.Markdown.Tests --treenode-filter "/*/*/LinksJsonForwardCompatibilityTests/*"

All 11 tests pass on main and on the branch that merges #4718, #4731, #4737 and #4738. With [JsonUnmappedMemberHandling(JsonUnmappedMemberHandling.Disallow)] on RepositoryLinks, all 11 fail.

🤖 Generated with Claude Code

…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>
@Mpdreamz
Mpdreamz requested a review from a team as a code owner November 5, 2026 18:45
@Mpdreamz
Mpdreamz requested a review from technige November 5, 2026 18:45
@Mpdreamz Mpdreamz added the chore label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Docs preview (local build)

Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4754/

@Mpdreamz
Mpdreamz enabled auto-merge (squash) November 5, 2026 19:03
@Mpdreamz
Mpdreamz disabled auto-merge November 5, 2026 19:12
@Mpdreamz
Mpdreamz merged commit 4ff20fe into main Nov 5, 2026
41 of 42 checks passed
@Mpdreamz
Mpdreamz deleted the test/links-json-compat-future-names branch November 5, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant