Skip to content

Add JSON.SET FPHA support (8.8)#467

Merged
mgravell merged 3 commits intomasterfrom
marc/json-fpha
Apr 7, 2026
Merged

Add JSON.SET FPHA support (8.8)#467
mgravell merged 3 commits intomasterfrom
marc/json-fpha

Conversation

@mgravell
Copy link
Copy Markdown
Collaborator

@mgravell mgravell commented Mar 23, 2026

  1. unmark 8.4 APIs as [Experimental]
  2. support JSON.SET FPHA, with tests to validate round-trip

the shipped/unshipped had been jumbled, so have been reset; the only delta is the FPHA overloads


Note

Medium Risk
Expands the public API surface (new JsonNumericArrayStorage and new Set/SetAsync overloads) and changes how JSON.SET arguments are constructed, which could affect compatibility with different RedisJSON versions.

Overview
Adds JsonNumericArrayStorage and extends JSON.SET (JsonCommandBuilder.Set, JsonCommands.Set, JsonCommandsAsync.SetAsync) to optionally emit the FPHA modifier for numeric array storage (BF16/FP16/FP32/FP64), while hiding legacy overloads to steer callers to the explicit option.

Removes [Experimental] markers (and the NRS001 warning suppression) from previously gated 8.4 Search/Vector/Hybrid APIs and updates PublicAPI.Shipped/Unshipped accordingly, plus adds JSON round-trip tests validating FPHA behavior (skipped unless Redis >= 8.8).

Written by Cursor Bugbot for commit bffcef8. This will update automatically on new commits. Configure here.

2. support JSON.SET FPHA, with tests to validate round-trip

the shipped/unshipped had been jumbled, so have been reset; the only delta is the FPHA overloads
@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented Mar 23, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Comment thread tests/NRedisStack.Tests/Json/JsonTests.cs Outdated
Comment thread src/NRedisStack/Json/JsonCommandBuilder.cs Outdated
@uglide uglide requested a review from atakavci March 30, 2026 08:40
Copy link
Copy Markdown
Collaborator

@atakavci atakavci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +25 to +32
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public bool Set(RedisKey key, RedisValue path, object obj, When when, JsonSerializerOptions? serializerOptions)
=> Set(key, path, JsonSerializer.Serialize(obj, serializerOptions), when, JsonNumericArrayStorage.NotSpecified);

/// <inheritdoc/>
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public bool Set(RedisKey key, RedisValue path, RedisValue json, When when)
=> Set(key, path, json, when, JsonNumericArrayStorage.NotSpecified);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will keep these until major release, right ?
how about marking them obsolete (also as reminder) here and in async as well?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't a good idea to mark them obsolete, as that will cause unnecessary build warnings/failures (depending on build settings) when the exact combination is specified; I try to avoid drama if at all possible.

@mgravell mgravell merged commit 76e30bd into master Apr 7, 2026
28 checks passed
@mgravell mgravell deleted the marc/json-fpha branch April 7, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants