Skip to content

Studio: fingerprint the same manifest scopes the downgrade migration scan reads - #16556

Merged
danielhanchen merged 2 commits into
mainfrom
fix/manifest-fingerprint-casefold
Nov 5, 2026
Merged

danielhanchen merged 2 commits into
mainfrom
fix/manifest-fingerprint-casefold

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

What changes

Follow-up to #16270. The downgrade migration scan (_migration_manifest_paths) matches cache-* scope folders on the case-folded name on Windows, as pathlib's glob does. The fingerprint that decides whether a later start can skip that scan (_migration_fingerprint) matched cache- case-sensitively. A scope folder whose on-disk name is spelled differently (for example Cache-...) was therefore scanned but never fingerprinted: a v2 manifest written into it after a clean pass moved no recorded mtime, and later starts skipped it.

The fingerprint now uses the same name match as the scan (one _folded helper shared by _listed and the fingerprint), and the os.scandir it uses is closed with a with block. On Linux and macOS nothing changes (no folding there, same as the scan). Studio itself only creates lowercase cache-<digest> folders, so this only matters for a folder created or renamed outside Studio.

Tests

  • New test_scope_matched_only_when_folded_is_fingerprinted (folding forced on so it runs on every OS): after a clean pass with a Cache-Hand scope, the marker records Cache-Hand, and a manifest written into it later is read by the next start. It fails on main ('Cache-Hand' not in the recorded dirs) and passes here.
  • tests/test_manifest_migration_marker.py: 21 passed.
  • Every backend test file importing download_manifest: 1929 passed, 1 skipped, and the same single failure as main (test_cached_gguf_routes.py::test_pipeline_class_guard_passes_every_shipped_family, unrelated).

Not covered

  • Not run on a real Windows host; folding is simulated by patching _folded. The scan side already folds on Windows on main.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-05T13:06:57.117068Z
We couldn’t complete this review. Comment @codex review to try again.
c6f39db Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: c6f39db8d7

ℹ️ 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".

@danielhanchen
danielhanchen marked this pull request as ready for review November 5, 2026 13:06
@danielhanchen
danielhanchen merged commit 94f23e0 into main Nov 5, 2026
@danielhanchen
danielhanchen deleted the fix/manifest-fingerprint-casefold branch November 5, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant