Skip to content

Conversation

@jmgilman
Copy link
Contributor

Summary

  • Updates github.com/meigma/blob from v1.1.0 to v1.1.1
  • Fixes CI failure in Publish Source Archive workflow where verify command failed with mismatch Content-Length

Root Cause

The blob library had a bug where manifest cache hits returned nil for raw bytes:

// registry/fetch.go line 102 (before fix)
if cached, ok := c.manifestCache.GetManifest(dgst); ok {
    manifest, err = parseBlobManifest(cached, dgst)
    return manifest, nil, true, err  // raw was nil!
}

This caused PolicyRequest.Subject.Size to be 0, and oras-go detected a Content-Length mismatch when the sigstore policy tried to fetch the manifest for verification.

Test plan

  • CI passes (specifically the Publish Source Archive workflow verify step)
  • blob verify works after blob inspect (same digest, cached manifest)

🤖 Generated with Claude Code

jmgilman and others added 3 commits January 24, 2026 16:45
Add multi-layer caching with per-cache control:

Cache types:
- content: File content cache (deduplicated by hash)
- blocks: HTTP range block cache
- refs: Tag to digest mappings (with configurable TTL)
- manifests: OCI manifest cache
- indexes: Archive index cache

Cache commands:
- `blob cache status`: Show cache sizes and file counts
- `blob cache path`: Show cache directory paths
- `blob cache clear [type]`: Clear all or specific caches

Configuration:
- Global cache enable/disable
- Per-cache enable/disable (cache.content.enabled, etc.)
- Custom cache directory (cache.dir)
- Ref cache TTL (cache.ref_ttl, default 5m)

Also includes:
- Comprehensive integration tests for cache functionality
- Unit tests for cache utilities and config types
- Updated README with caching documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes manifest cache bug where raw bytes were not returned when
retrieving cached manifests, causing policy verification to fail
with "mismatch Content-Length" errors.

The bug occurred because:
1. inspect command fetched and cached the manifest
2. verify command retrieved manifest from cache with raw=nil
3. PolicyRequest.Subject.Size was set to 0 (since raw was nil)
4. oras-go detected Content-Length mismatch when fetching

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jmgilman jmgilman merged commit ccec3ee into master Jan 25, 2026
7 checks passed
@jmgilman jmgilman deleted the fix/update-blob-v1.1.1 branch January 25, 2026 02:27
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