Skip to content

fix(store): repair legacy string hash caches - #398

Merged
singaraiona merged 2 commits into
devfrom
agent/fix-legacy-str-hash-cache
Aug 12, 2026
Merged

fix(store): repair legacy string hash caches#398
singaraiona merged 2 commits into
devfrom
agent/fix-legacy-str-hash-cache

Conversation

@singaraiona

Copy link
Copy Markdown
Collaborator

What changed

  • recompute pooled string descriptor hashes while validating column files, for both copied loads and private mmap loads
  • add a regression that forges distinct nonzero legacy padding for equal strings and verifies correct grouping after load and mmap
  • remove the accidental public Rayfall hash and wyhash builtins, declarations, and documentation while retaining internal structural hashing

Why

Before the string hash cache existed, the final four bytes of an on-disk string descriptor were padding and could contain arbitrary nonzero data. Treating those bytes as a valid cached hash can send equal strings to different join or group slots and silently return incorrect results. Validation now derives the cache from the validated string bytes instead of trusting persisted state. The mmap path uses the existing private copy-on-write mapping, so the source file is unchanged.

Structural hashing was introduced for engine internals and was unintentionally registered as public language API. This PR keeps that implementation detail internal before it becomes a compatibility commitment.

Validation

  • make (clean ASan/UBSan debug build)
  • make test — 3,676/3,676 passed
  • mkdocs build --strict
  • git diff --check
  • registration/declaration/docs audit for public hash and wyhash

Unblocks the audit on release PR #397.

@singaraiona
singaraiona marked this pull request as ready for review August 12, 2026 20:47
@singaraiona
singaraiona merged commit 776b290 into dev Aug 12, 2026
10 checks passed
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