brainy/tests/unit/storage
David Snelling 682e786cc3 perf(8.0): cursor pagination for the verb walk — full edge pagination O(N²) → O(N)
getVerbsWithPagination was offset-only: it re-scanned from shard 0 on every page
and early-terminated at offset+limit, so a full edge walk was O(N²) (a consumer
measured ~19k edges → 27s paging at 900/page). It now accepts an opaque resume
token (cv1:<shard>:<verbId>) that resumes the shard walk immediately AFTER the
last returned verb — O(N) total at any page size, no scale cliff.

- Stable within-shard order (sort by verb id); ids come from the path so verbs
  skipped by the cursor are never read.
- Cursor supersedes offset when present; offset path preserved for back-compat,
  and offset callers now get a usable nextCursor so they can switch to cursor
  paging. Foreign/malformed tokens decode to null → offset fallback (no throw).
- The relationships stream generator now uses cursor (was offset → O(N²)).
- Parity with the noun side (getNounsWithPagination already cursored).

Test: tests/unit/storage/verb-cursor-pagination.test.ts — a full cursored walk
visits every edge exactly once (no dup, no skip), matches the offset walk's set,
and a foreign cursor falls back gracefully.
2026-06-20 16:55:02 -07:00
..
blobStorage.compression-policy.test.ts feat(8.0)!: delete fork/branch/commit/history/versions — superseded by the Db API 2026-06-10 15:22:47 -07:00
blobStorage.test.ts feat(8.0)!: delete fork/branch/commit/history/versions — superseded by the Db API 2026-06-10 15:22:47 -07:00
getNouns-totalCount.test.ts fix(8.0): getNouns().totalCount reports true total, not page size (port of 7.32.1) 2026-06-17 14:10:06 -07:00
getVerbs-totalCount.test.ts fix(8.0): VFS path-cache instance-scoping + verb totalCount page-cap 2026-06-19 11:45:13 -07:00
sharding.test.ts fix(8.0): accept application-supplied entity ids, not just UUIDs 2026-06-16 10:40:40 -07:00
stats-count-accuracy.test.ts fix(8.0): stats() per-type counts no longer inflate with HNSW re-saves 2026-06-17 17:07:58 -07:00
storage-path-resolution.test.ts feat(8.0): API simplification — remove neural()/Db.search, one storage path key, integration→0 2026-06-20 13:31:11 -07:00
verb-cursor-pagination.test.ts perf(8.0): cursor pagination for the verb walk — full edge pagination O(N²) → O(N) 2026-06-20 16:55:02 -07:00
vfs-mkdir-bug.test.ts chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase 2026-06-11 14:51:00 -07:00