fix(release): verify visual-hashing against its own repository - #458
Conversation
`just verify-release` failed the candidate on four checks, all one root cause:
the verifier still assumed visual-hashing is published from this monorepo.
FAIL: crates.io: SLSA provenance visual-hashing-0.1.3.crate
HTTP 404 .../repos/Blackcat-Informatics/gmeow-gts/attestations/sha256:...
FAIL: crates.io: SPDX SBOM predicate visual-hashing-0.1.3.crate
HTTP 404 (same)
FAIL: crates.io visual-hashing: repository metadata
expected .../gmeow-gts, got .../visual-hashing
visual-hashing moved to Blackcat-Informatics/visual-hashing in 0.9.6 and now
publishes with its own crates.io Trusted Publisher, so its attestations live in
THAT repository's store and its crates.io `repository` field correctly names
that repository. The verifier queried this repository for both.
The failure mode is worth noting: a bare HTTP 404 from the attestation API reads
exactly like a missing attestation, so the honest reading of the old output was
"visual-hashing shipped without provenance" -- alarming, and wrong. The
attestations were there all along, in the right place, and nothing was looking
for them there.
The attestation plan now carries the attesting repository per artifact rather
than assuming one repository for the whole release, and expected_repo_urls
takes the publishing repository for the crate under test. Everything except
visual-hashing keeps the previous behaviour by default.
This could only surface at release-verification time, which is the last section
of the checklist -- and only for a release family that actually depends on a
crate published elsewhere.
Verified: verify_release --self-test OK, and `just verify-release 1.0.0-rc.1
0.1.3` now reports 103 PASS / 0 FAIL against the live registries.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. 📝 WalkthroughWalkthroughRelease verification now supports visual-hashing artifacts published from a standalone repository. Repository-specific metadata and GitHub attestations are validated through the new ChangesRelease verification
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to Release verification now uses visual-hashing’s standalone repository for crate metadata and GitHub attestation checks. No concrete merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant ReleaseVerifier
participant CrateVerifier
participant AttestationPlan
participant GitHub
ReleaseVerifier->>CrateVerifier: validate crate using source repository
CrateVerifier->>AttestationPlan: retain artifact repository
AttestationPlan->>GitHub: request repository-specific attestations
GitHub-->>ReleaseVerifier: return provenance and SPDX SBOM results
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 1 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
just verify-releasefailed the 1.0.0-rc.1 candidate on four checks — all one root cause: the verifier still assumedvisual-hashingis published from this monorepo.visual-hashingmoved toBlackcat-Informatics/visual-hashingin 0.9.6 and publishes with its own crates.io Trusted Publisher — so its attestations live in that repository's store, and its crates.iorepositoryfield correctly names that repository. The verifier queried this one for both.The failure mode is the interesting part. A bare HTTP 404 from the attestation API reads exactly like a missing attestation, so the honest reading of the old output was "visual-hashing shipped without provenance" — alarming, and wrong. The attestations were there all along, in the right place; nothing was looking for them there.
Fix
The attestation plan now carries the attesting repository per artifact rather than assuming one repository for the whole release, and
expected_repo_urlstakes the publishing repository for the crate under test. Everything exceptvisual-hashingkeeps the previous behaviour by default.This could only surface at release-verification time — the last section of the checklist — and only for a release family depending on a crate published elsewhere.
Verified
Also gitignores
dist/release-verification/, which is release evidence uploaded as a workflow artifact rather than repository content — same treatment as thedist/v*/candidate bundles.Summary by CodeRabbit
New Features
visual-hashingpackage being published from its standalone repository.visual-hashingsource repository during verification.Chores