Repository navigation
Studio: forget deleted audio models once the Hub cache listing updates - #13630
danielhanchen merged 5 commits into
Conversation
… lands The Audio page spent a delete marker on the first settled listing whose available set was a new object. After a delete the undebounced local listing lands first beside the old Hub cache rows, so the marker was spent while the deleted repo was still listed and the remembered model was never forgotten. Markers now keep the delete time and retire only once both Hub cache fetches behind the listing were sent after it. The page's inventory also asks for audio.cpp folder rows, so deleting one folder while others stay downloaded forgets that folder.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
… the delete A Hub cache fetch sent in the same millisecond as the delete could still have read the old cache, and its late response stamped a start equal to the delete time, spending the marker on stale rows. Require a strictly later fetch start.
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4fb5e62253
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!inventory.settled || inventory.error || refreshStartedAt === null) return []; | ||
| return [...markers] | ||
| .filter(([, listedAtDelete]) => listedAtDelete !== inventory.available) | ||
| .filter(([, deletedAt]) => refreshStartedAt > deletedAt) |
There was a problem hiding this comment.
Replace wall-clock marker ordering with a monotonic token
When the system clock moves backward between the prior Hub scan and this delete (for example after an NTP correction, VM resume, or manual clock change), that old scan's refreshStartedAt can be numerically greater than the new Date.now() delete stamp, so this filter spends the marker immediately even though the listing predates the delete. The real post-delete listing then has no marker with which to call forgetModel, and re-downloading the repo resurrects the supposedly forgotten selection; use an inventory/version sequence or another monotonic ordering token instead (the negative-age handling in inventory-freshness.ts already recognizes this clock behavior).
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changing this: it needs the wall clock to step backward in the seconds between a Hub scan and a delete, and the outcome is only the old behaviour (the deleted model stays remembered), no crash or wrong load. Inventory hint reconciliation already orders refreshStartedAt against Date.now() stamps the same way.
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Follow-up to #13517.
What changed
useHubInventoryexposes this ashubCacheRefreshStartedAt.includeUmbrellaFolders: true, so it sees audio.cpp folder rows.Why
After a delete, the Audio page in Unsloth Studio could keep a deleted model as the remembered model. A Hub repo stayed hidden while missing and came back if downloaded again; a deleted audio.cpp folder stayed offered on the page. The local listing is not debounced, so it lands first next to the old Hub cache rows that still include the deleted repo. The old check retired the marker on the first settled listing with a new
availableset, which was that stale one, so the model was never forgotten. A Codex review comment on #13517 found this.The second fix comes from the folder delete in #13519. Without folder rows, deleting one audio.cpp folder while other folders stay downloaded left that folder remembered.
Tests
tests/audio-page-policy.test.ts: 75/75 pass on this branch. The same file fails 5 tests on main (the new and updated tests).npm run typecheck: clean.Before / after (Unsloth Studio)
Two isolated Studios (merge base
daab3bcd8vs this branch4fb5e6225) on the same fresh HF cache holding two audio.cpp folders,Piper-TTS-GGUFandKittenTTS-GGUF. Speak remembers Piper and nothing is loaded. Piper is then deleted from the Audio page's own model picker (On Device > More options > Delete), and the page is captured once the listings settle.audio-cpp/audio.cpp-gguf/Piper-TTS-GGUF.KittenTTS-GGUF.