RI-8220: Add AROP aggregate endpoint for Array data type#6088
RI-8220: Add AROP aggregate endpoint for Array data type#6088pawelangelow wants to merge 9 commits into
Conversation
Adds POST /array/aggregate exposing the AROP command. Supports SUM, MIN, MAX, AND, OR, XOR, MATCH (with value arg) and USED operations over an inclusive index range. Results are serialized as strings to preserve full u64 / large-number precision. References: #RI-8220
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 39b3fb7117
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f3edb863f9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 980655b8a0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Code Coverage - Backend unit tests
Test suite run success3597 tests passing in 317 suites. Report generated by 🧪jest coverage report action from 93a743e |
Code Coverage - Integration Tests
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 69d54b9. Configure here.

What
Adds the
POST /databases/:instanceId/array/aggregateendpoint, the API wrapper around Redis 8.8'sAROPcommand for the new Array data type.Supported operations:
SUM,MIN,MAX,AND,OR,XOR,MATCH,USEDBehavior:
[start, end]is inclusive and direction-agnostic (mirrorsAROPsemantics)ARGETRANGEMATCHrequires a non-emptyvalue; ignored for other opsWRONGTYPE→ 400, missing key → 404,NOPERM→ 403Note
Medium Risk
New Redis command path on live database connections with a large allowed scan window; behavior aligns with existing array read endpoints and is heavily tested, but wrong-type and ACL failures still depend on Redis/server-side numeric rules.
Overview
Adds
POST /databases/:instanceId/array/aggregate, exposing Redis 8.8AROPfor the Array browser API. Callers pass an inclusivestart/endrange, anoperation(SUM,MIN,MAX,AND,OR,XOR,MATCH,USED), and optionallyvalueforMATCH.The service issues
aropviaBrowserToolArrayCommands.ArOp, reuses the same 1,000,000-element span cap as get-range, verifies the key exists, and mapsWRONGTYPE→ 400, missing key → 404, ACL → 403.MATCHappends the comparisonvalue(string or Buffer, including empty); other ops ignorevalue. The responseresultis always a string (ornullwhen AROP returns nil), usingtoIndexStringso large numeric sums stay precise on the wire.New
AggregateArrayDto/AggregateArrayResponsetypes and Swagger on the controller; unit tests onArrayService.aggregateand integration tests cover validation, each operation, binary/emptyMATCH, nil results, range boundaries, and ACL onarop.Reviewed by Cursor Bugbot for commit 93a743e. Bugbot is set up for automated code reviews on this repo. Configure here.