Skip to content

fix: use chunked read for extension manifest hash - #3841

Merged
mnriem merged 1 commit into
github:mainfrom
Quratulain-bilal:fix/extensions-hash-chunked-read
Jul 30, 2026
Merged

fix: use chunked read for extension manifest hash#3841
mnriem merged 1 commit into
github:mainfrom
Quratulain-bilal:fix/extensions-hash-chunked-read

Conversation

@Quratulain-bilal

Copy link
Copy Markdown
Contributor

Summary

Replace unbounded f.read() with chunked iteration to prevent excessive memory allocation.

Changes

  • extensions/__init__.py: Use chunked read in get_hash() matching integrations/manifest.py pattern

Replace unbounded f.read() with chunked iteration to prevent excessive
memory allocation on large or corrupted manifest files. Matches the
pattern used in integrations/manifest.py _sha256().

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates extension manifest hashing to avoid loading the entire file into memory.

Changes:

  • Reads manifest data in 8 KiB chunks.
  • Preserves the existing SHA-256 output format.
Show a summary per file
File Description
src/specify_cli/extensions/__init__.py Implements bounded-memory manifest hashing.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Medium

@mnriem
mnriem merged commit 4803a22 into github:main Jul 30, 2026
14 checks passed
@mnriem

mnriem commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Thank you!

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.

3 participants