Skip to content

Read the Hub's field names for LFS blob metadata - #211

Merged
assafvayner merged 1 commit into
mainfrom
assafvayner/blob-lfs-info-field-names
Sep 18, 2026
Merged

assafvayner merged 1 commit into
mainfrom
assafvayner/blob-lfs-info-field-names

Conversation

@assafvayner

Copy link
Copy Markdown
Contributor

BlobLfsInfo declares sha256 and pointer_size, but the Hub returns oid and pointerSize on both tree and paths-info. With no rename_all or alias on the struct, two of its three fields silently deserialized to None for every LFS-backed file — so anyone reading get_paths_info or list_tree(expand = true) never saw the LFS object id or the pointer size.

Confirmed against the live Hub; paths-info for a Xet file returns "lfs": {"oid": "...", "size": ..., "pointerSize": 134}.

  • #[serde(rename_all = "camelCase")] fixes pointer_size
  • #[serde(alias = "oid")] fixes sha256 while keeping the descriptive public field name
  • Regression test fails before the change with left: None, right: Some("realsha")

Nothing else in the workspace reads these fields and no test pinned the old shape. Found while fixing get_file_metadata for Xet files, which needs lfs.sha256 to match what the HEAD path reports.

@assafvayner
assafvayner added this pull request to stack #218 September 18, 2026 21:15
`BlobLfsInfo` declared `sha256` and `pointer_size`, but `tree` and
`paths-info` return `oid` and `pointerSize`. With no rename or alias on
the struct, two of its three fields silently deserialized to `None` for
every LFS-backed file, so callers of `get_paths_info` or
`list_tree(expand = true)` never saw the LFS object id or pointer size.
@assafvayner
assafvayner force-pushed the assafvayner/blob-lfs-info-field-names branch from d4e0915 to ee6a6b3 Compare September 18, 2026 21:32
@assafvayner
assafvayner merged commit 3b961be into main Sep 18, 2026
8 of 10 checks passed
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