Skip to content

Conversation

@anth-volk
Copy link
Contributor

Fixes #218

Summary

  • Fixed _get_blob_by_metadata_version to return the newest blob (highest generation number) when multiple blobs match the requested version
  • Previously, the function returned the first matching blob, which was the oldest when re-uploaded blobs existed with the same version tag
  • Added test to verify the newest blob is selected when multiple blobs share the same metadata version

Test plan

  • All existing tests pass
  • Added new test test_get_blob__metadata_version_returns_newest_when_multiple_match to verify the fix
  • Updated existing tests to include generation numbers on mock blobs

🤖 Generated with Claude Code

Previously, _get_blob_by_metadata_version returned the first blob that
matched the requested version. When multiple blobs exist with the same
metadata version (e.g., after re-uploading), this incorrectly returned
the oldest blob instead of the newest.

Now collects all matching blobs and returns the one with the highest
generation number (the newest blob).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@anth-volk anth-volk force-pushed the fix/get-newest-blob branch from 73f62a9 to fcd43fe Compare January 15, 2026 01:52
@anth-volk anth-volk merged commit 1ad8283 into 0.x Jan 15, 2026
3 checks passed
@anth-volk anth-volk deleted the fix/get-newest-blob branch January 15, 2026 01:58
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