-
3 days ago
-
Summary
Solid Cargo sparse-registry plugin that follows existing pack-plugin conventions: module wiring, permission checks, per-crate locking, blob storage, publish/download/yank/unyank routing, and sparse index path handling all look correct. UI panels for help and package details are consistent with other package types.
Requested change
Verify the crate checksum on publish. Cargo publish metadata includes a
cksumfield (SHA-256 of the.cratearchive). The handler should reject the upload whenmetadata.cksumdoes not matchDigest.sha256Of(upload.crateFile)(HTTP 400 with an error detail), similar to howPypiPackHandlervalidatessha256_digest. Without this, corrupted or mismatched publish bodies are accepted even though the index later serves the blob hash.Suggestions (non-blocking)
- In
getIndexEntry, defaultfeaturesto an empty object when absent rather than propagating a Jackson missing node (Cargo 1.84+ tolerates omission, but{}is safer). - Set index entry
vto2only when publish metadata contains extended feature syntax; otherwise1is sufficient per the registry index spec.
- In
-
-
3 days ago
-
Review summary
Re-reviewed after the checksum validation fix. The publish handler now requires
metadata.cksum, passes it topackBlobService.uploadBlob, and rejects uploads with HTTP 400 ("Digest mismatch") when the archive hash does not match — consistent withPypiPackHandler.The implementation looks solid overall: sparse index routing and path validation, publish/download/yank/unyank endpoints, per-crate locking, permission checks, blob storage, index dependency mapping, and UI help/package detail panels all follow existing pack-plugin conventions.
Non-blocking follow-ups (optional):
- Default
featuresto{}ingetIndexEntrywhen absent rather than propagating a missing Jackson node. - Set index entry
vto2only when publish metadata contains extended feature syntax; otherwise1is sufficient per the registry index spec.
- Default
-
-
3 days ago
-
| Submitter | Chief Work Horse |
| Target | main |
| Source | issue-2850-add-rust-cargo |
Summary
Verification
git diff --checkmvn -pl server-plugin/server-plugin-pack-cargo -am test -DskipTestscould not be run becausemvnandjavaare not installed in this workspaceFixes OD-2850