Skip to content

fix: avoid Invalid string length when combining many hashes#16

Merged
maastrich merged 1 commit intomainfrom
fix/invalid-string-length
Apr 24, 2026
Merged

fix: avoid Invalid string length when combining many hashes#16
maastrich merged 1 commit intomainfrom
fix/invalid-string-length

Conversation

@maastrich
Copy link
Copy Markdown
Owner

Summary

Test plan

  • New tests/combine-hashes.test.ts — output matches sha256(join) on small input; handles 10M hashes (640M chars) without throwing; asserts hashes.join("") still throws on that size (regression guard)
  • vp test — 91/91 passing
  • vp check clean

🤖 Generated with Claude Code

combineHashes joined the full hash list into one string before feeding
sha256; on large graphs that string exceeds V8's max length. Update the
hasher one entry at a time — sha256 is incremental, so the output is
unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

📖 Docs preview: https://maastrich.github.io/hashup/branches/pr-16/

@maastrich maastrich merged commit 9c3d09e into main Apr 24, 2026
3 checks passed
@maastrich maastrich deleted the fix/invalid-string-length branch April 24, 2026 09:34
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