Skip to content

Release 3.2.1: records.update sends its fields under data - #30

Merged
1pxone merged 1 commit into
mainfrom
fix/records-update-body
Nov 7, 2026
Merged

1pxone merged 1 commit into
mainfrom
fix/records-update-body

Conversation

@1pxone

@1pxone 1pxone commented Nov 7, 2026

Copy link
Copy Markdown
Member

records.update(target, data, label=) sent PATCH /records/{id} with the fields at the top level of the body. RushDB Cloud reads a record write as {label, data, options} (or {label, properties: [...]}), the shape the JavaScript SDK sends for records.update and this SDK sends for records.set. Cloud therefore ignored the update, or answered 500 without a label (seen in rush-db/langchain-rushdb CI).

  • records.update now sends {"label": ..., "data": {...}}. The public signature is unchanged.
  • Direct mode read the flat body too, which hid the bug. Its record writes (POST /records, PUT/PATCH /records/{id}) now take data or a properties list, as Cloud does, and refuse anything else with 400. A field named label, options or data is stored as a field instead of being dropped.

Tests:

  • tests/test_records_write_body.py: the body update and set send to Cloud.
  • tests/test_direct_mode.py: update merges the data object, a flat body is refused, property drafts are written.
  • tests/test_direct_mode_live.py: update with a label and a field named label against a real engine (rushdb/rushdb:3.0.4). It fails without the fix.

Version 3.2.1 (patch). After merge, publish the GitHub release v3.2.1 to upload to PyPI.

Fixes #29

records.update(target, data, label=) sent PATCH /records/{id} with the
fields at the top level of the body. RushDB Cloud reads a record write as
{label, data, options} (or {label, properties: [...]}), as the JavaScript
SDK and records.set send it, so it ignored the update, or answered 500
without a label. update now sends {"label": ..., "data": {...}}.

Direct mode read the flat body too, which hid the bug. Its record writes
now take data or a properties list, as Cloud does, and refuse anything
else with 400; a field named label, options or data stays a field.

Fixes #29
@1pxone
1pxone merged commit d8f6995 into main Nov 7, 2026
6 checks passed
@1pxone
1pxone deleted the fix/records-update-body branch November 7, 2026 19:26
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.

records.update sends a flat body; RushDB Cloud ignores the update

1 participant