Skip to content

fix: use original keys in key-transform query filters - #379

Open
sueun-dev wants to merge 1 commit into
ipfs:mainfrom
sueun-dev:fix-keytransform-query-filters-20260927
Open

sueun-dev wants to merge 1 commit into
ipfs:mainfrom
sueun-dev:fix-keytransform-query-filters-20260927

Conversation

@sueun-dev

Copy link
Copy Markdown

KeyTransformDatastore.query() and queryKeys() apply convert() to already-transformed keys before calling user filters. A filter on the original key can then reject matching entries. Use invert() instead, consistent with the prefix and ordering paths.

Adds four regressions for original-key filters, ordering/pagination, and ShardingDatastore. All four fail on 58d2e06 and pass with this change. A separate check with ShardingDatastore over FsDatastore also went from empty results to the expected keys.

Checked locally on Linux arm64 with Node 24.21.0:

  • npm run build, npm run lint, npm run dep-check
  • npm run test:node: 835 passing across the monorepo
  • npm run test:chrome --workspace datastore-core, npm run test:chrome-webworker --workspace datastore-core, npm run test:firefox --workspace datastore-core, npm run test:firefox-webworker --workspace datastore-core: 284 passing each

Electron and the Windows/macOS matrix were not run locally. AI-assisted change.

This branch has not been deployed

No deployments
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.

1 participant