Skip to content

Commit f75f551

Browse files
calvinbrewerclaude
authored andcommitted
fix(protect-dynamodb): use cast_as === 'json' not 'jsonb'
The branch reconstructing the SteVec storage payload from DynamoDB attributes was gated on `cast_as === 'jsonb'`, but protect-ffi's `CastAs` union has no `'jsonb'` member — the value the schema emits for JSON columns is `'json'`. The branch was dead, so JSON / ste_vec columns were silently rebuilt as a scalar `{k:'ct', c}` payload, losing the `sv` array on the way back out. The sibling `packages/stack/src/dynamodb/helpers.ts` already uses `'json'` correctly — the two files had drifted. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f743fcc commit f75f551

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/protect-dynamodb/src/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export function toItemWithEqlPayloads(
186186
// Worth noting, that encryptConfig.columns[columnName] will be undefined if isNested is true.
187187
if (
188188
!isNested &&
189-
encryptConfig.columns[columnName].cast_as === 'jsonb' &&
189+
encryptConfig.columns[columnName].cast_as === 'json' &&
190190
encryptConfig.columns[columnName].indexes.ste_vec
191191
) {
192192
return {

0 commit comments

Comments
 (0)