Skip to content

Hash global graph inputs in bounded chunks - #28

Draft
dajiaohuang wants to merge 1 commit into
Graphicle-AI:mainfrom
dajiaohuang:w18/global-add-graph-size-cap
Draft

dajiaohuang wants to merge 1 commit into
Graphicle-AI:mainfrom
dajiaohuang:w18/global-add-graph-size-cap

Conversation

@dajiaohuang

Copy link
Copy Markdown
Contributor

Summary

GlobalStore::add hashes a graph source before the configured graph-size check runs during parsing. file_hash used fs::read, temporarily allocating the complete source file even when the import is later rejected for exceeding the cap.

Hash the file in fixed 64 KiB chunks, preserving the existing first-16-hex SHA-256 key. Retry interrupted reads and propagate other I/O errors. Add a multi-chunk Rust regression and an independent SHA-256 comparison to the Graphify parity harness.

Verification

  • cargo fmt --check: passed.
  • Focused file_hash Rust test: passed.
  • Strict Clippy with Rust 1.95, default features: passed.
  • Full default Rust suite: 338 passed, 4 failed, 3 ignored. The failures are in existing Windows path/Golang extractor tests, outside this change.
  • Required postgres,bedrock,transcription feature Clippy could not compile because this environment has no OpenSSL development installation (openssl-sys failure).
  • The Graphify parity harness could not start because its pinned reference/Graphify-Labs__graphify-0.9.95 source directory is absent in this checkout.

No dependency changes. CI was not queried.

Signed-off-by: dajiaohuang <mikewushuwen@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