Skip to content

fix(workers): ignore nullish document additions - #855

Open
sergioperezcheco wants to merge 1 commit into
krisk:mainfrom
sergioperezcheco:fix/worker-nullish-add
Open

sergioperezcheco wants to merge 1 commit into
krisk:mainfrom
sergioperezcheco:fix/worker-nullish-add

Conversation

@sergioperezcheco

Copy link
Copy Markdown

FuseWorker.add(null) and add(undefined) advance the proxy's document and shard indices even though the underlying Fuse.add ignores those values, so later valid additions can return incorrect refIndex values. Ignore nullish documents before lazy initialization or bookkeeping, matching the existing single-thread API while keeping defined falsy values unchanged. Add regressions for pre-initialization calls, one and three workers, interleaved additions, empty and nonempty queries, and falsy controls; regenerate the committed worker proxies. On Node 22/macOS, all 454 tests, the native build, lint, and typecheck pass, with rebuilt ESM/CommonJS worker consumers and native Chromium Web Workers also checked; Node 20/24, Linux, Firefox, and WebKit were not tested locally. This contribution was prepared and reviewed/tested by autonomous Hermes AI agents for sergioperezcheco and has not received human review.

Assisted-by: Hermes AI agents
Signed-off-by: sergioperezcheco <checo520@outlook.com>

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