Skip to content

fix: make model integrity downloads reliable - #49

Merged
Mr-Sunglasses merged 1 commit into
mainfrom
fix/model-integrity
Sep 3, 2026
Merged

fix: make model integrity downloads reliable#49
Mr-Sunglasses merged 1 commit into
mainfrom
fix/model-integrity

Conversation

@Mr-Sunglasses

Copy link
Copy Markdown
Member

Problem

Multi-file model installs were not a safe transaction: after one worker failed, cleanup could run while other thread-backed downloads were still writing and recreate a partial model directory. Repository-wide request bursts and silent short responses made the integrity path unnecessarily flaky. Pin harvesting also refreshed unrelated models and could combine a new revision with a stale checksum.

Summary

  • Bound folder downloads to four concurrent files, cancel peers on failure, and wait for every worker to stop before deleting staging data.
  • Detect short responses from Content-Length and retry network or checksum failures against the exact same pinned digest; persistent mismatches still fail and leave no file behind.
  • Make pin harvesting incremental by default, replace revision plus digests atomically, preserve the previous snapshot on incomplete harvests, and fail clearly.
  • Require complete pins for every Hugging Face catalog entry and document the simplified add/refresh workflow.

Verification

  • just test — ruff, WPS, mypy, locked package/audit checks, 550 tests, and Compose config passed
  • uv run scripts/verify-model-pins.py — 60 checked, 0 mismatched, 0 skipped
  • Real production-path install of whisper.cpp:ggml-apex-hinglish-q5_0.bin — completed at 574,041,195 bytes with the committed SHA-256 pin
  • uv run scripts/harvest-model-pins.py — 0 missing pinnable models and no pin-file diff
  • Container build — not applicable; no Dockerfile or lockfile changed

Privacy and security

  • No secrets, recordings, transcripts, or private hostnames added
  • No bearer-auth, upload-limit, retention, or bind-default changes
  • Digest enforcement remains fail-closed; retries never change or bypass the expected pin

@netlify

netlify Bot commented Sep 3, 2026

Copy link
Copy Markdown

Deploy Preview for voca-gateway canceled.

Name Link
🔨 Latest commit 8eafe15
🔍 Latest deploy log https://app.netlify.com/projects/voca-gateway/deploys/6a9a05d8104e740008ec5f75

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Mr-Sunglasses has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@Mr-Sunglasses
Mr-Sunglasses merged commit 1e25322 into main Sep 3, 2026
8 checks passed
@Mr-Sunglasses
Mr-Sunglasses deleted the fix/model-integrity branch September 3, 2026 23:49
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