Skip to content

fix(model): skip sha256 check for non-LFS files in manifest pull#29

Merged
missuo merged 1 commit into
missuo:mainfrom
erning:fix/manifest-sha256-validation
Mar 29, 2026
Merged

fix(model): skip sha256 check for non-LFS files in manifest pull#29
missuo merged 1 commit into
missuo:mainfrom
erning:fix/manifest-sha256-validation

Conversation

@erning

@erning erning commented Mar 29, 2026

Copy link
Copy Markdown
Collaborator

Problem

koe manifest generate writes an empty sha256 for non-LFS files (e.g. config.json, tokens.txt). The downloader unconditionally compares the actual hash against this empty string, which always fails — making any manifest containing non-LFS files unpullable.

Solution

  • When sha256 is empty, skip hash verification and fall back to file-size comparison
  • When size is also unknown (0), skip integrity checks entirely
  • The "already complete" check is also updated to handle unknown-size files

Files changed

  • koe-core/src/model_manager.rs

Test plan

  • make build passes
  • koe manifest generate + koe pull works for repos with non-LFS files

The manifest generator writes an empty sha256 for non-LFS files
(e.g. config.json, tokens.txt), but the downloader unconditionally
compared the actual hash against the empty string, always failing.

When sha256 is empty, fall back to file-size verification.  When
size is also unknown (0), skip integrity checks entirely.
@missuo missuo merged commit 4e5f7cb into missuo:main Mar 29, 2026
@erning erning deleted the fix/manifest-sha256-validation branch March 29, 2026 14:50
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.

2 participants