Skip to content

Handle withattribs for version < 8.0.3#5917

Merged
dantovska merged 4 commits into
mainfrom
feature/withattribs-support-starts-8-0-3
May 19, 2026
Merged

Handle withattribs for version < 8.0.3#5917
dantovska merged 4 commits into
mainfrom
feature/withattribs-support-starts-8-0-3

Conversation

@dantovska
Copy link
Copy Markdown
Contributor

@dantovska dantovska commented May 14, 2026

What

VSIM ... WITHATTRIBS is broken on Redis 8.0.0–8.0.2 (fixed in 8.0.3+). Added a VsimWithAttribs feature flag and made the WITHATTRIBS token optional in the VSIM command/preview/parse helpers.
On unsupported versions, the service omits WITHATTRIBS and back-fills attributes via a single VGETATTR pipeline (one entry per match). The controller, DTOs, request, and response shapes are unchanged.

Testing

  1. Connect to Redis 8.0.0–8.0.2 → run a similarity search on a vector set with attributes; verify results include attributes and the preview omits WITHATTRIBS.
  2. Connect to Redis ≥ 8.0.3 → verify the canonical single-round-trip path still works and the preview shows WITHATTRIBS.

Note

Medium Risk
Adds Redis-version-dependent behavior to the VectorSet similarity search path and introduces an additional VGETATTR pipeline fallback, which could impact correctness/performance on affected Redis versions if mishandled.

Overview
VectorSet similarity search is now Redis-version aware for WITHATTRIBS. The service checks a new RedisFeature.VsimWithAttribs (fixed in Redis ≥ 8.0.3), conditionally omits WITHATTRIBS from the VSIM command/preview, and updates reply parsing to support both stride-3 (with attributes) and stride-2 (scores only) responses.

On Redis 8.0.0–8.0.2, the API keeps the response shape stable by back-filling per-match attributes using a single VGETATTR pipeline (swallowing per-element errors). Tests and factories are updated to cover both the canonical path and the fallback behavior, and Redis feature detection is refactored to use a shared version-check helper.

Reviewed by Cursor Bugbot for commit fcae09a. Bugbot is set up for automated code reviews on this repo. Configure here.

@dantovska dantovska self-assigned this May 14, 2026
@dantovska dantovska requested a review from a team as a code owner May 14, 2026 12:28
@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented May 14, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

Code Coverage - Backend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 92.68% 15641/16877
🟡 Branches 74.81% 4928/6587
🟢 Functions 86.75% 2436/2808
🟢 Lines 92.51% 14949/16159

Test suite run success

3439 tests passing in 307 suites.

Report generated by 🧪jest coverage report action from fcae09a

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

Code Coverage - Integration Tests

Status Category Percentage Covered / Total
🟡 Statements 79.45% 17537/22071
🟡 Branches 61.86% 8029/12979
🟡 Functions 68% 2431/3575
🟡 Lines 79.02% 16492/20870

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 82.83% 24662/29776
🟡 Branches 68.04% 10358/15223
🟡 Functions 78.01% 6664/8543
🟢 Lines 83.29% 24084/28916

Test suite run success

6976 tests passing in 803 suites.

Report generated by 🧪jest coverage report action from fcae09a

@dantovska dantovska force-pushed the feature/withattribs-support-starts-8-0-3 branch from 02dfae0 to fd0ec8f Compare May 19, 2026 06:56
@dantovska dantovska force-pushed the feature/withattribs-support-starts-8-0-3 branch from 8c9dcb9 to fcae09a Compare May 19, 2026 10:32
@dantovska dantovska merged commit 7f083b7 into main May 19, 2026
30 checks passed
@dantovska dantovska deleted the feature/withattribs-support-starts-8-0-3 branch May 19, 2026 12:00
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