validateAddParams() treated '' as falsy and rejected it with "Missing
required field 'data'" — so a legitimate empty file's first write always
failed. Only null/undefined data (with no vector either) is genuinely
absent; '' is real content. Fixed the check, plus the identical bug in
validateUpdateParams() (truncating a file to empty via overwrite hit the
same falsy check) and in update()/transact()'s update planner, where a
plain `Boolean(params.data)`/truthy check on the resolved vector would have
silently skipped both the deferred-embed marker and the eager re-embed for
an emptied value — a stale vector with no path to ever correct itself.
Verified end-to-end: vfs.writeFile('/empty.txt', '') now succeeds,
readFile() returns '', the file lists, and stat() reports size 0; the
existing "should reject empty string as data" tests (unit + integration)
asserted the old buggy behavior and are updated to assert the fixed
contract instead.
|
||
|---|---|---|
| .. | ||
| add.test.ts | ||
| batch-operations.test.ts | ||
| brain-format-handshake.test.ts | ||
| counts-by-type-fix.test.ts | ||
| degraded-reads-surfaced.test.ts | ||
| fill-subtypes.test.ts | ||
| find-agg-edge-cases.test.ts | ||
| find-complement-operators.test.ts | ||
| find-include-vectors.test.ts | ||
| find-index-integrity-guard.test.ts | ||
| find-orderby-pagek.test.ts | ||
| find.test.ts | ||
| get.test.ts | ||
| graph-analytics.test.ts | ||
| graph-export.test.ts | ||
| graph-native-routing.test.ts | ||
| graph-subgraph.test.ts | ||
| hybrid-search.test.ts | ||
| lazy-notready-honor.test.ts | ||
| maintenance-debt.test.ts | ||
| metadata-provider-contract.test.ts | ||
| migration-deference.test.ts | ||
| migration-gate-family-scoped.test.ts | ||
| open-path.test.ts | ||
| persistence-policy.test.ts | ||
| relate-duplicate-optimization.test.ts | ||
| relate.test.ts | ||
| related-node-bidirectional.test.ts | ||
| related-visibility-fast-path.test.ts | ||
| similar-threshold.test.ts | ||
| update.test.ts | ||
| upsert.test.ts | ||
| visibility.test.ts | ||
| warm.test.ts | ||