Skip to content

fix(api): decode memory observation scopes - #2735

Merged
benfrank241 merged 1 commit into
vectorize-io:mainfrom
Jordan-Jarvis:upstream/fix-memory-observation-scope-shape-20260716
Jul 17, 2026
Merged

fix(api): decode memory observation scopes#2735
benfrank241 merged 1 commit into
vectorize-io:mainfrom
Jordan-Jarvis:upstream/fix-memory-observation-scope-shape-20260716

Conversation

@Jordan-Jarvis

Copy link
Copy Markdown
Contributor

Summary

  • deserialize the JSONB observation_scopes column before returning memory detail/update responses
  • preserve named modes such as shared and explicit tag-group arrays as native JSON values
  • extend the existing invalidation regression to cover the archived memory response shape

Why

The PostgreSQL adapter returns JSONB as encoded JSON text. get_memory_unit() already deserializes other JSON columns but returned observation_scopes directly. A stored shared mode was therefore emitted as the JSON string "\"shared\"" rather than "shared". Strict OpenAPI-compatible clients reject that response after update/invalidation succeeds.

The fix is at the database/API producer boundary and uses the existing backend-aware JSON deserializer, preserving both PostgreSQL and Oracle behavior.

Validation

  • existing PostgreSQL curation/invalidation regression passed with observation_scopes="shared"
  • Ruff check passed
  • Ruff format check passed

@benfrank241
benfrank241 merged commit 4439863 into vectorize-io:main Jul 17, 2026
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