Commit 7277aa4
fix(server): compare artifacts, not commit SHAs, when checking for model updates (#3073)
* fix(server): compare artifacts, not commit SHAs, when checking for updates
check_for_model_updates flagged an update whenever the upstream commit SHA
moved, so a README-only commit -- or any commit touching an unrelated variant
in a shared multi-artifact repository -- re-raised "Update available" on every
restart. download_from_registry already handles this via
can_reuse_previous_hf_snapshot; the startup check never called it.
- Compare the per-model artifact set (resolved checkpoints, expanded across
GGUF shard families) between the cached ref and the latest commit before
advertising a re-download.
- Gate on Hugging Face: ModelScope snapshots are tree fingerprints with no
commit pin, so they keep the snapshot-id comparison.
- Every indeterminate path (missing file, fetch failure, empty set) falls back
to flagging an update, so a real update is never hidden.
Fixes #2542
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* fix(server): track update-check baselines separately, share artifact selection with pull
- compare artifacts against the on-disk snapshot (resolved path/refs main),
never the processed-at-pull sha, which may name a snapshot never
materialized locally
- select artifacts from the new revision's tree via the same helper pull
uses, so added-in-directory and tokenizer/config-only changes are detected
- verify auxiliary checkpoints under their own repository entries; a model
is verified only once every repository it spans completes a determination
- an indeterminate repository (no resolvable local baseline) assumes changed
instead of silently skipping, so it can no longer block another
repository's completed determination for the same model
- any indeterminate artifact check consistently assumes changed
- move the per-model repository count into registry_files::DeterminationTracker,
guarded against a model being marked determined twice for the same repository
- compare the union of the previous and current revision's selected files, not
just the current one, so a file removed upstream (e.g. from a directory
checkpoint or a GGUF shard family) isn't silently dropped out of comparison
- apply the same union fix to pull's own snapshot-reuse check
(download_from_registry), which shared the identical blind spot independently
of this update-check path
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
* fix(server): keep same-repo auxiliary checkpoints in pull snapshot reuse
* test(server): stale provenance snapshot must not flag a false update
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent fff3d7f commit 7277aa4
5 files changed
Lines changed: 1094 additions & 181 deletions
File tree
- src/cpp
- include/lemon
- server
- test
- cpp
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2327 | 2327 | | |
2328 | 2328 | | |
2329 | 2329 | | |
| 2330 | + | |
| 2331 | + | |
| 2332 | + | |
| 2333 | + | |
| 2334 | + | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
| 2338 | + | |
| 2339 | + | |
| 2340 | + | |
| 2341 | + | |
| 2342 | + | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
| 2348 | + | |
| 2349 | + | |
2330 | 2350 | | |
2331 | 2351 | | |
2332 | 2352 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
0 commit comments