test(oci): coalesce a virtual blob read across two repositories

The S32 spec's cross-repository criterion names a blob. It requires one upstream GET and one cache write when two virtual repositories that list one remote, and a direct read of that remote, read the same uncached blob. Step 16 (!2984 (merged)) merged without that test, and only the manifest twin, TestVirtualManifest_CoalescesAcrossVirtualRepositoriesAndTheDirectRead, exists. The manifest test cannot see the blob route's handler.

  • virtual_blob_composition_test.go adds TestVirtualBlob_CoalescesAcrossVirtualRepositoriesAndTheDirectRead. It reads the blob through both virtual repositories and the kind=2 blob arm, all over one flight registry, and asserts one upstream GET and one cache write.
  • vreBlobRegistry in virtual_metrics_test.go gains a per-digest GET gate and a GET counter. The gate holds the leader until both other reads have joined its flight, so the count does not depend on a race.

The test passes 10 times under -race, and it fails when the gate is removed. Duo's review of !2941 (merged) found the gap.

This MR changes no production code, so no docs/testing/ or docs/user/ scenario changes.

Related to #291 (closed)

🤖 Generated with Claude Code

Merge request reports

Loading
Loading